关键词:
依赖于第三方的框架RESideMenu
1.AppDelegate.m中的实现
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. //在AppDelegate.h中声明属性,初始化tabBarController self.tabBar = [[UITabBarController alloc] init]; ViewController* vc1 = [[ViewController alloc] init]; vc1.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0]; UINavigationController* nav1 = [[UINavigationController alloc] initWithRootViewController:vc1]; ViewController1* vc2 = [[ViewController1 alloc] init]; vc2.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemContacts tag:1]; UINavigationController* nav2 = [[UINavigationController alloc] initWithRootViewController:vc2]; self.tabBar.viewControllers = @[nav1,nav2]; //初始化leftVC LeftController* left = [[LeftController alloc] init]; //初始化RESideMenu RESideMenu* menu = [[RESideMenu alloc] initWithContentViewController:self.tabBar leftMenuViewController:left rightMenuViewController:nil]; self.window.rootViewController= menu; return YES; }
2.left左侧菜单
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ AppDelegate* GHDelegate = (AppDelegate* )[UIApplication sharedApplication].delegate; ViewController1_1* vc = [[ViewController1_1 alloc] init]; //通过GHDelegate.tabBar.selectedIndex获得当前tabbaritem对应的nav,进行页面跳转 NSArray *arrControllers = GHDelegate.tabBar.viewControllers; if (GHDelegate.tabBar.selectedIndex==0) { UINavigationController* nav = (UINavigationController* )[arrControllers objectAtIndex:0]; //隐藏sideMenuViewController [self.sideMenuViewController hideMenuViewController]; //隐藏底部 vc.hidesBottomBarWhenPushed = YES; [nav pushViewController:vc animated:YES]; }else{ UINavigationController* nav = (UINavigationController* )[arrControllers objectAtIndex:1]; [self.sideMenuViewController hideMenuViewController]; vc.hidesBottomBarWhenPushed = YES; [nav pushViewController:vc animated:YES]; } }
3.RESideMenu常见的属性设置
- (void)awakeFromNib { self.parallaxEnabled = NO; //视图差效果 self.scaleContentView = YES; //中心视图缩放功能打开 self.contentViewScaleValue = 0.95; //侧滑出现时缩放比 self.scaleMenuView = NO; //侧滑出来的视图是否支持缩放 self.contentViewShadowEnabled = YES; //中心视图阴影效果,打开显得有层次感。 self.contentViewShadowRadius = 4.5; //中心视图阴影效果Radius self.panGestureEnabled = NO; //关闭拖动支持手势 //使用storyboard初始化中心视图和左视图。 self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"]; //tabbar controller self.leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"leftMenuViewController"]; }
第六篇网关ocelot,搭配consul。达到负载均衡的效果(代码片段)
首先nuget Ocelot版本5.6.0-unstable0028Consul版本0.7.2.6 根目录新建一个 Ocelot.json"ReRoutes":["DownstreamPathTemplate":"/url",//任意的url"DownstreamScheme":"http",//"UpstreamPathTemplate":"/VideoInspectionConfig/url",//可配置"UpstreamHttpMethod":["Get","Post",... 查看详情
第六篇:面向对象
第六篇:面向对象 PYTHON-面向对象类绑定方法PYTHON-面向对象继承派生PYTHON-面向对象-练习-王者荣耀对砍游戏 查看详情
第六篇vggnet——模型精讲
文章目录 查看详情
advancedlocomotionsystemv第六篇c++实现冲刺与身体倾斜
效果展示蓝图实例代码模块蓝图动画模块在(N)CycleBlending板块添加输入动作,让冲刺动作和向前移动动作进行融合,将冲刺动作加入到其中向前冲刺的两个状态要设置一下同步组,让普通冲刺状态和全力冲刺状态之间... 查看详情
关于ajax第六篇
使用回调函数回调函数是一种以参数形式传递给另一个函数的函数。如果您的网站上存在多个AJAX任务,那么您应该为创建XMLHttpRequest对象编写一个标准的函数,并为每个AJAX任务调用该函数。该函数调用应该包含URL以及发生onreadys... 查看详情
第六篇avplayer地址视频播放控件
1.引用头文件#importAVFoundation2.自定义AVPlayer(播放的机器)3.自定义AVPlayerItem(胶片)>>视频的URL转成AVAsset4.AVPlayerLayer(白板) 查看详情
第六篇elasticsearchexpress删除索引数据
express框架删除elasticsearch索引数据1.在elasticsearch.js文件下添加functiondeleteDocument(id){returnelasticClient.delete({index:indexName,type:"foods",id:id});}exports.deleteDocument=deleteDocument;2.在路由删除数据代码块中添加el 查看详情
第六篇io流技术(代码片段)
packagecom.zzp.demo01;importjava.io.ByteArrayInputStream;importjava.io.File;importjava.io.FileInputStream;importjava.io.FileNotFoundException;importjava.io.IOException;importjava.io.InputStream;/****四 查看详情
android插件化开发——hook方式第六篇
http://blog.csdn.net/u013022222/article/details/51295208 查看详情
重构之路第六篇——处理概括关系
1PullupField(字段上移)2PullupMethod(函数上移)3PullupConstructorBody(构造函数本体上移)4PushDownMethod(函数下移)5PushDownField(字段下移)6ExtractSubclass(提炼子类)7ExtractSuperclass(提炼超类)8ExtractInterface(提炼接口)9CollapseHierarchy(折叠 查看详情
第六篇javascript面向对象
h1{background-color:palegreen}一、闭包闭包是指可以包含自由(未绑定到特定对象)变量的代码块。「闭包」,是指拥有多个变量和绑定了这些变量的环境的表达式(通常是一个函数),因而这些变量也是该表达式的一部分。闭包是个... 查看详情
第六篇xpath的用法
使用pycharmdebug调试效率会比较慢,因为每次调试都需要向url发送请求,等返回信息,scrapy提供一种方便调试的功能,如下:>>>(third_project)[email protected]:pachong$scrapyshellhttp://blog.jobbole.com/112239/>>>title=response 查看详情
web前端第六篇javascript对象
在JavaScript中除了null和undefined以外其他的数据类型都被定义成了对象,也可以用创建对象的方法定义变量,String、Math、Array、Date、RegExp都是JavaScript中重要的内置对象,在JavaScript程序大多数功能都是基于对象实现的<scriptlanguage=... 查看详情
小刘同学的第六十六篇博文
夜深了,1:53了 今天其实破了一个大戒 距上一次写代码貌似就longlongago的事了 我想我需要一场彻底的改变 发自内心由内而外的改变 睡了 大家晚安 查看详情
第六篇6.1章
1.数组概述 数组:存储在一个连续的内存块中相同的数据类型的元素集合 作用:解决一些简单的,有繁琐的重复操作2.数组初始化 数组声明:声明一个数组引用 数组初始化:通过new关键字创建,对数组进行... 查看详情
第六篇flowable核心流程操作的本质(代码片段)
Flowable完成流程操作1.流程部署详解1.1部署实现 我们先来看下流程部署的具体过程。代码实现/***部署流程*/@Testpublicvoidtest3()ProcessEngineprocessEngine=ProcessEngines.getDefaultProcessEngine();RepositoryServicerepositoryService=pr 查看详情
第六篇css样式背景背景图文本链接
元素背景、文本(字体)样式、链接这里我们只学习常用的一些,更多的扩展就要同学们自己去了解,或者下方评论。这里我们为了简便,用的是CSS的内嵌形式。 元素背景:我们写模块的时候,有的时候为了区别多个模块,我... 查看详情
接口测试框架——第六篇-读excel封装方法
谢谢@小麦苹果的提醒,才发现我借口测试少写了一个文件,今天给大家补上:common->service->excel_case_data.py#coding:utf-8importjsonimportsysimportloggingimportsettingimportrequestsfromcommon.moduleimportexcel_modulefromcommon.module 查看详情