fastred / AHKActionSheet

An alternative to the UIActionSheet inspired by the Spotify app.
MIT License
1.16k stars 130 forks source link

keyboard open while presenting.. #26

Closed wdcurry closed 9 years ago

wdcurry commented 9 years ago

This is a minor irritant, but the alert is display under the keyboard while presenting. I am currently ending edits prior to display, but this is disruptive to the user's experience if they cancel.

Have i missed a setting somewhere?

fastred commented 9 years ago

Thanks for reporting this.

Could you see if setting:

self.window = UIWindowLevelAlert;

in https://github.com/fastred/AHKActionSheet/blob/master/Classes/AHKActionSheet.m#L398 helps?

wdcurry commented 9 years ago

thank you.. this worked:

    self.window.windowLevel = UIWindowLevelAlert;
wdcurry commented 9 years ago

and btw, this just makes tons of difference to a few other workflows as well, many thanks for the quick reply.

fastred commented 9 years ago

Great, I'll add this to the main repository. What specific workflows did you mean?

wdcurry commented 9 years ago

I referred my own ui actions that involved user interaction to confirm various items... those were not hindered by the keyboard in the way that prompted this question. Again thank you.

wdcurry commented 9 years ago

This has reared its' ugly head again. Not sure exactly when, but one of the updates seems to have pushed the action sheet behind the open kb again.

wdcurry commented 9 years ago

This is apparently not related to this git.. and i am researching a solution in what might be the problem area. My apologies ;)

wdcurry commented 9 years ago

For reference: self.window.windowLevel = 10000001; will correct this issue.

fastred commented 9 years ago

I rethought this and I'm not going to change that behavior. Keyboard hiding should be handled outside of the action sheet itself.

Motivation: It's not possible in AHKActionSheet, but for example in UIAlertView (old API) or UIAlertController it's possible to show alert with text field. Keeping keyboard behind wouldn't make much sense.

My advice: you can fork the repo and keep your changes in the fork. If you're using CocoaPods you can point the Podfile to your repo with this syntax:

pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git'

Thanks!

wdcurry commented 9 years ago

It is definitely your call my friend, but one peek at iMessage and you will see their equivalent functionality leaves the kb alone, drops the action sheet on top of it, and when cancelled, the kb is exactly as it was. The only diff is that Apple up'd the AlertLevel's value, which you can easily circumvent as i have shown. I will let it rest as i have reclaimed normal behaviour ;) cheers!