当我尝试为我的社交媒体应用程序获取图像选择控制器时,它会给我一个错误!
[access] <private>
我尝试制作另一个项目并使用其他视图控制器和UITapGestureRecognizers,但没有任何作用! 请帮忙!
控制台: 2016-07-21 17:43:29.439339发布[3012:763270] [辅助功能] ******************加载GAX客户端套装********* ******* 2016-07-21 17:43:31.098400发表[3012:763270] [MC] systemgroup.com.apple.configurationprofiles路径的系统组容器是/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2016-07-21 17:43:31.108233发表[3012:763270] [MC]从公共有效用户设置中读取。 2016-07-21 17:43:37.273218发表[3012:763430] [访问] (lldb)
代码:
class LoginVC: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
@IBAction func test(_ sender: AnyObject) {
let pickerImg = UIImagePickerController()
pickerImg.delegate = self
pickerImg.sourceType = .photoLibrary
pickerImg.allowsEditing = true
present(pickerImg, animated: true, completion: nil)
}
}
答案 0 :(得分:0)
此问题已在以后的Swift版本中修复。