ios7 - Check ios versions then call functions of uiviewcontroller accordingly -


I was stuck with the issue of an orientation in the iPad for all the versions. . My app has been removed from willAnimateRotationToInterfaceOrientation: iOS8 according to Apple since such a way that it has made in support of iOS 6 to ios 8

, I used viewWillTransitionToSize:

when problems Hit with, my first solution was to provide the macro as iOS 8 or below to fix the version and execute the work accordingly. Works on

  #ifdef __IPHONE_8_0 //; = Version 8.0 - (minus) Drishyvirssnpadit Krenoke size: Transition size with Koyodinetr: (ID & lt; UIViewControllerTransitionCoordinator & gt;) Coordinator [[Super Drishyviseshntusaijhः size Sathsncharsncharkrta: Coordinator]; // your code goes here for iOS 8} works on #Alse // & lt; Version 8.0 - (minus) willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation period: (NSTimeInterval) period {// my code below to version 8.0 here when} #endif  

I also checked and Run it .. I received as expected output

But it was said that the code was wrong .. I am trying to convert version check into compile-time decision. Verification of the edition should be of a random decision. Both ios7 and ios8 code should be compiled into executable.

So any change to the function below without checking the version:

  - (minus) ViewWillLayoutSubviews {[super Wuwvel Lutsub view] ; // my code, I fail to understand without being here any check version}  

I line "compiled in both two ios7 and ios8 code Should be executable. " - What does this really mean?

Want to know why I should not compile time?

In addition to this, if I want to do it ... without using notification .. Is there any way by which I can do these tasks by calling the verb on the runtime?

Please comment on me


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -