wimagguc / ios-custom-alertview

Custom UIAlertView. Continue adding images and UIViews to dialogs in iOS7+
Other
1.66k stars 394 forks source link

AlertView should be attached to the frontmost window, not a view #9

Closed sbandol closed 11 years ago

sbandol commented 11 years ago

Hello,

In the current implementation the alertView is attached to a view which is not the expected behavior from an alert. This is a problem in those case when there is a visible keyboard on the screen . Check this screenshot: https://www.dropbox.com/s/xufacehfgi1dbfq/Screenshot%202013-09-30%2015.19.17.png

The alertView should be attached to the front most window. Something like: [[UIApplication sharedApplication].windows.lastObject addSubview:self]; This way the parentView is not needed anymore.

Cheers, StaS

wimagguc commented 11 years ago

thanks StaS, an experimental version is added now. please let me know if you have any issues with the implementation.