iOS 9 features in iOS 8 targeted projects with swift #availability check
iOS 9 features in iOS 8 targeted projects with swift #availability check
- Subject: iOS 9 features in iOS 8 targeted projects with swift #availability check
- From: Sasikumar JP <email@hidden>
- Date: Sun, 16 Aug 2015 21:50:11 +0530
Hi,
I have an existing iOS application which is supports from iOS 8. i want
to add new features only for iOS 9.
I have created a new storyboard for iOS 9(Main.storyboard) which is using
the iOS 9 features like UIStackView. Appropriate storyboard file is
instantiated based on the Device OS version.
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) ->
Bool {
let storyboard: UIStoryboard
if #available(iOS 9, *, *) {
storyboard = UIStoryboard(name: "Main", bundle: nil)
} else {
storyboard = UIStoryboard(name: "MainOld", bundle: nil)
}
let mainViewController =
storyboard.instantiateInitialViewController()
window?.rootViewController = mainViewController
window?.makeKeyAndVisible()
return true
}
But i am getting compilation error on Main.storyboard "UIStackView before
iOS 9.0"
I am using Xcode 7 beta 5.
How to use the iOS 9 related features on the iOS 8 supported projects using
Swift 2 #availability check
Regards
Sasikumar JP
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden