话不多说 直接上代码
NSString * message = @"sfsdsdfssfsdfsdfsdsafwerwokomibonosmfossfwe";
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"温馨提示" message:message delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil];
alertView.alertViewStyle = UIAlertViewStyleDefault;
UIAlertController *alertVC = [alertView valueForKey:@"_alertController"];
NSArray *subViews = alertVC.view.subviews[0].subviews[0].subviews[0].subviews[0].subviews[0].subviews;
UILabel *titleLb = subViews[1];//title
UILabel *messageLb = subViews[2];//message
messageLb.textAlignment = NSTextAlignmentLeft;
[alertView show];
网友评论