Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property attributes 'nonnull' and 'weak' are mutually exclusive

Recently I upgraded my Xcode to version 7 - XCode 7.0. Now I am getting this message to every IBOutlet of mine:

@property (nonatomic, weak, nonnull) IBOutlet UITableView *tableView;

Property attributes 'nonnull' and 'weak' are mutually exclusive

Whant can I do?

like image 791
Joel Banzatto Avatar asked Sep 17 '15 17:09

Joel Banzatto


1 Answers

The whole point of weak is that the property becomes nil when the object is deallocated. The whole point of nonnull is that the property can never be nil. That's why you can't apply both.

Either make your property strong nonnull or just weak.

like image 96
rmaddy Avatar answered Oct 19 '22 20:10

rmaddy