CocoaPods trunk is moving to be read-only. Read more on the blog, there are 10 months to go.

EBTUINavigationBarShape 1.0.0

EBTUINavigationBarShape 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2017

Maintained by KBvsMJ--description=add cocoapods with EBTBarChartView.



  • By
  • 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