ios - How to animate tableView reload on UISegmentedControl click as pushviewcontroller -


i have relod uitableview data on segment click show in image below:

enter image description here

now want animate tableview reload on uisegmentedcontrol click same navigationcontroller pushviewcontroller there appears transition screen between movement of table view

i have try use following unable totally wants -(void)swipegesturerecognize{

    uiswipegesturerecognizer * swipeleft=[[uiswipegesturerecognizer alloc]initwithtarget:self action:@selector(swipeleft:)];     swipeleft.direction=uiswipegesturerecognizerdirectionleft;     [self.view addgesturerecognizer:swipeleft];      uiswipegesturerecognizer * swiperight=[[uiswipegesturerecognizer alloc]initwithtarget:self action:@selector(swiperight:)];     swiperight.direction=uiswipegesturerecognizerdirectionright;     [self.view addgesturerecognizer:swiperight];    } -(void)swipeleft:(uiswipegesturerecognizer*)gesturerecognizer {     //past order      [uitableview animatewithduration:0.5f animations:^{         self.tableview.frame = cgrectoffset(self.tableview.frame,   [util window_width],0);      }];      self.tableview.frame = cgrectmake(0, 0, 0-[util window_width], [util window_height]);      [uitableview animatewithduration:0.5f animations:^{         self.tableview.frame = cgrectoffset(self.tableview.frame,   [util window_width],0);     }];        segmetcontrol.selectedsegmentindex = 1;     [self action:nil];  }  -(void)swiperight:(uiswipegesturerecognizer*)gesturerecognizer {     //current order      [uitableview animatewithduration:0.5f animations:^{         self.tableview.frame = cgrectoffset(self.tableview.frame,   [util window_width],0);      }];      self.tableview.frame = cgrectmake(0, 0, 0-[util window_width], [util window_height]);      [uitableview animatewithduration:0.5f animations:^{         self.tableview.frame = cgrectoffset(self.tableview.frame,   [util window_width],0);      }];       segmetcontrol.selectedsegmentindex = 0;     [self action:nil]; } 

i suggest use uicollectionview on top , make custom cells view's width containing uitableview , when segment control valuechange: scroll particular cell want use. remember making

collectionview pagingenabled = yes 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -