I need something what looks like UIAlertView
(same background transparent and not full screen), blocks other UI parts and has some custom content.
This custom content are: two check-boxes with labels and two buttons YES/NO at the bottom.
Sub-classing or customizing UIAlertView
doesn't looks useful (see this answer) and it is dangerous (code can be rejected by Apple). I was thinking to create own custom UIView
(possible with UIViewController
), but I have no idea how to make it look and feel like UIAlertView. I mean I'd like to make it that it changes its appearance dependent on iOS version (iOS7).
update:
I can abandon os version dependency, it would be nice to have, but this is additional feature.
The main question is: is there a good way to make such view which will look and feel like UIAlertView without large amount of work? Customizing UIAlertView
directly looks complicated and dangerous.
Best Answer
I created my own custom view to look like iOS UIAlertView 7. With that technique you can create a custom alert for both iOS 6 and iOS 7. For that, I created a UIView in my xib file of my UIViewController :
I added some @property for this view :
On my viewDidLoad :
Action to display Popup :
Action to dismiss Popup :
So, with that you can configure your
supportViewPopupAction
like you want with buttons, table view, labels, collection view, etc...I spent time to write this example of alert view. I hope this will help you !