- Swift UIImagePickerController 修改
- UIImagePickerController中按钮修改成中文
- swift-一些比较好的学习链接
- 修改UIImagePickerController的naviga
- iOS this app does not have acces
- #发现swift3.0# 关于UIImagePickerCont
- IOS 修改UIImagePickerController的na
- 修改 UIImagePickerController 选择照片状
- swift中关于UIImagePickerController的
- UIImagePickerController相册选择视频
方法如下:这是UINavigationControllerDelegate的一个代理方法
navigationController(_navigationController:UINavigationController, willShow viewController:UIViewController, animated:Bool)
func navigationController(_navigationController:UINavigationController, willShow viewController:UIViewController, animated:Bool) {
ifletPLCameraView =self.findView(aView: viewController.view, withName:"CAMCameraViewControllerContainerView"){
ifletPLCropOverlay =self.findView(aView: PLCameraView , withName:"CAMViewfinderView"){
ifletbottomBar =self.findView(aView: PLCropOverlay , withName:"CAMBottomBar"){//拍照页面底色
ifletbottomBar1 =self.findView(aView: bottomBar , withName:"CUShutterButton"){//拍照按钮
}
ifletbottomBar2 =self.findView(aView: bottomBar , withName:"CAMFlipButton"){//切换摄像头
}
ifletbottomBar3 =self.findView(aView: bottomBar , withName:"CAMReviewButton"){//取消
}
}
}
}
ifletPLCameraView =self.findView(aView: viewController.view, withName:"PLCropOverlay"){
ifletPLCropOverlay =self.findView(aView: PLCameraView , withName:"PLCropOverlayBottomBar"){
ifletbottomBar =self.findView(aView: PLCropOverlay , withName:"PLCropOverlayPreviewBottomBar"){//拍照完成页面底色
foriteminbottomBar.subviews{
letbt = type(of:item)
letstringl = bt.description()
ifstringl =="UIButton"{
letbBtn = itemas!UIButton
ifbBtn.titleLabel?.text==nil{//使用照片
bBtn.backgroundColor=UIColor.red
}elseifbBtn.titleLabel?.text=="重拍"{//重拍
}
}
}
}
}
}
}
判断VIew方法:
funcfindView(aView:UIView,withName name:String)->UIView?{
letcl = type(of:aView)
letdesc = cl.description()
print(desc)
ifname == desc {
returnaView
}
forviewinaView.subviews{
letcl1 = type(of:view)
letstringl = cl1.description()
print(stringl)
ifstringl == name{
returnview
}
}
return nil
}
网友评论