Note that there are some explanatory texts on larger screens.

plurals
  1. POTableview controller does not show strings from NSMutableArray source
    primarykey
    data
    text
    <p>I am beginning with iOS have a silly problem. I just want to show a TableView populated with strings that are stored in a NSMutableArray. I can see that the strings are in the array, but for some reason the TableView is not showing them.</p> <p>I have bascially this:</p> <pre><code>@interface Test () @property (weak, nonatomic) IBOutlet UITableView *contactList; @property (strong, nonatomic) NSMutableArray *contactsArray; @end - (void)onContactFound:(NSString*)contact { [self.contactsArray addObject:contact]; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [self.contactsArray count]; } //4 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //5 static NSString *cellIdentifier = @"SettingsCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; //6 NSString *tweet = [self.contactsArray objectAtIndex:indexPath.row]; //7 [cell.textLabel setText:tweet]; [cell.detailTextLabel setText:@"via Codigator"]; return cell; } </code></pre> <p>I think the problem is in the last part. I copied this code from an example (<a href="http://www.codigator.com/tutorials/ios-uitableview-tutorial-for-beginners-part-1/" rel="nofollow">http://www.codigator.com/tutorials/ios-uitableview-tutorial-for-beginners-part-1/</a>) that said I should add some dynamic properties but in my TableView I do not have these properties in the attributes inspector so basically I do not have the @"SettingsCell" so I guess this is one of the problems at least, maybe this code does not apply in my case and it should be done in another way?</p>
    singulars
    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.
 

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