zoukankan      html  css  js  c++  java
  • 可自定义的边栏菜单ios源码

    这个源码是可自定义的边栏菜单,源码MDMenuViewController,MDMenuViewController提供使用的边栏菜单。菜单项可自定义,由数组组成。菜单上的文字图片等完全支持自定义,菜单还支持横屏。

    效果图:
    • <ignore_js_op> 

    使用方法:


    将整个"MDMenuViewController classes"文件夹加入到自己的项目中: 
    构件各个页面,继承Child类: 
    @interface AboutViewController : MDMenuChildViewController 
    @interface AdvisoryViewController :MDMenuChildViewController 
       ...... 

    然后由数组组成菜单: 
    NSArray *viewControllers = [NSArray arrayWithObjects:[[ServicesViewController alloc] 
                initWithNibName:@"ServicesViewController" bundle:nil],[[FavouritViewController alloc] 
                initWithNibName:@"FavouritViewController" bundle:nil],[[ContactUsViewController alloc] 
                initWithNibName:@"ContactUsViewController" bundle:nil],[[AboutViewController alloc] 
                initWithNibName:@"AboutViewController" bundle:nil], nil]; 

    MDMenuViewController *mainViewC = [[MDMenuViewController alloc] initWithChildViewControllers:viewControllers]; 

    每个子界面都又方法定制菜单标题喝图片: 
    -(NSString*)titleForChildControllerMDMenuViewController:(MDMenuViewController *)menuController 

        return @"About"; 

    -(NSString*)iconForChildControllerMDMenuViewController:(MDMenuViewController *)menuController 

        return @"concept-icon-poster60.png"; 

    详细说明:http://ios.662p.com/thread-2254-1-1.html

  • 相关阅读:
    安装 Android 运行环境
    Sea.js
    css hack 兼容性
    solr全文检索基本原理
    Solr初步学习
    jquery中ajax的用法
    Javascript的模块化编程
    html 标签
    CSS盒子模型
    python 初学03 Eric+PyQt+python IDE与界面程序
  • 原文地址:https://www.cnblogs.com/liniuzen/p/4110209.html
Copyright © 2011-2022 走看看