用法
////控制隐藏
//-(void) hiddenLeftMenuView{
// [UIView animateWithDuration:leftMenuView.interval animations:^{
// self.navigationController.navigationBar.alpha = 1;
// }];
// [leftMenuView hiddenTime];
//}
/////控制出现
//-(void) showLeftMenuView{
// [UIView animateWithDuration:leftMenuView.interval animations:^{
// self.navigationController.navigationBar.alpha = 0;
// }];
// [leftMenuView showTime];
//}
////创建
//-(void) leftMenuView{
// leftMenuView = [DrawLeftMenuView defaultInitWithFrame:[UIScreen mainScreen].bounds Delegate:self DataSecoure:dataSource];
// [self.view addSubview:leftMenuView];
// [leftMenuView hiddenTime:0.05];
//}
////实现代理,获取点击的位置
//-(void) DrawLeftMenuViewDelegateDidSelectionIndePath:(NSIndexPath *)indexPath DataScoureKey:(NSInteger)key {
// [self hiddenLeftMenuView];
//}
////ViewController将要消失
//-(void)viewWillDisappear:(BOOL)animated {
// [super viewWillDisappear:animated];
// [UIView animateWithDuration:0.1 animations:^{
// menuButton.alpha = 0;
// } completion:^(BOOL finished) {
// [menuButton removeFromSuperview];
// }];
//}
下载代码
本文介绍了一种iOS应用中侧滑菜单的实现方法,通过动画控制导航栏的透明度来实现侧滑菜单的显示与隐藏,并展示了如何创建菜单视图及响应点击事件。
459

被折叠的 条评论
为什么被折叠?



