-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work on iOS 4 #2
Comments
Confirm |
As a replacement you can use http://github.com/erica/iphone-3.0-cookbook-/tree/master/C10-Alerts/03-Soliciting%20Text/ |
Would be great if someone solves this issue without using a totally different implementation. I'd prefer getting it to work. |
The text input issue has to do with the UITextField being a subview of the EGOAlertTextFieldBack. The fix is to add the backView as a subview of the alertView, and add the textView as a sibling positioned atop it. You'll have to do a little bit of finangling with the geometry, but it's not terribly difficult. Re: the positioning of the alertview itself, just delete the line: |
Brilliant! That fixes it. Thanks. |
Anyone who is using this class and needs an iOS 4 fix, here is my fork of the class. Fixes text input issue and the positioning weirdness. http://github.com/josecastillo/EGOTextFieldAlertView Caveat: to fix the latter issue, I added a bigger delay from the [alert show] to the keyboard appearing. See comments in -show if you wanna take a stab at something more clever. |
josecastillo's fix was working great for iOS 4, but it stopped working on 4.3 and on iPad 4.2+. I have no clue why, but the text boxes wont move up with the alert when the keyboard appears.... any ideas? |
Gonso, I found a fix for josecastillo's EGOTextFieldAlertView. In EGOTextFieldAlertView.m, it is detecting the wrong Y offset due to a new UIImageView in the UIAlertView subviews. Therefore, replace:
with:
And all works as before. Best, |
I managed to hack Tom Swift's UIAlertView re-implementation. I added iOS 3 backward compatibility and multiple UITextField API :) https://github.com/bitzeppelin/TSAlertView |
The textfield issue was fixed by changing -layoutSubviews in .m: if (![view isKindOfClass:[UIControl class]]) to if (![view isKindOfClass:[UIControl class]] && ![view isKindOfClass:[UIImageView class]] && ![view isKindOfClass:[EGOAlertTextFieldBack class]]) |
When build for iOS 4 the alert view is displayed too high and text input does not work.
The text was updated successfully, but these errors were encountered: