我在 alertview 中有问题。最初我的 alertview 中有 6 个按钮。然后我不得不在我的 alertview 中添加两个按钮。当我添加两个按钮时,框架大小成为问题。
请参考截图..
-(IBAction)FilterButton:(id)sender
{
UIAlertView *alert1 = [[UIAlertView alloc]
initWithTitle:nil
message:@"\n\n\n\n\n"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Customer",@"Contact",@"Lead",@"Team Member",@"Ex-Team Member",@"Inactive Customer",@"All Contacts",nil];
[alert1 show];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
switch (buttonIndex) {
case 1:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where ContactType = 'CUS' and isDeleted ='0';"];
[self selected];
break;
}
case 2:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where ContactType = 'CT' and isDeleted ='0';"];
[self selected];
break;
}
case 3:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where ContactType = 'LD' and isDeleted ='0';"];
[self selected];
break;
}
case 4:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where ContactType = 'TM' and isDeleted ='0';"];
[self selected];
break;
}
case 5:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where ContactType = 'ETM' and isDeleted ='0';"];
[self selected];
break;
}
case 6:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where ContactType = 'INACUS' and isDeleted ='0';"];
[self selected];
break;
}
case 7:
{
qsql = [NSString stringWithFormat:@"select * from pu_Contacts where isDeleted ='0';"];
[self selected];
break;
}
}
}