-
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
[FEAT] #198 - 첫 명함생성 시 바텀시트 구현
- Loading branch information
Showing
19 changed files
with
242 additions
and
9 deletions.
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
23 changes: 23 additions & 0 deletions
23
NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.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" : "invalidName.png", | ||
"scale" : "1x", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"scale" : "2x", | ||
"filename" : "invalidName@2x.png", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"filename" : "invalidName@3x.png", | ||
"scale" : "3x", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+561 Bytes
...rRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName.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.04 KB
...lease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@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.63 KB
...lease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@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
NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.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" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x", | ||
"filename" : "imgFirstcard.png" | ||
}, | ||
{ | ||
"filename" : "imgFirstcard@2x.png", | ||
"scale" : "2x", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"filename" : "imgFirstcard@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+2.09 KB
...rRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard.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
+4.58 KB
...lease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@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
+7.82 KB
...lease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@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
NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.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" : [ | ||
{ | ||
"scale" : "1x", | ||
"idiom" : "universal", | ||
"filename" : "invalidName.png" | ||
}, | ||
{ | ||
"filename" : "invalidName@2x.png", | ||
"scale" : "2x", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "invalidName@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+605 Bytes
...Release/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName.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.29 KB
...ease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@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
+2.02 KB
...ease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
134 changes: 134 additions & 0 deletions
134
...Release/Sources/ViewControllers/BottomSheet/FirstCardAlertBottomSheetViewController.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,134 @@ | ||
// | ||
// FirstCardAlertBottomSheetViewController.swift | ||
// NADA-iOS-forRelease | ||
// | ||
// Created by kimhyungyu on 2021/12/22. | ||
// | ||
|
||
import UIKit | ||
|
||
class FirstCardAlertBottomSheetViewController: CommonBottomSheetViewController { | ||
|
||
// MARK: - Properties | ||
|
||
private let cardImageView: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.image = UIImage(named: "imgFirstcard") | ||
|
||
return imageView | ||
}() | ||
|
||
private let bgView: UIView = { | ||
let view = UIView() | ||
view.layer.cornerRadius = 20 | ||
view.backgroundColor = .textBox | ||
|
||
return view | ||
}() | ||
|
||
private let firstHandIcon: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.image = UIImage(named: "firsthandIcon") | ||
|
||
return imageView | ||
}() | ||
|
||
private let secondHandIcon: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.image = UIImage(named: "secondhandIcon") | ||
|
||
return imageView | ||
}() | ||
|
||
private let firstSubtitleLabel: UILabel = { | ||
let label = UILabel() | ||
label.textAlignment = .center | ||
label.numberOfLines = 2 | ||
let attributedString = NSMutableAttributedString(string: "명함을 좌우로 스와이프하여\n 앞/뒷면을 확인할 수 있어요.") | ||
attributedString.addAttributes([.foregroundColor: UIColor.primary, .font: UIFont.textRegular03], range: NSRange(location: 0, length: 3)) | ||
attributedString.addAttributes([.foregroundColor: UIColor.mainColorNadaMain, .font: UIFont.textBold01], range: NSRange(location: 4, length: 8)) | ||
attributedString.addAttributes([.foregroundColor: UIColor.primary, .font: UIFont.textRegular03], range: NSRange(location: 14, length: 16)) | ||
label.attributedText = attributedString | ||
|
||
return label | ||
}() | ||
|
||
private let secondSubtitleLabel: UILabel = { | ||
let label = UILabel() | ||
label.textAlignment = .center | ||
label.numberOfLines = 2 | ||
let attributedString = NSMutableAttributedString(string: "우측 상단의 공유 버튼을 통해\n 친구에게 공유해 보세요.") | ||
attributedString.addAttributes([.foregroundColor: UIColor.mainColorNadaMain, .font: UIFont.textBold01], range: NSRange(location: 0, length: 12)) | ||
attributedString.addAttributes([.foregroundColor: UIColor.primary, .font: UIFont.textRegular03], range: NSRange(location: 13, length: 17)) | ||
label.attributedText = attributedString | ||
|
||
return label | ||
}() | ||
|
||
// MARK: - View Life Cycle | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
setupUI() | ||
} | ||
|
||
// MARK: - Methods | ||
|
||
// UI 세팅 작업 | ||
private func setupUI() { | ||
titleLabel.numberOfLines = 2 | ||
|
||
view.addSubview(cardImageView) | ||
view.addSubview(bgView) | ||
bgView.addSubview(firstHandIcon) | ||
bgView.addSubview(secondHandIcon) | ||
bgView.addSubview(firstSubtitleLabel) | ||
bgView.addSubview(secondSubtitleLabel) | ||
|
||
setupLayout() | ||
} | ||
|
||
// 레이아웃 세팅 | ||
private func setupLayout() { | ||
cardImageView.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
cardImageView.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 16), | ||
cardImageView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 70), | ||
cardImageView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -70) | ||
]) | ||
|
||
bgView.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
bgView.topAnchor.constraint(equalTo: cardImageView.bottomAnchor, constant: 16), | ||
bgView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), | ||
bgView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16), | ||
bgView.heightAnchor.constraint(equalToConstant: 194) | ||
|
||
]) | ||
|
||
firstHandIcon.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
firstHandIcon.topAnchor.constraint(equalTo: bgView.topAnchor, constant: 16), | ||
firstHandIcon.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) | ||
]) | ||
|
||
secondHandIcon.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
secondHandIcon.topAnchor.constraint(equalTo: firstSubtitleLabel.bottomAnchor, constant: 16), | ||
secondHandIcon.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) | ||
]) | ||
|
||
firstSubtitleLabel.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
firstSubtitleLabel.topAnchor.constraint(equalTo: firstHandIcon.bottomAnchor, constant: 2), | ||
firstSubtitleLabel.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) | ||
]) | ||
|
||
secondSubtitleLabel.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
secondSubtitleLabel.topAnchor.constraint(equalTo: secondHandIcon.bottomAnchor, constant: 2), | ||
secondSubtitleLabel.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) | ||
]) | ||
} | ||
} |
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