Giter Club home page Giter Club logo

tynavbarstyle's Introduction

TYNavBarStyle

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

TYNavBarStyle is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TYNavBarStyle'

功能

  1. 修改导航栏自定义按钮位置
  2. 自定义返回按钮

使用

+ (void)configNavBarStyle {
    TYNavBarTintEngine *tintEngine = [TYNavBarTintEngine createSharedEngine];
    tintEngine.debugModel = YES;
    tintEngine.navBarItemHorizontalMargin = DTNavBarMargin;
    [tintEngine setBackItemConfig:^(UIButton *backButton) {
        UIImage *backImage = [UIImage ty_imageWithIcon:DTIconfontNavBack
                                              fontSize:24.f
                                             tintColor:[UIColor blackColor]];
        [backButton setImage:backImage forState:UIControlStateNormal];
        return YES;
    }];
    
    // 过滤系统页面
    tintEngine.ignoreConfigNavBarVcClass = @[@"ABNewPersonViewController",
                                             @"CNContactViewHostViewController",
                                             @"CNContactViewController",];
    TYNavBarStyleConfig *defaultConfig = [TYNavBarStyleConfig navBarStyleConfigWithTitleColor:[UIColor defaultNavBarTitleColor]
                                                                                    titleFont:nil
                                                                                    tintColor:[UIColor defaultNavBarTextColor]
                                                                                     itemFont:nil
                                                                                 barTintColor:[UIColor defaultNavBarBackgroundColor]
                                                                               statusBarStyle:UIStatusBarStyleDefault];
    tintEngine.navBarStyleConfigs = @{TYNavBarStyleDefault: defaultConfig};
}

Author

[email protected], [email protected]

License

TYNavBarStyle is available under the MIT license. See the LICENSE file for more info.

tynavbarstyle's People

Contributors

tory-xu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.