Deprecated iOS6 Methods in Monotouch

Our app targets ios5.1 right now. And after installing MT 6.0.2, outdated warnings populated the build logs. Should obsolete methods be stored in the source or should be replaced?

For example, should you replace the following:

public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
    switch(toInterfaceOrientation) {
        case UIInterfaceOrientation.LandscapeLeft:
        case UIInterfaceOrientation.LandscapeRight:
            return true;
        default:
            return false;
    }
}

with

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations ()
{
    return UIInterfaceOrientationMask.Landscape;
}

or have both overridden methods in the code base?

+1
source share
1 answer

There are several reasons for obsolete methods. The message you get from compiler warnings will tell you why the method is deprecated . IOW iOS deprecated methods are a subset of their deprecated methods.

iOS, Apple API. , API:

  • - /;
  • - ( iOS), iOS ( , );

, , . , . .

  • /​​, iOS6 , API ( ),

  • , iOS (, 5.1), , , API , , , (, iOS6, ...).

  • iOS 4.2, API, 4.0, 3.2... , API.

ShouldAutorotateToInterfaceOrientation iOS5.1, iOS6. , , API, iOS 5.x.

( ), iOS6 , iOS5 . . ( API), - API iOS.

+4

All Articles