可以创建一个UIAlertview:
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Title Here" message:@"Message here" delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
[alert setDelegate:self];
[alert show];
[alert release];
如果调整框架:
- (void)willPresentAlertView:(UIAlertView *)alertView {
alertView.frame = CGRectMake(20.f, 200.f, 280.f, 93.f);
NSArray *subViewArray = alertView.subviews;
for(int x=0;x<[subViewArray count];x++){
if([[[subViewArray objectAtIndex:x] class] isSubclassOfClass:[UILabel class]])
{
UILabel *label = [subViewArray objectAtIndex:x];
label.textAlignment = UITextAlignmentLeft;
}
}
}
在这句 alertView.frame = CGRectMake(20.f, 200.f, 280.f, 93.f) ; 是CGRectMake(X坐标, Y坐标, 宽, 高)。修改数值应该就可以了。