last day (14 days later) » 

11:18 AM
0
A: Duplicate cells are getting created in iOS?

LorenzoCheck the number of elements in the table and be sure the number is correct in the delegate numberOfRowsInSection: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return the_correct_items_number; }

 
number of section return 5 which is the size of array
 
OK, sorry... sometimes this happen but probably is not your case
 
can you suggest me something else by looking at th code
 
The only thing that I can say is If the function is called only 2 times instead 4 , probably there is something wrong in the count of elements in the array (somewhere in your code you change the number of array while your are updating the table) .. but I see you also log the elements count... is very strange....
 
for me also strange.Actually i am reloading the data when data is fetched from the network.
 
11:18 AM
Have you tried to create a simulated array as source... a simple array created in only one point in the code (example in viewdidload)? Just to test if the table is correctly created?
Could be a thread problem
 
i am getting the data from server when i get all the data then i call the function [self.table_view reloadData];
 
try to put your code using the dispatch_async block do you know it?
 
I am using afnetworking
 
Someone had a similar problem... the system is busy into other thread.. I can suggest some post here in stackoverflow
0
Q: UITableView data not appearing in main view using GCD(Grand Central Dispatch)

Ace Munimi've done all the coding where i fetch data using XML and then show that data on the UITableView, data is shown without using the GCD, but when i add the UIActivityIndicator and used the gcd so the ActivityIndicator will show until the all the data hasn't arrive. here's my code: [super viewDidL...

1
Q: Loading data into UITableview using GCD

Samhan SalahuddinThe code below loads data into a UITableView by getting a google news RSS feed parsing the XML and putting it into the view . It works but when i push another view and come back the table view scroll is broken . I have isolated the problem to the GCD code . If i remove it the problem disappears ....

17
Q: dispatch_async and block in iOS

Tunvir Rahman TusherWhat this piece of code mean? dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ TMBaseParser *parser=[[TMBaseParser alloc] init]; parser.delegate=self; NSString *post =nil; NSData *postData = [post dataUsingEncoding:NSUTF8StringEncod...

try to use a local array created at startup (a copy) only for test and avoid the download
if the table works fine with a local array then the problem is related to threads and you should understand very well where to put the dispatch block
 
actullay method is called 5 time now i noticed
but issue is for first 3 time array size is nill
on 4 th & 5 th call it display the size of array
 
11:32 AM
But is this a test result with a local array?
 
no with the array fetched from server
 
OK. I suggest strongly to test your table with a local array because if the problem is in the system threads, probably your code is correct but is executed in more different threads and this can corrupt your data or your table. To be sure our code is correct try to "cut" the asynchronous requests to the server.
 
Ok let me check it would to much time costume to write hard code everything
 
In some my applications I was sure at 100% to manage correctly a label (example mylabel.text=@"hola";) but the label was not updated!!!! Because there were thread problem :-).
 
12:06 PM
your solution does not work
actually now it is called 5 tims
but stilt is replacing the value of 4th with 1 st cell if i have not specified any value for ut
 
12:24 PM
sorry it stil does not called 5 times
it called only two times
rest of the time it is called for on scrolling the table view
 

last day (14 days later) »