Я передаю массив (который поступает из базы данных) в лист действий. Я добавил кнопку отмены, но она не отменяется. Она показывает массив ошибок за пределами границ. Вот мой код:
UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"Chatting Apps" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles: nil];
for (int i =0;i<self.arrOfAppNames.count;i++) {
[actionSheet addButtonWithTitle:[[self.arrOfAppNames objectAtIndex:i]objectAtIndex:1]];
}
[actionSheet addButtonWithTitle:@"Cancel"];
actionSheet.cancelButtonIndex = [self.arrOfAppNames count];
[actionSheet showInView:self.view];
UIActionSheetDelegate
методов. 16.08.2014