Reputation: 32103
I have a UIAlertView
that's appearing and blocking input, but the actual "OK/Cancel" is 0×0
at (0, 0)
, so it's not dismissible by the user. Below is my current fix, but I'd much rather be able to tell iOS "Hey! This isn't right. Make it right." So, is there any way for me to reposition or reset the position of a UIAlertView
's frame in iOS?
if (_floatingAlert && // if there is an alert AND...
(_floatingAlert.visible || // ( the alert isn't visible OR...
_floatingAlert.frame.size.height + _floatingAlert.frame.size.width == 0)// The frame is invisibly small )
)
{
[_floatingAlert dismissWithClickedButtonIndex:0 animated:YES];
_floatingAlert = nil;
}
Upvotes: 0
Views: 63
Reputation: 452
Uialertview and uiactionsheet are depreciated and though they still work for now you should consider using uialertcontroller.
I am currently working on a project where I came across a couple comments about what you are looking to do. One option would be to set your class as a uialertcontroller delegate which sounded like gave some control over customizing appearance. The other option would be to create your own view that you customize and present it to a user when you need to alert the user of something.
Upvotes: 1