iOS-自定义修改拍照界面retake和use按钮
2014-04-29 13:27
639 查看
-(UIView *)findView:(UIView *)aView withName:(NSString *)name{
Class cl = [aView class];
NSString *desc = [cl description];
if ([name isEqualToString:desc])
return aView;
for (NSUInteger i = 0; i < [aView.subviews count]; i++)
{
UIView *subView = [aView.subviews objectAtIndex:i];
subView = [self findView:subView withName:name];
if (subView)
return subView;
}
return nil;
}
-(void)addSomeElements:(UIViewController *)viewController{
UIView *PLCameraView=[self findView:viewController.view withName:@"PLCameraView"];
UIView *bottomBar=[self findView:PLCameraView withName:@"PLCropOverlayBottomBar"];
UIImageView *bottomBarImageForSave = [bottomBar.subviews objectAtIndex:0];
UIButton *retakeButton=[bottomBarImageForSave.subviews objectAtIndex:0];
[retakeButton setTitle:@"重拍" forState:UIControlStateNormal]; //左下角按钮
UIButton *useButton=[bottomBarImageForSave.subviews objectAtIndex:1];
[useButton setTitle:@"上传" forState:UIControlStateNormal]; //右下角按钮
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
[self addSomeElements:viewController];
}
Class cl = [aView class];
NSString *desc = [cl description];
if ([name isEqualToString:desc])
return aView;
for (NSUInteger i = 0; i < [aView.subviews count]; i++)
{
UIView *subView = [aView.subviews objectAtIndex:i];
subView = [self findView:subView withName:name];
if (subView)
return subView;
}
return nil;
}
-(void)addSomeElements:(UIViewController *)viewController{
UIView *PLCameraView=[self findView:viewController.view withName:@"PLCameraView"];
UIView *bottomBar=[self findView:PLCameraView withName:@"PLCropOverlayBottomBar"];
UIImageView *bottomBarImageForSave = [bottomBar.subviews objectAtIndex:0];
UIButton *retakeButton=[bottomBarImageForSave.subviews objectAtIndex:0];
[retakeButton setTitle:@"重拍" forState:UIControlStateNormal]; //左下角按钮
UIButton *useButton=[bottomBarImageForSave.subviews objectAtIndex:1];
[useButton setTitle:@"上传" forState:UIControlStateNormal]; //右下角按钮
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
[self addSomeElements:viewController];
}
相关文章推荐
- iOS-自定义修改拍照界面retake和use按钮
- iOS-自定义修改拍照界面retake和use按钮
- 开发笔记 那些年追过的图片(三):自定义修改拍照界面retake和use按钮
- 开发笔记 那些年追过的图片(三):自定义修改拍照界面retake和use按钮
- iOS设置拍照retake和use按钮为中文简体
- iOS 应用之间调用 出现在左上角的返回按钮怎么自定义 或者修改位置 样式
- iOS开发之自定义系统的UIActionSheet修改按钮的属性
- IOS SDK详解之拍照/相册(默认+自定义拍照界面)
- ios自定义拍照界面
- iOS 修改NavigationBar的自定义按钮
- IOS SDK详解之拍照/相册(默认+自定义拍照界面)
- iOS隐藏某一界面自定义的返回按钮
- ios自定义拍照界面和选取图片界面总结
- android zxing自定义界面,点击按钮开关闪光灯
- Android 自定义View学习(3)--仿IOS风格滑动按钮
- iOS - 截取拍照按钮事件
- iOS 为自定义返回按钮的页面添加右滑返回
- [IOS APP]伪装者-GPS位置自定义,修改以及分享
- TesseractOCR 文字识别 自定义拍照界面(AVFoundation)
- iOS自定义返回按钮