-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/edit-book-logic
- Loading branch information
Showing
7 changed files
with
110 additions
and
38 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...entation/MHPresentation/Resource/Images.xcassets/RegisterBookImage.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" : "Group 2.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Group [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Group [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+8.92 KB
.../MHPresentation/Resource/Images.xcassets/RegisterBookImage.imageset/Group 2.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
+24.8 KB
...Presentation/Resource/Images.xcassets/RegisterBookImage.imageset/Group [email protected]
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
+42.9 KB
...Presentation/Resource/Images.xcassets/RegisterBookImage.imageset/Group [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions
67
MemorialHouse/MHPresentation/MHPresentation/Source/Design/MHRegisterView.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,67 @@ | ||
import UIKit | ||
|
||
final class MHRegisterView: UIView { | ||
// MARK: UI Components | ||
let registerTextField: UITextField = { | ||
let registerFont = UIFont.ownglyphBerry(size: 12) | ||
|
||
let textField = UITextField() | ||
textField.font = registerFont | ||
|
||
var attributedText = AttributedString(stringLiteral: "ex) 영현") | ||
attributedText.font = registerFont | ||
textField.textAlignment = .right | ||
textField.attributedPlaceholder = NSAttributedString(attributedText) | ||
|
||
return textField | ||
}() | ||
private let registerLabel = UILabel(style: .header2) | ||
|
||
// MARK: - Initializer | ||
init() { | ||
super.init(frame: .zero) | ||
|
||
setup() | ||
configureAddSubview() | ||
configureLayout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
|
||
setup() | ||
configureAddSubview() | ||
configureLayout() | ||
} | ||
|
||
func configure(textFieldAction: @escaping (String?) -> Void) { | ||
registerTextField.addAction(UIAction { [weak self] _ in | ||
guard let self else { return } | ||
textFieldAction(self.registerTextField.text) | ||
}, for: .editingChanged) | ||
} | ||
|
||
// MARK: - Setup & Configuration | ||
private func setup() { | ||
backgroundColor = .baseBackground | ||
registerLabel.text = "기록소" | ||
} | ||
|
||
private func configureAddSubview() { | ||
addSubview(registerTextField) | ||
addSubview(registerLabel) | ||
} | ||
|
||
private func configureLayout() { | ||
registerTextField.setAnchor( | ||
top: topAnchor, | ||
leading: leadingAnchor, | ||
bottom: bottomAnchor, | ||
trailing: registerLabel.leadingAnchor, constantTrailing: 8 | ||
) | ||
registerLabel.setAnchor( | ||
trailing: trailingAnchor, constantTrailing: 4 | ||
) | ||
registerLabel.setCenterY(view: self) | ||
} | ||
} |
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