-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Design] 로그인 Alert UI 구현
- Loading branch information
Showing
20 changed files
with
252 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...althFoodMe/Global/Resources/Assets.xcassets/Common/btn_alertdelete.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "btn_alertdelete.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "btn_alertdelete@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "btn_alertdelete@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+551 Bytes
...l/Resources/Assets.xcassets/Common/btn_alertdelete.imageset/btn_alertdelete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+977 Bytes
...esources/Assets.xcassets/Common/btn_alertdelete.imageset/btn_alertdelete@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.34 KB
...esources/Assets.xcassets/Common/btn_alertdelete.imageset/btn_alertdelete@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...oodMe/Global/Resources/Assets.xcassets/Common/btn_loginAlert_apple.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "btn_login_apple.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "btn_login_apple@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "btn_login_apple@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.82 KB
...ources/Assets.xcassets/Common/btn_loginAlert_apple.imageset/btn_login_apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.41 KB
...ces/Assets.xcassets/Common/btn_loginAlert_apple.imageset/btn_login_apple@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.05 KB
...ces/Assets.xcassets/Common/btn_loginAlert_apple.imageset/btn_login_apple@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...oodMe/Global/Resources/Assets.xcassets/Common/btn_loginAlert_kakao.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "btn_login_kakao.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "btn_login_kakao@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "btn_login_kakao@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.93 KB
...ources/Assets.xcassets/Common/btn_loginAlert_kakao.imageset/btn_login_kakao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.69 KB
...ces/Assets.xcassets/Common/btn_loginAlert_kakao.imageset/btn_login_kakao@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.57 KB
...ces/Assets.xcassets/Common/btn_loginAlert_kakao.imageset/btn_login_kakao@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
...thFoodMe/HealthFoodMe/Presentation/Common/HelfmeLoginAlert/VC/HelfmeLoginAlert.storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Helfme Login AlertVC--> | ||
<scene sceneID="s0d-6b-0kx"> | ||
<objects> | ||
<viewController storyboardIdentifier="HelfmeLoginAlertVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Y6W-OH-hqX" customClass="HelfmeLoginAlertVC" customModule="HealthFoodMe" customModuleProvider="target" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="70" y="42"/> | ||
</scene> | ||
</scenes> | ||
<resources> | ||
<systemColor name="systemBackgroundColor"> | ||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
</resources> | ||
</document> |
108 changes: 108 additions & 0 deletions
108
HealthFoodMe/HealthFoodMe/Presentation/Common/HelfmeLoginAlert/VC/HelfmeLoginAlertVC.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
// | ||
// HelfmeLoginAlertVC.swift | ||
// HealthFoodMe | ||
// | ||
// Created by 강윤서 on 2022/09/06. | ||
// | ||
|
||
import UIKit | ||
|
||
class HelfmeLoginAlertVC: UIViewController { | ||
|
||
// MARK: - Properties | ||
|
||
let width = UIScreen.main.bounds.width | ||
let loginButtonWidth = UIScreen.main.bounds.width - 127 | ||
let deleteButtonWidth = UIScreen.main.bounds.width - 347 | ||
|
||
//MARK: - UI Components | ||
|
||
private let loginAlertView: UIView = { | ||
let view = UIView() | ||
view.layer.cornerRadius = 15 | ||
view.backgroundColor = .helfmeWhite | ||
return view | ||
}() | ||
|
||
private let alertMessage: UILabel = { | ||
let lb = UILabel() | ||
lb.text = I18N.Alert.alertLoginMessage | ||
lb.font = .NotoMedium(size: 16) | ||
lb.numberOfLines = 2 | ||
lb.textAlignment = .center | ||
return lb | ||
}() | ||
|
||
private lazy var kakaoLoginButton: UIButton = { | ||
let button = UIButton() | ||
button.setBackgroundImage(ImageLiterals.Common.kakaoLoginBtn, for: .normal) | ||
return button | ||
}() | ||
|
||
private lazy var appleLoginButton: UIButton = { | ||
let button = UIButton() | ||
button.setBackgroundImage(ImageLiterals.Common.appleLoginBtn, for: .normal) | ||
return button | ||
}() | ||
|
||
private let alertDeleteBtn: UIButton = { | ||
let button = UIButton() | ||
button.setBackgroundImage(ImageLiterals.Common.alertDeleteBtn, for: .normal) | ||
return button | ||
}() | ||
|
||
//MARK: - View Life Cycle | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setUI() | ||
setLayout() | ||
} | ||
|
||
} | ||
|
||
// MARK: - Extension | ||
|
||
extension HelfmeLoginAlertVC { | ||
private func setUI() { | ||
view.backgroundColor = .black.withAlphaComponent(0.4) | ||
} | ||
|
||
private func setLayout() { | ||
view.addSubviews(loginAlertView) | ||
loginAlertView.addSubviews(alertMessage, | ||
kakaoLoginButton, | ||
appleLoginButton, | ||
alertDeleteBtn) | ||
|
||
loginAlertView.snp.makeConstraints { | ||
let logoutWidth = width * (288/375) | ||
$0.center.equalToSuperview() | ||
$0.width.equalTo(logoutWidth) | ||
$0.height.equalTo(logoutWidth * (219/288)) | ||
} | ||
|
||
alertMessage.snp.makeConstraints { | ||
$0.centerX.equalToSuperview() | ||
$0.top.equalToSuperview().inset(32) | ||
} | ||
|
||
kakaoLoginButton.snp.makeConstraints { | ||
$0.top.equalTo(alertMessage.snp.bottom).offset(24) | ||
$0.leading.trailing.equalToSuperview().inset(20) | ||
$0.height.equalTo(loginButtonWidth * 42/248) | ||
} | ||
|
||
appleLoginButton.snp.makeConstraints { | ||
$0.bottom.equalToSuperview().inset(24) | ||
$0.leading.trailing.equalToSuperview().inset(20) | ||
$0.height.equalTo(loginButtonWidth * 42/248) | ||
} | ||
|
||
alertDeleteBtn.snp.makeConstraints { | ||
$0.top.equalToSuperview().inset(8) | ||
$0.trailing.equalToSuperview().inset(8) | ||
$0.width.height.equalTo(28) | ||
} | ||
} | ||
} |