1

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?

Marc W
  • 19,083
  • 4
  • 59
  • 71
Kurt
  • 137
  • 1
  • 7

2 Answers2

2

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

Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
0

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
  • 19,083
  • 4
  • 59
  • 71