swift - Crash when assigning items to a UITabBar -




if put exception breakpoint (all exceptions) in xcode, breaks on tabbar.items strange reason.

func application(_ application: uiapplication, didfinishlaunchingwithoptions launchoptions: [uiapplicationlaunchoptionskey: any]?) -> bool {      let tabbar = uitabbar()     let item = uitabbaritem(title: "", image: uiimage(), selectedimage: uiimage())     tabbar.items = [item]  // --- breaks here     return true } 

however, if create empty project , put same lines, won't crash. figure must project.

how debug this?

enter image description here





wiki

Comments