Siva Sonai
Siva Sonai

Reputation: 105

how can i make my iphone app to Supporting Multiple iOS Versions and Devices in swift programmatically using device screen size

Here i try this swift code for to make support all versions and devices but it not works otherwise it shown black display on simulator.

 var systemVersion = UIDevice.currentDevice().systemVersion;


    if(ver >= 7)

    {

        NSLog("Version number above 6");                      

        let screenWidth = self.view.bounds

        let screenHeight = self.view.bounds


        if ((screenSize.width == 320.00) && (screenSize.height == 480.00))          

        //Modify for 5 Screen Size

        if((screenSize.width == 320.00) && (screenSize.height == 568.00))

        {

            NSLog("6+ Device");

            self.view = UIView(frame: CGRectMake(0, 503, 320, 50)) // To allign bottom buttons

        }

Upvotes: 0

Views: 705

Answers (1)

nisar
nisar

Reputation: 1065

Yes you can use auto layout to support all devices screen size link, A app it can support default all version. Are you using which version of xcode? If you are using 6.1.1 then It support 4.3 to upto 8.1,So don't think about it.

Upvotes: 1

Related Questions