@IBAction func savePicture(sender: AnyObject) {
UIGraphicsBeginImageContextWithOptions(mainImageView.frame.size,false,0.0)
mainImageView.layer.renderInContext(UIGraphicsGetCurrentContext())
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
let alert = SCLAlertView()
alert.addButton("YES", action: {
UIImageWriteToSavedPhotosAlbum(image,nil,nil,nil)
//Save pop success tips
let alert1 = SCLAlertView()
alert1.showSuccess(self, title: "Saved successfully", subTitle: "^_^", closeButtonTitle: "OK", duration: 0)
//I want to link to another View controller
})
alert.showInfo(self, title: "Okay to save?", subTitle: "Pictures will be saved to the album", closeButtonTitle: "NO", duration: 0)
}
мне нужно сделать ссылку на другой TableViewController после того, как они успешно сохранить изображение в библиотеке фотографий.Нужна помощь в Swift контроллер ImageView на другой контроллер зрения
** Я попробовал толчок с этим кодом, но он не работает
var VC1 = self.storyboard?.instantiateViewControllerWithIdentifier("MyViewController") as ViewController
let navController = UINavigationController(rootViewController: VC1) // Creating a navigation controller with VC1 at the root of the navigation stack.
self.presentViewController(navController, animated:true, completion: nil)
Пожалуйста, помогите мне спасибо !!
Разве вы не можете выполнить сеанс? –
do u хотите передать изображение в следующий контроллер? – iAnurag
Нам нужна дополнительная информация. Что не сработало? Что вы видели? Есть ли какие-либо ошибки, напечатанные на консоли? – dasdom