EFNavigationBar赋予了众多 UINavigationBar所不具备的能力。
1 2 3 4 5 6 7 8 9
| IB_DESIGNABLE @interface EFNavigationBar : UINavigationBar
@property (assign, nonatomic, getter=isDark) BOOL dark;
@end
|
[这是什么?]
为导航栏背景添加渐变色 (已弃用) Deprecated
1.5
-setHorizontalGradientWithStartColor:endColor:
通过storyboard的属性面板设置horizontalGradient属性为YES,来为导航栏背景添加横向渐变色。
参数:
startColor 渐变开始的颜色 UIColor 必填
endColor 渐变结束的颜色 UIColor 必填
返回值:
无
-setVerticalGradientWithStartColor:endColor:
通过storyboard的属性面板设置horizontalGradient属性为NO,来为导航栏背景添加纵向渐变色。
参数:
startColor 渐变开始的颜色 UIColor 必填
endColor 渐变结束的颜色 UIColor 必填
返回值:
无
-setGradientBackgroundWithColors:locations:startPoint:endPoint:
添加自定义渐变色。
参数:
colors 渐变色序列 NSArray〈UIColor〉 必填
locations 渐变位置序列 NSArray〈NSNumber〉 非必填
startPoint 渐变开始位置 CGPoint
endPoint 渐变结束位置 CGPoint
返回值:
无
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
@property (strong, nonatomic, nullable) IBInspectable UIColor *startColor;
@property (strong, nonatomic, nullable) IBInspectable UIColor *endColor;
@property (assign, nonatomic, getter=isHorizontalGradient) IBInspectable BOOL horizontalGradient;
- (void)setHorizontalGradientWithStartColor:(UIColor *_Nonnull)startColor endColor:(UIColor *_Nonnull)endColor;
- (void)setVerticalGradientWithStartColor:(UIColor *_Nonnull)startColor endColor:(UIColor *_Nonnull)endColor;
- (void)setGradientBackgroundWithColors:(NSArray<UIColor *> *_Nonnull)colors locations:(NSArray<NSNumber *> *_Nullable)locations startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;
|
相关
更新内容
- 相关链接调整。
- 更新了描述内容。