参考:http://www.cnblogs.com/xiaodao/archive/2012/07/12/2588582.html
首选,实现UIAlertView的Delegate ,UIAlertViewDelegate。
实现:
- (void)willPresentAlertView:(UIAlertView *)alertView
在这个方法里修攺布局简洁,方便,需要在这个方法中找到需要修攺的视图的tag
通过viewWithTag,得到view,再重设其frame,即可重布局需要修攺的视图
查找需要修攺的view的tag:
for (UIView * temp
in [alertView subviews]) {
NSLog(@"The Alert Subview Object:%@", temp);
}
注意:在打印出来的log,按钮是这样UIThreePartButton,通过一般的 [[temp class] isSubclassOfClass:[UIButton class]],无法得到button
Demo URL: http://download.csdn.net/detail/take8619702/4698646