after I update Xcode from 4.1 to 4.2, UIAlertView's others button can't display correctly.
and when I debug, the Rename button is UIAlertButton class and its frame is frame = (0 0; 0 0); could you give a hand?
after I update Xcode from 4.1 to 4.2, UIAlertView's others button can't display correctly.
and when I debug, the Rename button is UIAlertButton class and its frame is frame = (0 0; 0 0); could you give a hand?
UIAlertView just behave very badly when being subclassed. Apple seems to try to make it nearly impossible to subclass it.
But there are ways around it. The best one: A UIAlertView replacement — a view, that recreates the features of UIAlertView, without being one. TSAlertView is such a replacement.
For iOS 5 the alertViewStyle
might help you.
I think the fast way to fix that may like it's:
alert = [[YourSubclassOfUIAlertView alloc] initWithTitle:@"Change my name"
message:@"From now on, I want to know as:\n\n" /* Add \n\n to expand the UIAlertView space */ delegate:.....
BTW: @vikingosegundo was right. And you will find this post usefull: Customizing UIAlertView