ios8

adding view controller as child view in ios

北城以北 提交于 2019-12-31 04:55:09
问题 Hi i am trying to add a view controller as a child view . and later remove this view controller form parent view.I am using following code for this purpose. self.loginView = [self.storyboard instantiateViewControllerWithIdentifier:@"LOGIN"]; [self.view addSubview:self.loginView.view]; This code works fine for iOS8 but in iOS7 this code is not working it shows the half of the screen.On half part login is shown. What could be the solution for this?? 回答1: Add a custom UIView object in your main

How do I access security role in cloudkit

我的梦境 提交于 2019-12-31 04:03:15
问题 I am building an app with Role based Security. I have built my Record Types (Projects, Accounts, HistoryLog, Financial, Customer, etc) in Cloudkit Dashboard, and I have created Security Roles as well. I have roles named: Executive and DeptManager. I have assigned to the Record Types the appropriate access by Role. I have also assigned to the user in the special Record Type "Users" the role of either Executive or DeptManager. I have successfully accessed and manipulated data in the Record

“unexpectedly found nil while unwrapping an Optional value” when retriveing PFFile from Parse.com

左心房为你撑大大i 提交于 2019-12-31 02:45:09
问题 i've a problem when i retrieve a PFFile stored in Parse.com let user = PFUser.currentUser() let userImageFile = user["profileImage"] as PFFile userImageFile.getDataInBackgroundWithBlock { (imageData: NSData!, error: NSError!) -> Void in if error == nil { if imageData != nil{ let image = UIImage(data:imageData) self.profileImage.image = image } } } The error start at line two . Column "profileImage" exists, but it can be empty. Someone can help me? Thank you. 回答1: Try: if let userImageFile =

remoteControlReceivedWithEvent called on iOS 7.0 device but not iOS 8.0

别等时光非礼了梦想. 提交于 2019-12-30 23:51:19
问题 I have an application that plays audio in the background. I am trying to fix a bug where the audio controls (play/pause), on the home screen (etc.), DO NOT work on iOS 8.0+ but work FINE on iOS 7.0. I have been digging through trying to figure out what the issue is and have been coming up empty. Any ideas would be greatly appreciated. Here is what I have in place. In the Project Settings: I have ensured that UIBackgroundModes is set to audio . In the AppDelegate.h: I have a member for the

remoteControlReceivedWithEvent called on iOS 7.0 device but not iOS 8.0

為{幸葍}努か 提交于 2019-12-30 23:50:31
问题 I have an application that plays audio in the background. I am trying to fix a bug where the audio controls (play/pause), on the home screen (etc.), DO NOT work on iOS 8.0+ but work FINE on iOS 7.0. I have been digging through trying to figure out what the issue is and have been coming up empty. Any ideas would be greatly appreciated. Here is what I have in place. In the Project Settings: I have ensured that UIBackgroundModes is set to audio . In the AppDelegate.h: I have a member for the

NSURLConnection timing out on iOS8

你离开我真会死。 提交于 2019-12-30 18:55:26
问题 I have been working on an application involving client-server communication. Everything was working fine until iOS 7.1. Now that Xcode 6 GM Seed in launched, I tried to build and run the project on iOS8 simulator. However, all NSURLConnections seem to time out now. I can not get any response from the server. This works on iOS 7 simulator and Xcode 6. I tried using the NSURLSession hoping that would resolve the issue. But it hasnt. Any help will be highly appreciated!! If anyone else has faced

application openURL in Swift

◇◆丶佛笑我妖孽 提交于 2019-12-30 18:34:31
问题 I am having an issue with the Appdelegate method OpenURL. I have setup my Imported UTI's and Document Type. But when opening my app from a mail attachment, the app crashes immediately when I have the method implemented. The depreciated handleOpenURL works, but not OpenURL? At the moment I have no code in the implementation, and am just returning true. func application(application: UIApplication, openURL url: NSURL, sourceApplication: String, annotation: AnyObject?) -> Bool { return true } The

Customise the quicktype suggestions in iOS Keyboard

倖福魔咒の 提交于 2019-12-30 17:26:15
问题 I want to have quicktype suggestions to have my own certain application level needed phrases as suggestions when keyboard is open in uitextview. For example if user types "All" - In quicktype suggesstion I want to show "All is well" or "All is as expected". Can I customize the quicktype suggestion text? If not, what could be other way to have this suggestions to show when keyboard is open. 回答1: Since there's no (known) way of changing the quicktype suggestions, I Subclassed UIInputView to

Scenekit detecting User tapped object

♀尐吖头ヾ 提交于 2019-12-30 11:47:47
问题 I recently started using scenekit for scenekit in iOS 8. I am facing difficulty in detecting whether the user has tapped or pressed on the object. Is there any way to do that? 回答1: See the documentation for the hitTest method. Call that from wherever you're handling touch events to get a list of 3D scene objects/locations "under" a 2D screen point. 回答2: An easy way to get sample code that shows the hitTest in action is to create a sample app using the Game template in XCode6. Create a new

UIImagePickerController using iOS 8 cameraViewTransform isn't scaling

穿精又带淫゛_ 提交于 2019-12-30 11:07:37
问题 I have previously solved a camera overlay issue: like this CGSize screenBounds = [UIScreen mainScreen].bounds.size; CGFloat cameraAspectRatio = 4.0f/3.0f; CGFloat camViewHeight = screenBounds.width * cameraAspectRatio; CGFloat scale = screenBounds.height / camViewHeight; self.picker.cameraViewTransform = CGAffineTransformMakeTranslation(0, (screenBounds.height - camViewHeight) / 2.0); self.picker.cameraViewTransform = CGAffineTransformScale(self.picker.cameraViewTransform, scale, scale); but