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
Post a Comment