BPKNavigationBar
@interface BPKNavigationBar : UIView
A navigation bar component similar to UINavigationBar from UIKit implementing
the iOS 11 style large title pattern.
-
A
BPKNavigationBarButtonto show on the left side inside the navigationDeclaration
Objective-C
@property (nonatomic, strong) BPKNavigationBarButton *_Nonnull leftButton;Swift
var leftButton: BPKNavigationBarButton { get set } -
A
BPKNavigationBarButtonto show on the right side inside the navigationDeclaration
Objective-C
@property (nonatomic, strong) BPKNavigationBarButton *_Nonnull rightButton;Swift
var rightButton: BPKNavigationBarButton { get set } -
The title text to display in the navigation bar
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull title;Swift
var title: String { get set } -
Set the color of the large title. When
nilthe default color, BPKColor.skyGray` will be used.Declaration
Objective-C
@property (nonatomic, strong, nullable) UIColor *largeTitleTextColor;Swift
var largeTitleTextColor: UIColor? { get set } -
The layout margins for the large title.
Declaration
Objective-C
@property (nonatomic) UIEdgeInsets largeTitleLayoutMargins;Swift
var largeTitleLayoutMargins: UIEdgeInsets { get set } -
The text alignment of the large title text.
Declaration
Objective-C
@property (nonatomic) NSTextAlignment largeTitleTextAlignment;Swift
var largeTitleTextAlignment: NSTextAlignment { get set } -
Initializes and returns a newly allocated navigation bar by decoding a NSCoder
Declaration
Objective-C
- (nonnull instancetype)initWithCoder:(nonnull NSCoder *)aDecoder;Swift
init(coder aDecoder: NSCoder)Parameters
aDecoderThe decoder to deocde
Return Value
An initialized
BPKNavigationBar -
Initializes and returns a newly allocated navigation bar with a specific frame
Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;Swift
init(frame: CGRect)Parameters
frameThe frame to use
Return Value
An initialized
BPKNavigationBar -
Prepare the navigation bar for use with a
UIScrollView. This method should be called inviewDidLoador at another appropriate time in the view lifecycle. This method must be called before any calls toupdateWithScrollView:.Declaration
Objective-C
- (void)setUpForScrollview:(nonnull UIScrollView *)scrollView;Swift
func setUp(for scrollView: UIScrollView)Parameters
scrollViewThe scrollview that the receiver will track.
-
Update the state of the navigation bar based on the state of the
UIScrollViewthat this navigation bar tracks. Users should call this method everytime the scrollview scrolls by implementingscrollViewDidScroll:.Declaration
Objective-C
- (void)updateWithScrollView:(nonnull UIScrollView *)scrollView;Swift
func update(with scrollView: UIScrollView)Parameters
scrollViewThe scrollview to base updates on.
-
Will adjust the
UIScrollViewif necessary in order to ensure that the title is fully visible. Users should call this method everytime the scrollview ends decelerating usingscrollViewDidEndDecelerating:, and also everytime the scrollview ends dragging (unless it will decelerate) usingscrollViewDidEndDragging:willDecelerate.Declaration
Objective-C
- (void)makeTitleVisibleWithScrollView:(nonnull UIScrollView *)scrollView;Swift
func makeTitleVisible(with scrollView: UIScrollView)Parameters
scrollViewThe scrollview to base updates on.
BPKNavigationBar Class Reference