iOS-自定义修改拍照界面retake和use按钮
2016-04-06 15:03
453 查看
-(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 = [selffindView: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.subviewsobjectAtIndex:0];
UIButton *retakeButton=[bottomBarImageForSave.subviewsobjectAtIndex:0];
[retakeButtonsetTitle:@"重拍"forState:UIControlStateNormal]; //左下角按钮
UIButton *useButton=[bottomBarImageForSave.subviewsobjectAtIndex:1];
[useButtonsetTitle:@"上传"forState:UIControlStateNormal]; //右下角按钮
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController
*)viewController animated:(BOOL)animated{
[selfaddSomeElements: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 = [selffindView: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.subviewsobjectAtIndex:0];
UIButton *retakeButton=[bottomBarImageForSave.subviewsobjectAtIndex:0];
[retakeButtonsetTitle:@"重拍"forState:UIControlStateNormal]; //左下角按钮
UIButton *useButton=[bottomBarImageForSave.subviewsobjectAtIndex:1];
[useButtonsetTitle:@"上传"forState:UIControlStateNormal]; //右下角按钮
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController
*)viewController animated:(BOOL)animated{
[selfaddSomeElements:viewController];
}
相关文章推荐
- iOS 8 AutoLayout与Size Class
- iOS开发入门的一些困惑
- 【ios开发学习】Cocoa 新的依赖管理工具:Carthage
- iOS图片旋转问题
- iOS 画平滑曲线的方法及取音频数据的方法
- iOS 数据保存几种方式总结
- iOS开发使用-半透明-模糊效果-方法整理
- 神奇的ios9bug
- 关于这几天使用IOS的ASYNCSOCKET完成无限后台的过程
- iOS项目的完整重命名方法
- ios Block详细用法
- RealReachability的使用心得
- iOS 音频播放,录音,视频播放,拍照,视频录制
- Responder Chain(ios事件传递)
- iOS runTime 机制详解
- iOS日期相关
- iOS开发- 自定义遮罩视图(引导, 功能说明)源码+解析
- iOS 沙盒与文件机制——iOS 编码复习(九)
- iOS-数据缓存
- iOS中传值的几种方式