-
Notifications
You must be signed in to change notification settings - Fork 2
/
UIViewController+LeftBarItem.h
41 lines (32 loc) · 1.13 KB
/
UIViewController+LeftBarItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// UIViewController+LeftBarItem.h
// Test0113NavigationBackBar
//
// Created by markss on 15/1/13.
// Copyright (c) 2015年 GL. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (LeftBarItem)
- (void)setLeftBarItemTitle:(NSString *)title;
- (void)setLeftBarItemTitle:(NSString *)title
callback:(void(^)(UIViewController *vc))callback;
- (void)setLeftBarItemImage:(UIImage *)image;
- (void)setLeftBarItemImage:(UIImage *)image
callback:(void(^)(UIViewController *vc))callback;
- (void)setLeftBarItemTitle:(NSString *)title
image:(UIImage *)image;
/**
* [self setLeftBarItemTitle:@"返回"
image:[UIImage imageNamed:@"barbuttonicon_back"]
callback:^(UIViewController *vc) {
[vc.navigationController popViewControllerAnimated:YES];
}];
*
* @param title @"返回"
* @param image @"image"
* @param callback callback
*/
- (void)setLeftBarItemTitle:(NSString *)title
image:(UIImage *)image
callback:(void(^)(UIViewController *vc))callback;
@end