2022. 7. 21. 10:09ใProgramming/Swift
์ฒ์ ๋ณด๋ fileprivate ํค์๋ โ๏ธ
private let emailLoginButton: CustomedLoginButton = {
let button = CustomedLoginButton()
button.setImage(UIImage(systemName: "envelope.fill"), for: .normal)
button.tintColor = UIColor.black
button.backgroundColor = UIColor.white
button.setTitle("์ด๋ฉ์ผ๋ก ๊ฐ์
ํ๊ธฐ", for: .normal)
button.setTitleColor(UIColor.black, for: .normal)
button.titleLabel?.font = UIFont.systemFont(ofSize: 22, weight: .semibold)
button.addTarget(self,
action: #selector(goToEmailLoginViewController),
for: .touchUpInside)
return button
}()
extension SignInViewController {
@objc fileprivate func goToEmailLoginViewController() {
let controller = EmailLoginViewController()
controller.modalPresentationStyle = .fullScreen
present(controller, animated: false, completion: nil)
}
}
fileprivate is one of the new Swift 3 access modifiers that replaces private in its meaning. fileprivate defines an entity (class, extension, property, ...) as private to everybody outside the source file it is declared in, but accessible to all entities in that source file.
Fileprivate access restricts the use of an entity within the same defined source file. The only reason you would use fileprivate is when you want to access your code within the same file from different classes or structs.
์ถ์ฒ
https://stackoverflow.com/questions/67860652/swift-uikit-navigate-to-starting-view-programmatically
Swift Uikit navigate to starting view programmatically
I have an Ios app build with Swift UIKit, where all views are embedded in a bottom navigation within the soryboard. I want to navigate to the home view (starting view) from another view on a button...
stackoverflow.com
'Programming > Swift' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ firestore database ์ ๊ทผ ๋ฐ ์ญ์ code, firestore Queries ๐ (0) | 2022.08.28 |
---|---|
โฟ iOS Swift Closure & @escaping ํด๋ก์ ์ ๋ฆฌ (0) | 2022.08.26 |
๐ฉโ๐ป UUID(Universally Unique IDentifier)๋? (0) | 2022.06.30 |
๐ARC (Automatic Reference Counting) : ์๋ ์ฐธ์กฐ ๊ณ์ฐ (0) | 2022.06.24 |
@IBAction & @IBOutlet ๐ค (0) | 2022.06.24 |