support for uialertview with text field - iphone

Does anyone know whats the solution for pre iOS5 if I want to show a pop UIAlertView with a text field? A solution that would be acceptable by Apple?
Thanks.

Sure, I have a pre-iOS5 app in the App Store with such a text field.
Just add the text view as a subview to the alert view and figure out the spacing by inserting an appropriate amount of \n into the message to make room for the field.

Related

UIAlertView - accessing subviews, scrolling

I am implementing something like Eula in my iPhone app. I need to enable the confirm button only when user reads whole Eula (scrolls along whole long text).
I am using UIAlertView, with long inside text. Thanks to this, the text field inside alert view have a scroll bar on its right side.
I need to access the delegate of this scroll, because I need to enable OK button only if user scrolls down with scrollable text.
If you are planning to release this app on the AppStore, you can't do it using the builtin UIAlertView.
UIAlertView doesn't have any method, and it's delegate protocol doesn't give you this kind of information.
Probably you can achieve this iterating through the subviews of the UIAlertView instance, but doing this will guarantee your app the rejection :-)
the only thing you can do is to create your own "MYAlertView" component

Apple concern over customized UIAlertView in iPhone Application

I have used UIAlertview in the iPhone application that is customized a little bit.I have added three buttons in the UIAlertview and some text in between two buttons.
Please let me know if apple have any concerns if UIALertView is customized with text in between two buttons.
UIAlerView screen is as described below,
Title Alert Message
First Button
Second Button
(Text message)
Cancel Button
I cant attach image here as i need to get more than 10 reputation points here.
Thanks in advance.
In my experience I've had no issues with modifying UIAlertViews in any way. I don't think Apple will care.

can I put a scrollable text field on a uialertview?

I am needing to alert something for an answer for a trivia game iOS app I am writing. I have an alert view that pops up and shows a scrollable uitextview...is Apple going to ding me for that? What are my options for showing large amounts of text in my alert?
Thanks!!
I think that showing UITextView is ok. Moreover it seems that Apple actually does the same thing - if you try to display very long text in UIAlertView then it will be displayed in scrollable UITextView automatically
P.S. and it also uses UITableView instead of buttons if you set too many button names.

Remove keyboard or place Picker View on TOP of keyboard

Anyone has any idea how one can achieve the same look as when you press on the "From:" in the Mail iphone app when you have more than one user account.
I'd like to remove my keyboard, but WITHOUT animating it. Rather just disappear and instead of it have a UIPickerView appear.
Thanks much!
Since iOS 3.2 you can set the inputView property of a UITextField to a custom view. This view is then shown instead of the keyboard as input for that view.
There's no way to achieve this before iOS 3.2 I know.
UITextField Class Reference

Reset UITextField's original placeholder text

I'm adding some user feedback mechanism into my app. The user types some comments into a text field and when that editing is done it updates a UITextView. Then when the user hits the submit button and moves on in the app the user may have need to send more feedback from the same form for a different item. I can reset the other fields and labels in the app to their default values when I hide the view, but not the textField (?). How can I reestablish the placeholder text next time the user accesses this view?
Your suggestions are humbly appreciated.
EDIT:
Thanks to Dwaine. Apparently I had the [textField setText:nil]; in the wrong place. Placing it in my textFieldDidEndEditing worked fine. Also, I was using the Did End on Exit rather than Editing Did End in Interface Builder which screwed things up.
In either the ViewWillAppear or ViewDidAppear (I'd suggest ViewWillAppear) function, set the text value of the UITextField to...nil I think...or just an empty string...
That should make the Placeholder Text show up again I think ^^