views:

95

answers:

2

So my app was rejected (it has been approved every other time i have put it in for review and I hadn't touched this code path in ages) or this line:

[myAlert addTextFieldWithValue:nil label:NSLocalizedString(@"Name",@"Name")];

Apparently addTextFieldWithValue:label: is a private API... so how are we supposed to put a UITextField inside an AlertView?

Can someone help?

A: 

You don't. Alert views are for displaying alerts only. Apple uses them to display text fields sometimes, but that's their prerogative (since they wrote the HI guidelines and all).

Find a different approach in your UI for prompting the user for data. This is a mobile platform, not a desktop. Using popups like this for information gathering on such a platform is usually inappropriate.

Marc W
+2  A: 

Consider using a modal view controller, instead. No risk of app rejection.

Alex Reynolds