Swift UI

UIViewController

  1. AppDelegate.swift 程序入口 (负责逻辑)

didFinishLauchingOptions第一次打开程序

  1. SceneDelegate(负责UI)应用的入口和生命周期

willConnectTo第一加载页面

sceneWillEnterForeground即将进入前台

sceneDidBecomeActive进入前台

  1. ViewController 一个页面
 class ViewController: UIViewController

UIViewController

UITabBarController底部tab栏

UINavigationController数组(栈)路由,有顶层导航栏可以显示页面名字

UITableViewController list

UICollectionViewController

生命周期

override func viewDidLoad() {

}

viewDidLoad

viewWillAppear viewWilllayoutSubviews

viewDidAppear

viewDidDisappear

deinit { }

  1. Main storyboard

  2. LaunchScreen.storyboard

  3. info.plist配置

UIView

  1. 静态的 label,img

  2. 可交互的 button

Interface Builder

Layout by Code

Swift UI

需要最新macOS

Custom UIView

Screen Adaptation

Category: IOS

Author: Yoga

Article
Tagcloud
DVA Java Express Architecture Azure CI/CD database ML AWS ETL nest sql AntV Next Deep Learning Flutter TypeScript Angular DevTools Microsoft egg Tableau SAP Token Regexp Unit test Nginx nodeJS sails wechat Jmeter HTML2Canvas Swift Jenkins JS event GTM Algorithm Echarts React-Admin Rest React hook Flux Redux ES6 Route Component Ref AJAX Form JSX Virtual Dom Javascript CSS design pattern