iOS-自定义修改拍照界面retake和use按钮
2012-04-05 11:49
176 查看
-(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 修改NavigationBar的自定义按钮
- iOS开发之自定义系统的UIActionSheet修改按钮的属性
- IOS SDK详解之拍照/相册(默认+自定义拍照界面)
- ios自定义拍照界面
- IOS SDK详解之拍照/相册(默认+自定义拍照界面)
- iOS隐藏某一界面自定义的返回按钮
- ios自定义拍照界面和选取图片界面总结
- iOS中使用ZBar扫描二维码自定义扫描界面
- iOS 自定义按钮
- 【iOS】UISearchBar修改右边取消按钮的方法
- iOS 自定义cell侧滑删除、编辑等按钮
- 4000 iOS开发自定义相机(拍照,录制视频)
- Android 自定义View学习(3)--仿IOS风格滑动按钮
- iOS 修改searchBar cancel 按钮为取消 并修改颜色