objective c - Slide UITableView Off Screen? -
i trying animate uitableview sliding off screen, have tried below without success:
-(void)slidetableviewoffscreen { [uiview beginanimations:nil context:nil]; [uiview setanimationduration:0.5]; [uiview setanimationcurve:uiviewanimationcurveeaseout]; [uiview setanimationdelegate:self]; stageselectiontable.frame = cgrectmake(stageselectiontable.frame.origin.x - stageselectiontable.frame.size.width, stageselectiontable.frame.origin.y, stageselectiontable.frame.size.height, stageselectiontable.frame.size.width); [uiview commitanimations]; } any ideas why might not work, or need animation work? when code called, nothing happens.
turns out code works without weirdness:
-(void)slidetableviewoffscreen { cgrect newframe = stageselectiontable.frame; newframe.origin.x -= 130; [uiview beginanimations:nil context:nil]; [uiview setanimationduration:0.5]; [uiview setanimationcurve:uiviewanimationcurveeaseout]; [uiview setanimationdelegate:self]; stageselectiontable.frame = newframe; [uiview commitanimations]; }
Comments
Post a Comment