Monday, September 29, 2014

find ios Version

Finding the IOS version on a device programatically.

key here is to use the NSFoundationVersionNumber  and compare it with the in built NSFoundationVersionNumber_iOS_7_1  or what ever other ones you want to compare.

For my need i am just checking to see if the IOS version is atleast 8 and above..

-(bool) isOSAtleastVersion8{
     bool is_IOS8=false;
     if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1)
     {
        is_IOS8=true;
     }
     else
     {
           is_IOS8=false;
     }

 return is_IOS8;
}
-- Bobby

IOS 8.0.2 navigationcontroller pushviewcontroller delay/slow

strange issue noticed while upgrading the app to IOS 8.0.2 with xcode 6.

App which moves between viewcontrollers, started getting lag when using the navigationcontroller.pushviewcontroller

It was working fine till IOS 7.1

Here is a temporary fix for now.. had to make the animated:NO instead of animated:YES and the screens are showing now without any delay.

working code till 7.1:
[self.navigationController pushViewController:vhome animated:YES];

had to be changed to
[self.navigationController pushViewController:vhome animated:NO]; to remove the delay while presenting the new screen in IOS 8.0.2

Will update this code once i figure out the issue.

-Bobby