Bug 23568 - UIWindow.LevelAlert != UIWindowLevel.Alert && UIWindowLevel.Alert != 100
Summary: UIWindow.LevelAlert != UIWindowLevel.Alert && UIWindowLevel.Alert != 100
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.0.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-03 04:51 UTC by outring
Modified: 2015-03-26 09:35 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description outring 2014-10-03 04:51:03 UTC
Since 8.0 UIWindow.LevelAlert is obsolete and I switched to UIWindowLevel.Alert and found alerts not showing because they were overlayed by my UIWindow with UIWindowLevel.Alert - 1, which means that it must be under alerts, not over them.

Debug shown that UIWindowLevel.Alert is 2000 instead of 100.
Comment 1 Sebastien Pouliot 2014-10-03 09:02:47 UTC
The new value is correct (match Apple value) in iOS8, i.e. an ObjC app, like this one:

	NSLog (@"UIWindowLevelNormal %f", UIWindowLevelNormal);
	NSLog (@"UIWindowLevelAlert %f", UIWindowLevelAlert);
	NSLog (@"UIWindowLevelStatusBar %f", UIWindowLevelStatusBar);

would show this in Xcode:

2014-10-03 08:58:39.764 Test64[49195:70b] UIWindowLevelNormal 0.000000
2014-10-03 08:58:41.992 Test64[49195:70b] UIWindowLevelAlert 2000.000000
2014-10-03 08:58:42.791 Test64[49195:70b] UIWindowLevelStatusBar 1000.000000


`UIWindowLevelAlert` is not a "real" constant, it's a field that you can query and Apple can return different values in different versions of iOS.

The old (obsolete) code used a C# const values, which made that behaviour impossible. The new code will query the value (from iOS) and will be correct on every version of iOS.

Maybe you issue is related to something else ? can you attach a test case so we can look at it ?
Comment 2 Sebastien Pouliot 2015-03-26 09:35:34 UTC
Please attach a test case and re-open if the above did not help you solve the issue.