objective c - Xcode 4 UIButton segue push to Table View Controller -


right have uibutton setup in storyboard pushes table view controller. working expected. trying have uibutton load xml file when pressed , still move onto table view controller.

how can this? have code xml pieces, it's question of code go , how add .h , .m files new viewcontroller subclass uiviewcontroller. how link files uibutton i've created in storyboard?

drag button connection new view , select custom segue instead of push or modal.

enter image description here

change new custom segue's class "mysegueclass1" or ever you'd call it.

enter image description here

create new objective-c class same name assigned custom segue.

enter image description here inside mysegueclass1.m file add following code, , add ever additional actions want -(void)perform

-(void)perform{     uiviewcontroller *dst = [self destinationviewcontroller];     uiviewcontroller *src = [self sourceviewcontroller];     [dst viewwillappear:no];     [dst viewdidappear:no];       [src.view addsubview:dst.view];      cgrect original = dst.view.frame;      dst.view.frame = cgrectmake(dst.view.frame.origin.x, 0-dst.view.frame.size.height, dst.view.frame.size.width, dst.view.frame.size.height);      [uiview beginanimations:nil context:nil];     dst.view.frame = cgrectmake(original.origin.x, original.origin.y, original.size.height, original.size.width);     [uiview commitanimations];      [self performselector:@selector(animationdone:) withobject:dst afterdelay:0.2f]; } - (void)animationdone:(id)vc{     uiviewcontroller *dst = (uiviewcontroller*)vc;     uinavigationcontroller *nav = [[self sourceviewcontroller] navigationcontroller];     [nav popviewcontrolleranimated:no];     [nav pushviewcontroller:dst animated:no]; } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -