【发布时间】:2011-11-14 09:40:28
【问题描述】:
嗨,我想在大字体上显示我的 alertview 消息,以便用户在我运行时可以正确阅读,但它只向我显示如何根据 ipad 重新调整消息的字体我尝试这个,但它对我不起作用我的代码帮助我解决这个问题
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
UIAlertView* alert=[[UIAlertView alloc] initWithTitle:@"Flight Search" message:@"Please select both outbound and inbound flights" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
//UIAlertView* alert = [[[UIAlertView alloc] init]initWithFrame:CGRectMake(100,0,340,200)];// message:@"Please select both outbound and inbound flights" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
//[alert setTitle:@"Flight Search"];
//[alert setCenter:CGPointMake(160.0f, 240.0f)];
//alert.frame = CGRectMake( 100, 0, 600, 500 );
//[alert setNeedsLayout];
[alert show];
alert.frame = CGRectMake( 0, 0, 340, 200 );
//alert.frame = CGRectMake( 100, 0, 600, 250 );
[alert release];
}
else {
UIAlertView* alert=[[UIAlertView alloc] initWithTitle:@"Flight Search" message:@"Please select both outbound and inbound flights" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
【问题讨论】:
标签: iphone objective-c