MainViewController :
Код: Выделить всё
class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .green
}
}
Код: Выделить всё
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = MainViewController()
window?.makeKeyAndVisible()
return true
}
}
Код: Выделить всё
Код: Выделить всё
UIWindow(frame: UIScreen.main.bounds)Подробнее здесь: https://stackoverflow.com/questions/752 ... the-screen
Мобильная версия