以下是模仿path的列表式导航的简单代码
- (IBAction)clickButton:(id)sender
{
if (isOffset) {
isOffset = NO;
[UIView beginAnimations:@"toLeft" context:nil];
self.view.frame = (CGRect){CGPointMake(0, 0), self.view.frame.size};
[UIView commitAnimations];
}
else{
isOffset = YES;
[self.view.superview insertSubview:self.mainMenuController.view belowSubview:self.view];
[UIView beginAnimations:@"toRight" context:nil];
self.view.frame = CGRectOffset(self.view.frame, 270, 0);
[UIView commitAnimations];
}
}