i ve проблема в alertview .. Первоначально у меня было 6 кнопок в моем предупреждении. Затем мне пришлось добавить еще две кнопки в мое предупреждение. Когда я добавил еще две кнопки, размер кадра становится проблемой ..Как разместить 8 кнопок в UIAlertView
Пожалуйста, обратитесь скриншот ..
-(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;
}
}
}
скриншот .... – Fogmeister
@Manoj Зачем останавливаться на 8? – SK9
Лучше, чтобы у вас было больше возможностей в alertview и, соответственно, используйте таблицу действий, чтобы отобразить остальные параметры. В соответствии с стандартами кодирования в этом случае пользовательский интерфейс будет довольно запутанным. –