Latest 1.0.0
Homepage https://github.com/KBvsMJ/EBTNavigationBarShapeDemo
License MIT
Platforms ios 8.0, requires ARC
Authors

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

使用pod指令把该类库添加到项目中

pod ‘EBTUINavigationBarShape’, ‘~> 1.0.0’

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

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

Latest podspec

{
    "name": "EBTUINavigationBarShape",
    "version": "1.0.0",
    "summary": "iOS customizes three style shapes for the navigation bar",
    "description": "iOS customize three styles (water wave sawtooth arc) shape for the navigation bar",
    "homepage": "https://github.com/KBvsMJ/EBTNavigationBarShapeDemo",
    "license": "MIT",
    "authors": {
        "KBvsMJ": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/KBvsMJ/EBTNavigationBarShapeDemo.git",
        "tag": "1.0.0"
    },
    "source_files": "EBTUINavigationBarShape/*.{h,m}",
    "exclude_files": "Classes/Exclude"
}

Pin It on Pinterest

Share This