多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內(nèi)最全I(xiàn)T社區(qū)平臺(tái) 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2
您當(dāng)前位置:首頁 > 互聯(lián)網(wǎng) > iOS側(cè)拉欄抽屜效果Demo

iOS側(cè)拉欄抽屜效果Demo

來源:程序員人生   發(fā)布時(shí)間:2014-11-06 11:19:01 閱讀次數(shù):3938次


源碼下載

側(cè)拉欄抽屜效果Demo
 需要導(dǎo)入第3方的類庫以下:


抽屜效果所需第3方類庫下載



效果:既可以兩側(cè)都實(shí)現(xiàn)抽屜效果也可只實(shí)現(xiàn)左邊欄或右邊欄的抽屜效果
 
                                  


關(guān)于抽屜效果主要是AppDelegate的代碼

AppDelegate.h文件代碼:

<span style="font-size:18px;"><span style="font-size:18px;">#import <UIKit/UIKit.h> @interface YJFAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end</span></span>

AppDelegate.m文件代碼

<span style="font-size:18px;"><span style="font-size:24px;"><span style="font-size:18px;">#import "YJFAppDelegate.h" #import "CustomizedNavigationController.h" #import "FirstViewController.h" #import "SecondViewController.h" #import "ThirdViewController.h" @implementation YJFAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; //主視圖 FirstViewController *firstVC = [[FirstViewController alloc] init]; //左側(cè)視圖 SecondViewController *secondVC = [[SecondViewController alloc] init]; //右側(cè)視圖 ThirdViewController *thirdVC = [[ThirdViewController alloc] init]; CustomizedNavigationController *navigationVC = [[CustomizedNavigationController alloc] initWithRootViewController:firstVC]; CustomizedNavigationController *leftNavigationVC = [[CustomizedNavigationController alloc] initWithRootViewController:secondVC]; CustomizedNavigationController *rightNavigationVC = [[CustomizedNavigationController alloc] initWithRootViewController:thirdVC]; //抽屜管理 第3方 //該第3方既可以只實(shí)現(xiàn)打開左邊欄也能夠?qū)崿F(xiàn)打開右邊欄,還可以同時(shí)都實(shí)現(xiàn) MMDrawerController *rooVC = [[MMDrawerController alloc] initWithCenterViewController:navigationVC leftDrawerViewController:leftNavigationVC rightDrawerViewController:rightNavigationVC]; //只實(shí)現(xiàn)打開左邊欄 //MMDrawerController *rooVCLeft = [[MMDrawerController alloc] initWithCenterViewController:navigationVC leftDrawerViewController:firstVC]; //只實(shí)現(xiàn)打開右邊欄 //MMDrawerController *rooVCRight = [[MMDrawerController alloc] initWithCenterViewController:navigationVC rightDrawerViewController:thirdVC]; //指定window的根視圖 self.window.rootViewController = rooVC; //測了門的寬度 [rooVC setMaximumLeftDrawerWidth:270]; //設(shè)置側(cè)拉門開與關(guān)的動(dòng)畫 [rooVC setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll]; [rooVC setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll]; //側(cè)開內(nèi)容展現(xiàn)效果 //設(shè)置向左滑動(dòng)打開右邊欄 [[MMExampleDrawerVisualStateManager sharedManager] setRightDrawerAnimationType:MMDrawerAnimationTypeNone]; //設(shè)置向右滑動(dòng)打開左邊欄 [[MMExampleDrawerVisualStateManager sharedManager] setLeftDrawerAnimationType:MMDrawerAnimationTypeNone]; // [rooVC setDrawerVisualStateBlock:^(MMDrawerController *drawerController, MMDrawerSide drawerSide, CGFloat percentVisible) { MMDrawerControllerDrawerVisualStateBlock block; block = [[MMExampleDrawerVisualStateManager sharedManager] drawerVisualStateBlockForDrawerSide:drawerSide]; if(block){ block(drawerController, drawerSide, percentVisible); } }]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; }</span> </span> </span>


生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)
程序員人生
------分隔線----------------------------

上一篇 phpMyAdmin

下一篇 一次面試一次成長

分享到:
------分隔線----------------------------
關(guān)閉
程序員人生
主站蜘蛛池模板: 欧美性活生活视频 | 91精品国产欧美一区二区 | 国产三级精品三级在线专区1 | 日本大片免费一级 | 一区二区三区在线免费观看视频 | 操人网站 | 美国一级特a黄 | 丁香五月好婷婷深深爱 | 欧美亚洲图区 | 免费一级毛片私人影院a行 免费一级毛片一级毛片aa | 国产激情一区二区三区在线观看 | 日本高清网 | 国产一区二区三区亚洲综合 | xxxx中国hdxxxx| 92精品国产自产在线观看48页 | 精品久久久久久久一区二区伦理 | 999精品影视在线观看 | 欧美一区二区在线视频 | 日本高清护士xxxxx | 日韩精品欧美亚洲高清有无 | 欧美一级片免费看 | 欧美艳星xxx| 欧美成人一区二区三区在线视频 | 国产成人精品日本亚洲专区6 | 男人午夜网站 | 中文字幕曰韩一区二区不卡 | 日本xxxx护士hd | 亚洲天堂免费在线视频 | 国产麻豆免费观看 | 香蕉亚洲精品一区二区 | h在线免费| 最近中文字幕免费mv视频8 | 国产一二三区在线 | 久草一本 | 精品国产日韩亚洲一区91 | 性―交―乱―色―情 | 有毛片毛毛片毛片毛片 | 波多野结衣午夜 | 欧美一区二区在线视频 | 亚洲国产精品欧美综合 | 久久手机看片 |