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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -