문제

I have 2 UIWindows, when I show both UIWindows the latest shown UIWindow always is above the 1st shown UIWindow. Each UIWindow is an own UIWindow, so no Subview.

Does anyone know how i can place a UIWindow behind another UIWindow?

도움이 되었습니까?

해결책

While I suspect there's probably a cleaner, more maintainable way to achieve what you want, you should be able to manipulate the order windows appear using the windowLevel property - although to be honest the last time I tried to do this was on iOS 5 so maybe that's changed. But generally you'd do something like:

windowToPlaceInFront.windowLevel = windowToPutInBack.windowLevel + 1.0f;

다른 팁

You cannot have multiple UIWindow inside an app.

From Apple documentation (https://developer.apple.com/library/ios/documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html):

Unless an app can display content on an external device screen, an app has only one window.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top