ios - Load while push to another viewController -


when push detail viewcontroller after clicking collectionview cell take time load detailview controller. mainviewcontroller.m

-(void)collectionview:(uicollectionview *)collectionview didselectitematindexpath:(nsindexpath *)indexpath{      detailviewcontroller *objdetailviewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier:@"detailviewcontroller"];     objdetailviewcontroller.objproduct = [arrlist objectatindex:indexpath.row];     [self.navigationcontroller pushviewcontroller:objdetailviewcontroller animated:yes]; } 

detailviewconteroller.m

- (void)viewdidload {      [super viewdidload];     [self setinitialvalues];     [self productdetailapi];//ws call  } 

is api call running on main thread? should make network calls on background thread not block ui thread.


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -