SCLAlertView-Swift icon indicating copy to clipboard operation
SCLAlertView-Swift copied to clipboard

It does not work when use the AlertView in the present ViewController

Open cloud-hot opened this issue 10 years ago • 5 comments

When i use the SCLAlertView in the presented ViewController it will not work.

And then i change the code from:

let rv = UIApplication.sharedApplication().keyWindow.subviews.first as UIView

to

let rv = UIApplication.sharedApplication().keyWindow.subviews.last as UIView

then it works!

cloud-hot avatar Jan 18 '15 13:01 cloud-hot

My sight is not so good, but the statements look identical.

On Jan 18, 2015, at 8:45 AM, wenjiez [email protected] wrote:

When i use the SCLAlertView in the presented ViewController it will not work.

And then i change the code from:

let rv = UIApplication.sharedApplication().keyWindow.subviews.last as UIView to

let rv = UIApplication.sharedApplication().keyWindow.subviews.last as UIView then it works!

— Reply to this email directly or view it on GitHub https://github.com/vikmeup/SCLAlertView-Swift/issues/38.

daviddelmonte avatar Jan 18 '15 13:01 daviddelmonte

Sorry, i have updated the comment. Thanks!

cloud-hot avatar Jan 19 '15 00:01 cloud-hot

This occurs for me as well. But only when using a transition manager.

willsr avatar Apr 12 '15 11:04 willsr

@cloud-hot I had the same issue as you did and your fix works perfectly for me, thank you!

cqin5 avatar Apr 19 '15 15:04 cqin5

@vikmeup , could you help check whether this is a bug or has it been fixed on the new version? Thanks!

cloud-hot avatar Apr 22 '15 05:04 cloud-hot