+[CATransaction synchronize] called within transaction

前端 未结 2 878
眼角桃花
眼角桃花 2021-01-01 09:09

If I close my iPad app while I\'m loading data from services, the app closes but then immediately opens again without my doing anything. At this point, I am not able to do a

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 09:42

    This can show up in the logs if you use UIWindow.rootViewController to skip storyboards altogether.

    To ditch the log message you can remove the storyboard, remove the key associating the Storyboard with your app in info.plist, set LaunchScreen.storyboard as the Main Interface in the target and use

    window = UIApplication.shared.keyWindow!
    

    inside AppDelegate to get the main window and assign your UIViewController on it.

提交回复
热议问题