You can use the following macros around declaration blocks (functions and variables) in object headers c:
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END
Then you need to add annotations with a null value for the links, which can be zeros inside this block. This applies to both functional parameters and variable declarations.
How in:
@interface SMLBaseUserDetailsVC : UIViewController < UICollectionViewDelegate> NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) IBOutlet UIScrollView *detailsScrollView; @property (nonatomic, readonly) IBOutlet UICollectionView *photoCV; @property (nonatomic, weak, readonly) SMLUser *user; - (IBAction)flagUser:(id)sender; - (IBAction)closeAction:(nullable id)sender; - (void) prefetchPhotos; NS_ASSUME_NONNULL_END @end
Edit * Why ??? because for an objective-c class that needs to be compatible with fast, you need to declare a nullability value so that the compiler knows that the properties are treated as fast or not. Incorrect object properties c are known as options in swift, and the use of these macros in combination with property declarations declared with zero declaration allows the compiler to treat them as options (options - monads - an object that wraps either an object or nil).
Kevin Mar 22 '16 at 20:05 2016-03-22 20:05
source share