Commit 59ef8320 authored by yJion's avatar yJion

修改代码书写和命名规范

parent 21038493
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
@property (nonatomic, assign) NSInteger circleCropRadius; ///< 圆形裁剪框半径大小 @property (nonatomic, assign) NSInteger circleCropRadius; ///< 圆形裁剪框半径大小
@property (nonatomic, copy) void (^cropViewSettingBlock)(UIView *cropView); ///< 自定义裁剪框的其他属性 @property (nonatomic, copy) void (^cropViewSettingBlock)(UIView *cropView); ///< 自定义裁剪框的其他属性
@property (nonatomic, copy) void (^navLeftBarButtonBlick)(UIButton *leftButton); ///< 自定义返回按钮样式及其属性 @property (nonatomic, copy) void (^navLeftBarButtonBlock)(UIButton *leftButton); ///< 自定义返回按钮样式及其属性
- (id)showAlertWithTitle:(NSString *)title; - (id)showAlertWithTitle:(NSString *)title;
- (void)hideAlertView:(id)alertView; - (void)hideAlertView:(id)alertView;
......
...@@ -62,9 +62,7 @@ ...@@ -62,9 +62,7 @@
_naviBgColor = naviBgColor; _naviBgColor = naviBgColor;
self.navigationBar.barTintColor = naviBgColor; self.navigationBar.barTintColor = naviBgColor;
} }
-(void)setBackBarItemColor:(UIColor *)backBarItemColor{
}
- (void)setNaviTitleColor:(UIColor *)naviTitleColor { - (void)setNaviTitleColor:(UIColor *)naviTitleColor {
_naviTitleColor = naviTitleColor; _naviTitleColor = naviTitleColor;
[self configNaviTitleAppearance]; [self configNaviTitleAppearance];
......
...@@ -69,7 +69,6 @@ static CGFloat itemMargin = 5; ...@@ -69,7 +69,6 @@ static CGFloat itemMargin = 5;
} }
return _imagePickerVc; return _imagePickerVc;
} }
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController; TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
...@@ -78,11 +77,11 @@ static CGFloat itemMargin = 5; ...@@ -78,11 +77,11 @@ static CGFloat itemMargin = 5;
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
self.navigationItem.title = _model.name; self.navigationItem.title = _model.name;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:tzImagePickerVc.cancelBtnTitleStr style:UIBarButtonItemStylePlain target:tzImagePickerVc action:@selector(cancelButtonClick)]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:tzImagePickerVc.cancelBtnTitleStr style:UIBarButtonItemStylePlain target:tzImagePickerVc action:@selector(cancelButtonClick)];
if (tzImagePickerVc.navLeftBarButtonBlick) { if (tzImagePickerVc.navLeftBarButtonBlock) {
UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
leftButton.frame = CGRectMake(0, 0, 40, 40); leftButton.frame = CGRectMake(0, 0, 40, 40);
[leftButton addTarget:self action:@selector(goBackEvent:) forControlEvents:UIControlEventTouchUpInside]; [leftButton addTarget:self action:@selector(navLeftBarButtonClick) forControlEvents:UIControlEventTouchUpInside];
tzImagePickerVc.navLeftBarButtonBlick(leftButton); tzImagePickerVc.navLeftBarButtonBlock(leftButton);
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:leftButton]; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:leftButton];
} }
_showTakePhotoBtn = (([[TZImageManager manager] isCameraRollAlbum:_model.name]) && tzImagePickerVc.allowTakePicture); _showTakePhotoBtn = (([[TZImageManager manager] isCameraRollAlbum:_model.name]) && tzImagePickerVc.allowTakePicture);
...@@ -321,7 +320,7 @@ static CGFloat itemMargin = 5; ...@@ -321,7 +320,7 @@ static CGFloat itemMargin = 5;
} }
#pragma mark - Click Event #pragma mark - Click Event
-(void)goBackEvent:(UIButton *)backButton{ -(void)navLeftBarButtonClick{
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
- (void)previewButtonClick { - (void)previewButtonClick {
......
...@@ -278,10 +278,10 @@ ...@@ -278,10 +278,10 @@
//imagePickerVc.allowPreview = NO; //imagePickerVc.allowPreview = NO;
// 自定义导航栏上的返回按钮 // 自定义导航栏上的返回按钮
// [imagePickerVc setNavLeftBarButtonBlick:^(UIButton *leftButton){ [imagePickerVc setNavLeftBarButtonBlock:^(UIButton *leftButton){
// [leftButton setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal]; [leftButton setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
// [leftButton setImageEdgeInsets:UIEdgeInsetsMake(0, -20, 0, 20)]; [leftButton setImageEdgeInsets:UIEdgeInsetsMake(0, -20, 0, 20)];
// }]; }];
imagePickerVc.isStatusBarDefault = NO; imagePickerVc.isStatusBarDefault = NO;
#pragma mark - 到这里为止 #pragma mark - 到这里为止
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment