EBTUINavigationBarShape 1.0.0

EBTUINavigationBarShape 1.0.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新发布2017年1月

KBvsMJ--description=addUINavigationBarwithEBTBarChartViewcocoapods 维护。



  • 作者:
  • KBvsMJ

给导航栏添加自定义(水波 锯齿 弧线)的形状支持动画效果

需要将名为 "UINavigationBar+TJ_NavigationShape" 的类别文件添加到项目中并引用。

导航栏样式目前只有三种,如枚举中所示。

typedef NS_ENUM(NSInteger,TJNavigationBarShapeTypeMode){

TJNavigationBarShapeTypeMode_Wave = 1<<0,//水波曲线

TJNavigationBarShapeTypeMode_Curve = 1<<1,//弧线

TJNavigationBarShapeTypeMode_Zigzig = 1<<2 //锯齿形

};

具体操作方法,请设置下列对应两个方法来实现效果。

/**

  • backGroundColor 导航栏背景颜色

  • attributeDictionary 导航栏字体设置

  • barShapeTypeMode // 导航栏形状样式

    */

- (void)navigationBarBackGroundColor:(UIColor *)backGroundColor titleTextAttribute:(NSDictionary *)attributeDictionary withNavigationBarShapeTypeMode:(TJNavigationBarShapeTypeMode)barShapeTypeMode;

/**

移除动画

*/

- (void)stopRemoveShapelayerAnimation;

水波形状导航栏效果图 barShapeTypeMode = TJNavigationBarShapeTypeMode_Wave

Image

锯齿形状导航栏效果图 barShapeTypeMode = TJNavigationBarShapeTypeMode_Zigzig

Image

弧线形状导航栏效果图 barShapeTypeMode = TJNavigationBarShapeTypeMode_Curve

Image