jeudi 5 mars 2015

Xcode - calling another method inside "cellForRowAtIndexPath" and keeping the correct sequence

how can i call another method inside "cellForRowAtIndexPath" method and having the right sequence?


in cellForRowAtIndexPath method i have this sequence:



NSLog("First line");

calling another method {Method 1}

NSLog("Second line");


In the other method {Method 1} i have this sequence:



NSLog("First line in Method 1");

//Some code

NSLog("Second line in Method 1");


the output is:



NSLog("First line");

NSLog("First line in Method 1");

NSLog("Second line");

NSLog("Second line in Method 1");


But i want the sequence to be:



NSLog("First line");

NSLog("Second line");

NSLog("First line in Method 1");

NSLog("Second line in Method 1");



Aucun commentaire:

Enregistrer un commentaire