I have a UITableView which is declared like this in my .h file:
@interface EnterInviteCodeController : UIViewController
@property (weak, nonatomic) IBOutlet UITableView *itemList;
@end
And then I declare it like this in my .m file
#import "EnterInviteCodeController.h"
@interface EnterInviteCodeController ()
@property (nonatomic, retain) NSArray *items_array;
@end
@implementation EnterInviteCodeController
@synthesize itemList; // UITableView
But when I try to populate the list, no items show up. Here is how I populate the list. I make a remote call to a server to get the items. And then when the server comes back with data, I try to do this:
items_array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
[self.itemList reloadData];
dispatch_sync(dispatch_get_main_queue(), ^{
[self.itemList reloadData];
});
But the data does not show up. Would anyone know what I am missing here?
Thanks!