ios8

change screen rotation of app extension in objective c

我的未来我决定 提交于 2019-12-23 20:18:07
问题 How do I lock from rotating screen, I want my app extension to be only in portrait mode. When I'm using my extension inside Photos my I can rotate the screen to landscape. thanks 回答1: You have to choice: 1- Set landscape and portrait as supported interface orientation in the project, and then for each ViewController, you will override the supported interface orientation; 2- Set only portrait mode in the project, and in the ViewController you need it, you can make a 90 degree rotation self

UIAccessibilityFocus protocol not working

荒凉一梦 提交于 2019-12-23 17:26:16
问题 I want to know when a user shifts the focus away from an accessibility element. I have tried overriding the accessibilityElementDidLoseFocus() and accessibilityElementDidBecomeFocused() methods but the methods doesn't seem to be called upon when I navigate to other elements in VoiceOver accessibility mode. I have no idea what is wrong. Is there anything else that I should do to activate these methods? override func accessibilityElementDidBecomeFocused() { println("become focused") } override

IndexedDB slow when inserting

坚强是说给别人听的谎言 提交于 2019-12-23 15:29:56
问题 I installed iOS 8 on a third generation iPad and tried IndexedDB in Safari. My sample code just adds 1000 objects to an object store. It works however it is very slow compared to other devices with similar or weaker hardware. See this snippet for implementation details (IndexedDB seems to be disabled on stackoverflow so the example does not work out of the box - use this fiddle instead ): Added the snippet to jsbin because jsfiddle raises a SecurityException on iOS device and updated with

After duplicating a target in xcode 6 and building with iOS8 sdk unable to install / open it

本小妞迷上赌 提交于 2019-12-23 15:28:40
问题 All I get when trying to build that target is : "The file “appname.app” couldn’t be opened because you don’t have permission to view it." Any idea on how to fix that? 来源: https://stackoverflow.com/questions/26219300/after-duplicating-a-target-in-xcode-6-and-building-with-ios8-sdk-unable-to-insta

Why do I get Source Kit Service terminated error? [duplicate]

最后都变了- 提交于 2019-12-23 14:55:48
问题 This question already has answers here : Error Xcode 6 --> Error SourceKit terminated. Editor functionality temporarily limited [duplicate] (9 answers) Closed 5 years ago . With second line something wrong, what? let modelURL = NSBundle.mainBundle().URLForResource("xxx", withExtension: "momd"); let managedObjectModel = NSManagedObjectModel.init(contentsOfURL: modelURL) 回答1: In my case I had imported missing files in bridged header. After I deleted it the error notification gone. 回答2: the

Assign a value to a controller property in Swift

二次信任 提交于 2019-12-23 14:24:52
问题 I am trying to pass an int variable between views in Swift but I'm not sure how to access the other View controller's property. In Objective C I would do something like this UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; AnsViewController *ansViewController = [storyBoard instantiateViewControllerWithIdentifier:@"ansView"]; ansViewController.num = theNum; [self presentViewController:ansViewController animated:YES completion:nil]; And in the other

wkwebview with location services

放肆的年华 提交于 2019-12-23 11:46:43
问题 Ive been experimenting with swift and wanted to try out the wkwebview. Ive built an app and it all works correctly but the problem is that the webpage that i load into my wkwebview uses google maps and requires location services, so the javascript should prompt a message saying "this app requires your location information". The swift app wkwebview doesnt display any message doesnt display my google maps either. If i visit the url with the safari browser it prompts the location message and

How to dismiss a stack of modal view controllers with animation without flashing on screen any of the presented VCs between the top and bottom?

梦想与她 提交于 2019-12-23 11:39:12
问题 UPDATED: Fixed via "screenshot" method outline below. This works but is there a more elegant way? How would I go about dismissing a stack of modal view controllers with animation without flashing on screen any of the presented VCs between the top and bottom? Trying to do this with animation isn't working. See code below and inline comments describing my issue. You can copy/paste this code into a new project in Xcode to see for yourself if you'd like! // // ViewController.m // MultipleModals /

UIAlertController with UITextfield does not display Title and Message

时光总嘲笑我的痴心妄想 提交于 2019-12-23 10:58:17
问题 Please help me with below issue. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Check" message:@"What was the value collected?" preferredStyle:UIAlertControllerStyleAlert]; [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) { textField.keyboardType = UIKeyboardTypeNumberPad; textField.placeholder = @"What was the value collected?"; }]; [alertController addAction:[UIAlertAction actionWithTitle:@"Submit" style

Remote web application debugging not working in ios 8 beta

允我心安 提交于 2019-12-23 10:28:21
问题 I am trying to debug a web application under ios 8 beta on a simulator. Running the latest version of safari (Version 7.0.6) and Xcode, but all I am able to see is "No Inspectable Applications" in safari. Any suggestions ? 回答1: You need the latest nightly build of Safari. Get it here: http://nightly.webkit.org 来源: https://stackoverflow.com/questions/25245575/remote-web-application-debugging-not-working-in-ios-8-beta