InsectQY / QYUINavigationBarCategory

A handy collection of UINavigationBar categories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QYUINavigationBarCategory

A handy collection of UINavigationBar categories.

Version

License

Platform

Features

One line of code sets the common properties of the UINavigationBar, regardless of version adaptation.

Swift Verison

QYUINavigationBarExtension

Requirements

  • iOS 9.0 or later

How to use

  1. Import

    #import <QYUINavigationBarCategory.h>
  2. Set the properties you need

    self.navigationController.navigationBar.qy_backgroundImage = [UIImage imageNamed:@""];
    self.navigationController.navigationBar.qy_backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.qy_titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blackColor]};
    [self.navigationController qy_setNavigationBarTransparent:NO];

Comment

/* You may specify the font, text color, and shadow properties for the title in the text attributes dictionary, using the keys found in NSAttributedString.h.
 */
@property(nullable,nonatomic,copy) NSDictionary<NSAttributedStringKey, id> *qy_titleTextAttributes;

/// A color to use for the bar background.
@property(nullable, nonatomic,strong) UIColor *qy_backgroundColor;

/// An image to use for the bar background.
@property (nonatomic, readwrite, strong, nullable) UIImage *qy_backgroundImage;

/// Set the UINavigationBar background to transparent.
- (void)qy_setTransparent:(BOOL)transparent;

Installation

CocoaPods

pod 'QYUINavigationBarCategory'

License

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

About

A handy collection of UINavigationBar categories.

License:Apache License 2.0


Languages

Language:Objective-C 87.4%Language:Ruby 12.6%