这里我的问题是如何减小尺寸uilaertview?
谢谢
UIAlertView * alert = [[UIAlertView alloc] initWithFrame:CGRectMake(0,0,320,100)];
alert.title = @"Terms of Service";
alert.message = @"\n\n\n\n\n\n\n\n\n";
alert.delegate = self;
[alert addButtonWithTitle:@"Cancel"];
[alert addButtonWithTitle:@"Review"];
[alert addSubview:textView];
[alert show];
答案 0 :(得分:0)
删除
alert.message = @"\n\n\n\n\n\n\n\n\n";
答案 1 :(得分:0)
设置你的 alert.frame = CGRectMake(0,20,50,50); 并使用简单的信息而不是使用alert.message = @“\ n \ n \ n \ n \ n \ n ñ\ n \ n \ n \ n“个;
例如:
alert.message = @"my message";
或使用下面的UIAlertView委托来设置框架
- (void)willPresentAlertView:(UIAlertView *)alertView{
alertView.center = your own CGPoint;
}