Skip to content

reloadMessagesData is not calling table functions after being called #2

@DanlgArmstrong

Description

@DanlgArmstrong

I have a viewController defined as:
@interface MessageDetailView : AMMessageComposerVC<AMMessageComposerDatasource, AMMessageComposerDelegate>

On viewDidLoad I call a function to load my messages data into:
@Property NSMutableArray *jsonArray;

Here is my loading func:

  • (void)viewDidLoad
    {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    self.amDataSource = self;
    self.amDelegate = self;
    [self getMessages:@""]; // load up jsonArray
    }

  • (void) getMessages:(NSString *) after {
    .... load data ...
    [self performSelectorOnMainThread:@selector(reloadMessagesData) withObject:nil waitUntilDone:NO];
    }

Now the reloadMessagesData is called - I set a breakpoint in that function and it does:
[self.messageTableView reloadData];

But it seems NOT to cause the table to reload. I had breakpoints set in
-(NSInteger) numberOfMessages
{
return jsonArray.count;
}

BUT the only time numberOfMessages fires is BEFORE I have a chance to load jsonArray. It SHOULD also be firing after I call reloadMessagesData.

Do you have any idea why this would not happen?

----confused in Pennsylvania

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions