UIActionSheet button text not showing on iOS 8.x

173 views Asked by At

I am using XCode 5.1.1 for my project. The same app in working fine for iOS 7.x. However, on iOS 8, UIActionSheet buttons do not display any text.

Here is the code:

addAttachmentsOptions = [[UIActionSheet alloc] initWithTitle:nil
                                                                           delegate: self
                                                                  cancelButtonTitle: nil
                                                             destructiveButtonTitle: nil
                                                                  otherButtonTitles: NSLocalizedString(@"ID_TAKE_PHOTO_LABEL", nil),
                                                NSLocalizedString(@"ID_CHOOSE_PHOTO_LABEL", nil), nil];

I am aware that iOS 8 doesn't supports UIActionSheet, but I would expect backward compatibility for the already published app.

2

There are 2 answers

0
Sport On BEST ANSWER
0
CW0007007 On

You need to move it over to UIAlertController's. You can use an if/else to determine which to use based on current OS.