Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding items to table view in popover
    primarykey
    data
    text
    <p>In my application I have the array, which create in Main_View_Controller from json response in loop: <strong>Main_View_Controller.m</strong></p> <pre><code>NSMutableArray *Cities = [[NSMutableArray alloc] init]; while (ItemsFromParsedResponse = (NSDictionary *)[enumerator nextObject]) { AppDelegate *dataCenter = (AppDelegate*)[[UIApplication sharedApplication] delegate]; dataCenter.CityLabel = [ItemsFromParsedResponse objectForKey:@"label"]; [Cities addObject:dataCenter.CityLabel]; dataCenter = nil; } AppDelegate *dataCenter = (AppDelegate*)[[UIApplication sharedApplication] delegate]; dataCenter.CityInfo = Cities; </code></pre> <p>This array must be presented in Popover, containing TableView. I've trying to delegate array to popover same like delegate it to AppDelegate, but it's not work. If I read dataCenter.CityInfo in my CityList_Popover_Contoller, it has nil value.</p> <p><strong>CityList_Popover_Controller.m</strong></p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {//some standard code AppDelegate *dataCenter = (AppDelegate*)[[UIApplication sharedApplication] delegate]; cell.textLabel.text = [dataCenter.CityInfo objectAtIndex:indexPath.row]; [tableView reloadData]; return cell; } </code></pre> <p>How can I load CityInfo only if it is not-nil? And how can I tracking changes in this array and dynamically update table content according new data in array?</p> <p>Sorry if my question too simple, but I spent a lot of time to make it work.</p> <p>Thanks for any advice!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload