All my IBOutlet are nil in viewDidLoad

前端 未结 3 2004
一个人的身影
一个人的身影 2020-12-17 14:42

I\'ve created a UIViewController that we can call MyViewController1. When I call MyViewController1, all my IBOutlet are <

3条回答
  •  自闭症患者
    2020-12-17 15:05

    Check whether IBoulet is linked properly with xib or not. Also check the files owner of your xib.

    If your class name or xib name is changed Try to allocate you viewcontroller with proper xibName

    MyViewController1 *vc = [[MyViewController1 alloc] initWithNibName:@"NibName" bundle:nil];
    

提交回复
热议问题