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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to