Monotouch: 5.1.0 Beta API change in CheckVersion

In beta 5.1, the MonoTouch API for checking the version has changed, now it returns an int .

 UIDevice.CurrentDevice.CheckSystemVersion(5,0,0); 

I can not understand what int means. Before he was a bool .

+4
source share
1 answer

This was a mistake, and it was noted in the release notes for 5.1 :

This is a temporary regression in beta, it will be returned to signature 5.0 in the next version.

The idea behind the int version was to let the code do things like:

 if (CheckSystemVersion (5, 0, 1) >= 0) { // set backup bit } 
+2
source

Source: https://habr.com/ru/post/1384194/


All Articles