Post

Replies

Boosts

Views

Activity

Reply to otential Optimization or Bug in UINavigationController Push Operation in iOS 18
class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() print("HomeViewController viewDidLoad") } } class SecondViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() print("SecondViewController viewDidLoad") } } @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) let home = HomeViewController() let rootNav = UINavigationController(rootViewController: home) window?.rootViewController = rootNav window?.makeKeyAndVisible() let secondViewController = SecondViewController() home.navigationController?.pushViewController(secondViewController, animated: true) return true } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’24
Reply to otential Optimization or Bug in UINavigationController Push Operation in iOS 18
The main thing is that only IOS18 can reproduce.,I understand that he did the memory optimization on this side.,Load on demand.,This should be a good thing.,But the official didn't put forward a description of the optimization.,This bothers me.,I need to be able to prove why only IOS18 has this problem.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to otential Optimization or Bug in UINavigationController Push Operation in iOS 18
class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() print("HomeViewController viewDidLoad") } } class SecondViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() print("SecondViewController viewDidLoad") } } @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) let home = HomeViewController() let rootNav = UINavigationController(rootViewController: home) window?.rootViewController = rootNav window?.makeKeyAndVisible() let secondViewController = SecondViewController() home.navigationController?.pushViewController(secondViewController, animated: true) return true } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to In iOS 18, UINavigationController continuously executes pushViewController, and the lifecycle method is not executed when the viewController enters the stack
The ThirdViewController call pop to return to the SecondViewController page is a lifecycle execution method, which is strange if it is an IOS18 bug
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Dec ’24