Skip to content

Tory-Xu/TYNavBarStyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published