本文主要是介绍ios 实现android 中的DrawerLayout菜单,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
用法
控制隐藏
//-(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];
// }];
//}
下载代码
http://download.csdn.net/detail/talinboy/9844225
这篇关于ios 实现android 中的DrawerLayout菜单的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!