0

I wanted to present a semi-transparent modal view.
From many other stackoverflow posts, (eg Transparent Modal View on Navigation Controller)
It seems common approach to this is

Create a view,
Add the view to some superview with animation,

instead of using pushModalViewController.

On second thought, I realize there is UIAlertView,
and it seems to satisfy the requirement (semi-transparent modal view).
Since UIAlertView is a view(you can make the view transparent),
and it is modal(prevents user from doing anything else) by nature.

I haven't looked at UIAlertView closely but why do people bother with creating own view and animation.

Is there a limitation of UIAlertView that forces many people to avoid it for this purpose?

Thank you

Community
  • 1
  • 1
eugene
  • 39,839
  • 68
  • 255
  • 489

1 Answers1

0

I think it is because you would be forced to delete and customize the items that are present on the UIAlertView and you can't know for sure how the memory and other elements may react to that. In the end it is finally easier and more secure just to do a new modalView with the elements you have and not mess around with UIAlertView, plus if you want to use the UIAlertView way you would have to do everything programmatically while there are ways to configure the modalView on IB.

Jose Luis
  • 3,307
  • 3
  • 36
  • 53