iOS- How can I get UIAlertView width with customize and put the UILabel to center
问题 I was custom the UIAlertView , I need add some component to the alertView (like label, tableview). But I have a question. I need to know the alertView's width. I try to add self.frame.size.width , but I just got the 0.000000 . How can I get the alertView's width? I will calculate to put the subview at, and put the UILabel to subview to center. My partial code below: .h file: #import <UIKit/UIKit.h> @interface CustomTableViewAlert : UIAlertView -(instancetype)initWithTitle:(NSString *)title