ios9

Unable to see images in Camera roll in iPad Simulator when run at iPhone resolution

穿精又带淫゛_ 提交于 2019-12-23 02:34:16
问题 I made an image editing app for iPhone , and it got rejected because the app is not able to run on ipad at iphone resolution . It failed in both 1x and 2x resolution . When I click choose photo , I present the camera picker to select a pic, but camera picker is not showing any images in the simulator .(I didnt test this in real device, I beleive apple will test this in real device) It works normally in iPhone , and also in iPad if I make the app Universal . But If I make the app compatible

Youtube application launch from other app is not working in ios 9

半城伤御伤魂 提交于 2019-12-23 01:52:14
问题 if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"https://www.youtube.com/watch?v=VideoID"]]) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.youtube.com/watch?v=VideoID"]]; } Output : -canOpenURL: failed for URL: "youtube://www.youtube.com/watch?v=UFccvtrP1d8" - error: "This app is not allowed to query for scheme youtube" 回答1: try this In iOS 9 you must whitelist any URL schemes your App wants to query in Info.plist under the

How to draw a semi-circle using swift iOS 9 and on the basis of one value draw angle and fill that only part with color

為{幸葍}努か 提交于 2019-12-23 01:01:33
问题 I want to draw the two semi circles like this as shown in picture (the below one) I'm trying it but did not get anything. Tried some chart api and a few code to draw pie chart from stackoverflow but they need to edit and I don't know about Core Graphics. I am working on Xcode 7.3.1 and iOS 9. My Question is: How do I draw a semi-circle which take one value and first convert that value to get its equivalent angle and then draw an arc of this angle and fill color in that part? 回答1: The below

iOS9 dismissing keyboard causes crash

孤者浪人 提交于 2019-12-22 17:38:47
问题 When i try to run my app at iOS 9.1 simulator i have a crash Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UIInputWindowController: 0x7ff82b036e00>) Crash happens in main function. Crash happens when i try to dismiss the keyboard with [self.username resignFirstResponder]; Also when you self.view.userInteractionEnabled = false; I've read View appear with modal view animation instead of show (push) animation with

iOS 9 | Contacts framework

半腔热情 提交于 2019-12-22 14:06:38
问题 I have app designed for the iOS 8 using the ABAddressBook framework for the contact. In iOS 9 the Contacts framework is introduced in place of ABAddressBook . To check the effect of this change I checked in the iOS 9 device and everything is working fine. Is my understanding correct here? 回答1: Whenever an API/Framework is mentioned as Deprecated it indicates that sometime in future Apple will completely stop supporting the API's. This indicates the developers should move to the new API's soon

UIActivityViewController on iPad

女生的网名这么多〃 提交于 2019-12-22 13:58:45
问题 I have been using the code below to show a UIActivityViewController which worked fine when I was using Xcode 6, Swift 1.2 and iOS 8. However when I updated it shows the UIActivityViewController but it is completely blank without any of the sharing options. Do you have any suggestions? if UIDevice.currentDevice().userInterfaceIdiom == .Pad { let textToShare = textViewOne.text let objectsToShare = [textToShare] let activityVC = UIActivityViewController(activityItems: objectsToShare,

UIActivityViewController on iPad

六眼飞鱼酱① 提交于 2019-12-22 13:58:10
问题 I have been using the code below to show a UIActivityViewController which worked fine when I was using Xcode 6, Swift 1.2 and iOS 8. However when I updated it shows the UIActivityViewController but it is completely blank without any of the sharing options. Do you have any suggestions? if UIDevice.currentDevice().userInterfaceIdiom == .Pad { let textToShare = textViewOne.text let objectsToShare = [textToShare] let activityVC = UIActivityViewController(activityItems: objectsToShare,

swift dismiss modal and push to new VC

邮差的信 提交于 2019-12-22 12:54:30
问题 I have tableview... 1 table showing a new modal window and when I press the button I want to dismiss the modal window and push to VC. My code only hide the modal view but no push is made. @IBAction func registrationBtn(sender: AnyObject) { let openNewVC = self.storyboard?.instantiateViewControllerWithIdentifier("registrationVcID") as! RegistrationVC self.dismissViewControllerAnimated(false, completion: { () -> Void in self.navigationController?.pushViewController(openNewVC, animated: true) })

XCode 7: Unable to Convert OCUnit to XCTest

北战南征 提交于 2019-12-22 10:34:18
问题 I upgraded the XCode to 7.0 and ran into compilation issues. XCode asked me to convert my test target to use XCTest and I followed the wizard screen. I'm unable to find any test targets and cannot finish converting. Does any one know how to fix this ? Thanks. 回答1: Make sure you have selected the scheme of your test target (in the top-left scheme selector), then select Edit -> Convert -> To XCTest... This will make Xcode recognize the appropriate target. 来源: https://stackoverflow.com/questions

Callback when phone call ends? (to resume AVCaptureSession)

谁说胖子不能爱 提交于 2019-12-22 10:33:52
问题 I have a video camera app and I would like it to allow users to capture content while on the phone. I can do this by disconnecting the audio capture when the phone call is received and the session is interrupted, but because the session is no longer interrupted, I now have no way of knowing when the phone call ends and it is ok to reconnect the audio device. If I use this callbacks for AVCaptureSessionWasInterruptedNotification and AVCaptureSessionInterruptionEndedNotification : - (void