ios9

Refactored storyboard fails to compile XCode7

邮差的信 提交于 2020-01-02 05:59:12
问题 I've decided to split the my (quite complex) storyboard into smaller chunks using the new "Storyboard refactor" feature in XCode7. I've started with one tab and refactored all the controllers within that tabbed navigation controller into separate file. But the storyboard fails to compile with "Storyboard References cannot be the destinations of relationship segues prior to iOS 9.0" . Now I've read that storyboard references should be deployable to iOS8 (which is our deployment target)

Xib file: Can't drag a View from a xib file to a swift file

我与影子孤独终老i 提交于 2020-01-01 18:04:11
问题 I just dragged and dropped a View to a xib file. I added some constrains and tried to Ctrl drag from the View to a .swift file with the assistant editor, but it bounce back, what am I missing? 回答1: The xib file needs to be a subclass of the file you are trying to ctrl+drag to. 回答2: I was setting the View's custom class instead of the File's Owner. Once I set the File's Owner to the custom class, I was able to control-drag from the view in the storyboard over to my class. Hope this helps

Nested Closures in Swift 2.1

别说谁变了你拦得住时间么 提交于 2020-01-01 14:36:58
问题 I want to clear about Nested Closures in Swift 2.1 Here I declare a nested closure, typealias nestedDownload = (FirstItem: String!)-> (SencondItem: String!)->Void Then I use this nestedDownload closure as a parameter of the following function and try to complete the compliletion parameter value in function like as func nestedDownloadCheck(compliletion:nestedDownload){ compliletion(FirstItem: "firstItem") } But this says the error, " Expression resolves to an unused function " Also , when I

Nested Closures in Swift 2.1

核能气质少年 提交于 2020-01-01 14:36:50
问题 I want to clear about Nested Closures in Swift 2.1 Here I declare a nested closure, typealias nestedDownload = (FirstItem: String!)-> (SencondItem: String!)->Void Then I use this nestedDownload closure as a parameter of the following function and try to complete the compliletion parameter value in function like as func nestedDownloadCheck(compliletion:nestedDownload){ compliletion(FirstItem: "firstItem") } But this says the error, " Expression resolves to an unused function " Also , when I

Nested Closures in Swift 2.1

拈花ヽ惹草 提交于 2020-01-01 14:36:13
问题 I want to clear about Nested Closures in Swift 2.1 Here I declare a nested closure, typealias nestedDownload = (FirstItem: String!)-> (SencondItem: String!)->Void Then I use this nestedDownload closure as a parameter of the following function and try to complete the compliletion parameter value in function like as func nestedDownloadCheck(compliletion:nestedDownload){ compliletion(FirstItem: "firstItem") } But this says the error, " Expression resolves to an unused function " Also , when I

Facebook Login does not return to App with Xcode 7 iOS 9

左心房为你撑大大i 提交于 2020-01-01 10:57:10
问题 I have implemented this method for Facebook Login in the App Delegate using Xcode 7 and it works perfectly: - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options { return [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; } However, since I need to use Xcode 6 to submit my app to the

WKWebView loadFileURL works only once

微笑、不失礼 提交于 2020-01-01 08:48:03
问题 I need to load a local file in a WKWebView. I'm using the new ios9 method - (nullable WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL It works perfectly for the first load (navigation delegation is properly called), but if I try to load a new and different file, it does nothing. The URL for the currentItem in the wkwebview instance is modified. But if I force a reload the delegate method didFinishNavigation is called with the previous set URL. I also

iOS 9 UI Testing - Test Fails Because Target Control Isn't Available (yet)

放肆的年华 提交于 2020-01-01 06:38:28
问题 I am testing the new UI testing functionality of Xcode 7 (introduced in the WWDC 2015 video "UI Testing in Xcode"). On launch, my app animates a "login panel" into view, by updating the value of its vertical layout constraint: the panel slides up into view from beneath the main view (off screen). The panel contains two text fields, for user name and password . When you tap the return key on the keyboard for the user name text field (labeled "Next"), the password textfield becomes first

does NSURLSession send user-agent automatically

旧巷老猫 提交于 2020-01-01 03:39:07
问题 Does NSURLSession send user-agent automatically when user WatchKit 2.0, iOS 9.0? Is there a way to verify this within the WatchKit app? 回答1: Yes, a user agent is automatically provided as part of the default session configuration. The default NSURLSession request header User-Agent field includes the Bundle Name ( CFBundleName ) and the Build Number ( CFBundleVersion ) of your watchOS app extension: $(CFBundleName)/$(CFBundleVersion) CFNetwork/808.3 Darwin/16.3.0 Notice that your app's Version

Custom Unwind Segue for iOS 8 and iOS 9

僤鯓⒐⒋嵵緔 提交于 2020-01-01 03:33:10
问题 My question is, how do I get the following custom unwind segue to work on a device with a version prior to iOS 9 as well as on a device running iOS 9? I have a Custom Segue showing a view controller, and then have a corresponding Custom Unwind Segue. This code has worked fine in iOS 8, and is implemented by creating subclasses of UIStoryboardSegue and implementing the perform method. Then I override the following method in my custom Navigation Controller: - (UIStoryboardSegue *)