1

I am adding UIButton to UIAlertView as below

iOS 5 app

it is fine with iOS 6 and below now in iOS 7 it comes like this

iOS 5 app in iOS 7 device

Please let us know the way to resolve this issue.

Umang
  • 107
  • 7

2 Answers2

2

You can't add any view as a sub view in alert view as per the IOS 7 standard. please refer apple document. (UIAlert view customization not possible in IOS 7)

Please refer: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/UIAlertView.html#//apple_ref/doc/uid/TP40012857-UIAlertView-SW1

Ganapathy
  • 4,594
  • 5
  • 23
  • 41
  • We have already tried to add UITextField which is working fine but UIButton is not working as expected. – Umang Sep 26 '13 at 13:03
  • @Umang: You got lucky with the text field. ("Lucky" might not be the right word, considering your app is going to get rejected for doing it.) – cHao Dec 16 '13 at 14:33
0

You can find the answer on this link

But this is wrong approach , you can see this on same link

Alertview should only use to show below details

  • Be immediately informed of critical information

  • Make a decision about a course of action

For above task you should use pickerview or tableview depends on the requirement.

Hemant Singh Rathore
  • 2,153
  • 1
  • 24
  • 38