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
import UIKit | |
//MARK: - Auto Layout Anchor Extension | |
extension UIView { | |
func anchor(top: NSLayoutYAxisAnchor?, bottom: NSLayoutYAxisAnchor?, leading: NSLayoutXAxisAnchor?, trailing: NSLayoutXAxisAnchor?, padding: UIEdgeInsets = .zero, size: CGSize = .zero) { | |
if let top = top { |
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
fileprivate func addViewToSubView() { | |
[mainView, detailView, descriptionTextView].forEach{view.addSubview($0)} | |
} |
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
guard let windowScene = (scene as? UIWindowScene) else { return } | |
window = UIWindow(windowScene: windowScene) | |
let navController = UINavigationController(rootViewController: FirstScreen()) | |
window?.rootViewController = navController | |
window?.makeKeyAndVisible() |