当警报表关闭时,iOS图像视图会更改色调颜色

时间:2018-05-15 10:09:07

标签: ios swift uialertsheet

我有一个堆栈视图,我点击了照片选择项目,我显示警报表,当警报表被取消,我的图像视图的图像确实变为imageView的色调颜色。 代码:

let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
    let cameraAction = UIAlertAction(title: "newsfeed_camera.picker".localized, style: .default, handler: {
        action in
        self.present(self.imageManager.cameraPicker, animated: true, completion: nil)
    })
    let photoAction = UIAlertAction(title: "newsfeed_photo.picker".localized, style: .default, handler: {
        action in
        self.present(self.imageManager.photoPicker, animated: true, completion: nil)
    })
    let cancelAction = UIAlertAction(title: "newsfeed_button.cancel".localized, style: .cancel, handler: {
        action in
        self.postTV.becomeFirstResponder()
    })

    alertController.addAction(cameraAction)
    alertController.addAction(photoAction)
    alertController.addAction(cancelAction)
    present(alertController, animated: true, completion: nil)

我用这样的图像显示,

First state

Second State

Final state

0 个答案:

没有答案