最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

iOS實現(xiàn)側(cè)拉欄抽屜效果

 更新時間:2016年02月26日 15:40:33   投稿:lijiao  
這篇文章主要為大家詳細(xì)介紹了iOS實現(xiàn)側(cè)拉欄抽屜效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例介紹了iOS實現(xiàn)側(cè)拉欄抽屜效果的相關(guān)代碼,分享給大家供大家參考,具體內(nèi)容如下

需要導(dǎo)入第三方的類庫如下:

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

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

關(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];
 //左邊視圖
 SecondViewController *secondVC = [[SecondViewController alloc] init];
 //右邊視圖
 ThirdViewController *thirdVC = [[ThirdViewController alloc] init];
 
 CustomizedNavigationController *navigationVC = [[CustomizedNavigationController alloc] initWithRootViewController:firstVC];
 

 CustomizedNavigationController *leftNavigationVC = [[CustomizedNavigationController alloc] initWithRootViewController:secondVC];

 CustomizedNavigationController *rightNavigationVC = [[CustomizedNavigationController alloc] initWithRootViewController:thirdVC];

 //抽屜管理 第三方
 //該第三方既可以只實現(xiàn)打開左側(cè)欄也可以實現(xiàn)打開右側(cè)欄,還可以同時都實現(xiàn)
 MMDrawerController *rooVC = [[MMDrawerController alloc] initWithCenterViewController:navigationVC leftDrawerViewController:leftNavigationVC rightDrawerViewController:rightNavigationVC];
 
 //只實現(xiàn)打開左側(cè)欄
 //MMDrawerController *rooVCLeft = [[MMDrawerController alloc] initWithCenterViewController:navigationVC leftDrawerViewController:firstVC];
 //只實現(xiàn)打開右側(cè)欄
 //MMDrawerController *rooVCRight = [[MMDrawerController alloc] initWithCenterViewController:navigationVC rightDrawerViewController:thirdVC];
 
 //指定window的根視圖
 self.window.rootViewController = rooVC;
 //測了門的寬度
 [rooVC setMaximumLeftDrawerWidth:270];
 //設(shè)置側(cè)拉門開與關(guān)的動畫
 [rooVC setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
 [rooVC setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
 //側(cè)開內(nèi)容展示效果
 //設(shè)置向左滑動打開右側(cè)欄
 [[MMExampleDrawerVisualStateManager sharedManager] setRightDrawerAnimationType:MMDrawerAnimationTypeNone];
 //設(shè)置向右滑動打開左側(cè)欄
 [[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èi)容,希望對大家學(xué)習(xí)ios抽屜效果有所幫助。

相關(guān)文章

  • 基于iOS pod最新的安裝和使用方法(分享)

    基于iOS pod最新的安裝和使用方法(分享)

    下面小編就為大家分享一篇基于iOS pod最新的安裝和使用方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-01-01
  • iOS開發(fā)技巧之WeakSelf宏的進(jìn)化詳解

    iOS開發(fā)技巧之WeakSelf宏的進(jìn)化詳解

    在程序中我們經(jīng)常用到Block,但寫weak self 時會比較繁瑣,下面這篇文章主要給大家介紹了關(guān)于iOS開發(fā)技巧之WeakSelf宏的進(jìn)化的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們一起來看看吧
    2018-05-05
  • IOS獲取指定年月的當(dāng)月天數(shù)

    IOS獲取指定年月的當(dāng)月天數(shù)

    本文通過實例演示在IOS開發(fā)中如何獲取指定年月的當(dāng)月天數(shù),有需要的小伙伴們可以參考借鑒。
    2016-08-08
  • iOS實現(xiàn)多個彈框按順序依次彈出效果

    iOS實現(xiàn)多個彈框按順序依次彈出效果

    這篇文章主要為大家詳細(xì)介紹了iOS實現(xiàn)多個彈框按順序依次彈出效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2018-07-07
  • iOS開發(fā)KVO實現(xiàn)細(xì)節(jié)解密

    iOS開發(fā)KVO實現(xiàn)細(xì)節(jié)解密

    這篇文章主要為大家介紹了iOS開發(fā)KVO實現(xiàn)細(xì)節(jié)解密,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-08-08
  • iOS微信支付開發(fā)案例

    iOS微信支付開發(fā)案例

    這篇文章主要為大家詳細(xì)介紹了iOS微信支付開發(fā)案例,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-08-08
  • IOS 使用NSAssert()和NSParameterAssert調(diào)試程序

    IOS 使用NSAssert()和NSParameterAssert調(diào)試程序

    這篇文章主要介紹了IOS 使用NSAssert()和NSParameterAssert調(diào)試程序的相關(guān)資料,需要的朋友可以參考下
    2017-06-06
  • iOS獲取cell中webview的內(nèi)容尺寸

    iOS獲取cell中webview的內(nèi)容尺寸

    這篇文章主要介紹了iOS獲取cell中webview內(nèi)容尺寸,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-09-09
  • iOS-GCD詳解及簡單使用

    iOS-GCD詳解及簡單使用

    這篇文章主要介紹了iOS-GCD詳解的相關(guān)資料,并附簡單的實例代碼,幫助大家學(xué)習(xí)理解此部分的知識,需要的朋友可以參考下
    2016-11-11
  • iOS中wkwebView內(nèi)存泄漏與循環(huán)引用問題詳解

    iOS中wkwebView內(nèi)存泄漏與循環(huán)引用問題詳解

    這篇文章主要給大家介紹了關(guān)于iOS中wkwebView內(nèi)存泄漏與循環(huán)引用問題的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2018-07-07

最新評論

兰考县| 莱州市| 宿松县| 滦南县| 长泰县| 广宁县| 左贡县| 金秀| 清苑县| 法库县| 石首市| 嘉祥县| 木兰县| 芮城县| 南乐县| 营山县| 富宁县| 商南县| 金堂县| 定襄县| 铜川市| 砀山县| 永顺县| 内江市| 水城县| 天镇县| 汉源县| 杭州市| 资阳市| 阿图什市| 囊谦县| 柏乡县| 石楼县| 荥阳市| 会同县| 加查县| 漳州市| 德江县| 兴和县| 安庆市| 玛曲县|