Skip to content

Commit aa668d7

Browse files
committed
improve nullability annotation for swift
1 parent cca6e76 commit aa668d7

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

FEPopupMenuController/FEPopupMenuController.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111

1212
@interface FEPopupMenuController : UIViewController
1313

14-
@property (nonatomic, strong) NSArray<FEPopupMenuItem *> * __nullable items;
14+
@property (nonnull, nonatomic, strong) NSArray<FEPopupMenuItem *> *items;
1515

1616
/**
1717
* using FEPopupMenuItem init
1818
*/
19-
- (instancetype __nonnull)initWithItems:(NSArray<FEPopupMenuItem * > * __nonnull)items;
19+
- (nonnull instancetype)initWithItems:(nonnull NSArray<FEPopupMenuItem * > *)items;
2020

2121
/**
2222
* popup the view controller
2323
*/
24-
- (void)showInViewController:(UIViewController * __nonnull)viewController atPosition:(CGPoint)position;
24+
- (void)showInViewController:(nonnull UIViewController *)viewController atPosition:(CGPoint)position;
2525

2626
/**
2727
* dismiss the view controller
@@ -53,7 +53,7 @@
5353
/**
5454
* the content view background color, default is white
5555
*/
56-
@property (nonatomic, strong) UIColor * __nonnull contentViewBackgroundColor;
56+
@property (nullable, nonatomic, strong) UIColor *contentViewBackgroundColor;
5757

5858
/**
5959
* the content view corner radius, default is 8.0

FEPopupMenuController/FEPopupMenuItem.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ typedef void(^FEPopupMenuItemActionBlock)(void);
1616
/**
1717
* init FEPopupMenuItem with title text and icon image
1818
*/
19-
- (instancetype __nonnull)initWithTitle:(NSString * __nonnull)title iconImage:(UIImage * __nonnull)iconImage action:(FEPopupMenuItemActionBlock __nullable)action;
19+
- (nonnull instancetype)initWithTitle:(nullable NSString *)title iconImage:(nullable UIImage *)iconImage action:(nullable FEPopupMenuItemActionBlock)action;
2020

2121
/**
2222
* title of item
2323
*/
24-
@property (nonatomic, copy) NSString * __nullable title;
24+
@property (nullable, nonatomic, copy) NSString *title;
2525

2626
/**
2727
* icon image of item
2828
*/
29-
@property (nonatomic, strong) UIImage * __nullable iconImage;
29+
@property (nullable, nonatomic, strong) UIImage *iconImage;
3030

3131
/**
3232
* callback of item when selected
3333
*/
34-
@property (nonatomic, copy) FEPopupMenuItemActionBlock __nullable action;
34+
@property (nullable, nonatomic, copy) FEPopupMenuItemActionBlock action;
3535

3636
/**
3737
* the color of title
3838
*/
39-
@property (nonatomic, strong) UIColor * __nullable titleColor;
39+
@property (nullable, nonatomic, strong) UIColor *titleColor;
4040

4141
@end

0 commit comments

Comments
 (0)