自定义UIAlertView的高度

原文网址 http://iphonedevteam.blog.163.com/blog/static/20936702520130179922817/


- (void)layoutSubviews{

CGRect rect = self.bounds;
    rect.size.height = 200;
    self.bounds = rect;
    //重新设置确定,返回按钮的位置。
    for(UIView *subview in [self subviews]) {
        if([subview isKindOfClass:[UIControl class]] ) {
            CGRect frame = subview.frame;
            frame.origin.y = 180;
            subview.frame = frame;
        }
    }
}

你可能感兴趣的:(自定义UIAlertView的高度)