1

这里我的问题是如何减小 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];    
4

2 回答 2

0

设置你的alert.frame = CGRectMake(0, 20, 50, 50); 并使用简单的消息而不是使用 alert.message = @"\n\n\n\n\n\n\n\n\n";

例如:

alert.message = @"my message";

或使用下面的 UIAlertView 委托来设置框架

- (void)willPresentAlertView:(UIAlertView *)alertView{

    alertView.center =  your own CGPoint;
}
于 2012-08-08T12:51:24.353 回答
0

消除

alert.message = @"\n\n\n\n\n\n\n\n\n";
于 2012-08-08T12:47:01.253 回答