Adding Text Field inside UIAlertView

February 18, 2011 § Leave a comment

Adding form text field into an alert window on iOS is a popular UI pattern. It’s a very handy feature to achieve good user experience by asking a simple input without any click on the same screen. The best use is iPhone app to ask for user password and to log into iTunes app store for app purchase.

To add a form text field inside UIAlertView is tricky. Technically it is easy. However Apple reserves the right to use Private API for its own native app design. Developer would have to work more in order to achieve the same feature.

If you use these Objective-C methods to insert a Text Field inside UIAlert, your app will get rejected by Apple review team.

The following non-public APIs are included in your application:
addTextFieldWithValue:label:
textFieldAtIndex:

“3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.”

I’ll share how to add Text Field without using these private API methods.

Advertisements

Where Am I?

You are currently viewing the archives for February, 2011 at Web Builders.