ios - Image shows up in iPhone simulator but not ipad - Swift -
when go select image camera roll , display in view doesn't appear on ipad simulator. works great on iphone. here code
//--controls how pick image when button clicked--\\ @ibaction func chooseimage(sender: anyobject) { var image = uiimagepickercontroller() image.delegate = self image.navigationbar.tintcolor = uicolor.whitecolor() image.sourcetype = uiimagepickercontrollersourcetype.photolibrary image.allowsediting = false self.presentviewcontroller(image, animated: true, completion: nil) } //--after imaged picked brings view--\\ func imagepickercontroller(picker: uiimagepickercontroller, didfinishpickingimage image: uiimage!, editinginfo: [nsobject : anyobject]!) { println("image selected") self.dismissviewcontrolleranimated(true, completion: nil) imagetopost.image = image photoselected = true }
apparently, uiimageview
called imagetopost
not displayed correctly ipad simulator. check storyboard file , make sure image view correctly wired outlet.
also, check constraints might push image view off screen.
Comments
Post a Comment