QMUI / QMUI_iOS框架学习(四)
来源:互联网 发布:大数据时代 pdf 编辑:程序博客网 时间:2024/05/22 04:52
同理 搭建第二个模块 QDComponentsViewController
继承自QDCommonGridViewController
.m
中添加
- (void)initDataSource { [super initDataSource]; self.dataSource = [[QMUIOrderedDictionary alloc] initWithKeysAndObjects: @"QMUIModalPresentationViewController", UIImageMake(@"icon_grid_modal"), @"QMUIDialogViewController", UIImageMake(@"icon_grid_dialog"), @"QMUIMoreOperationController", UIImageMake(@"icon_grid_moreOperation"), @"QMUINavigationTitleView", UIImageMake(@"icon_grid_titleView"), @"QMUIEmptyView", UIImageMake(@"icon_grid_emptyView"), @"QMUIToastView", UIImageMake(@"icon_grid_toast"), @"QMUIEmotionView", UIImageMake(@"icon_grid_emotionView"), @"QMUIGridView", UIImageMake(@"icon_grid_gridView"), @"QMUIFloatLayoutView", UIImageMake(@"icon_grid_floatView"), @"QMUIStaticTableView", UIImageMake(@"icon_grid_staticTableView"), @"QMUIPickingImage", UIImageMake(@"icon_grid_pickingImage"), @"QMUIAssetsManager", UIImageMake(@"icon_grid_assetsManager"), @"QMUIImagePreviewView", UIImageMake(@"icon_grid_previewImage"), @"QMUIPieProgressView", UIImageMake(@"icon_grid_pieProgressView"), @"QMUIPopupContainerView", UIImageMake(@"icon_grid_popupView"), nil];}- (void)setNavigationItemsIsInEditMode:(BOOL)isInEditMode animated:(BOOL)animated { [super setNavigationItemsIsInEditMode:isInEditMode animated:animated]; self.title = @"Components"; self.navigationItem.rightBarButtonItem = [QMUINavigationButton barButtonItemWithImage:UIImageMake(@"icon_nav_about") position:QMUINavigationButtonPositionRight target:self action:@selector(handleAboutItemEvent)];}- (void)handleAboutItemEvent {}
然后改写AppDelegate
中的createTabBarController
添加一个tabbar
- (void)createTabBarController { QDTabBarViewController *tabBarViewController = [[QDTabBarViewController alloc] init]; // QMUIKit QDUIKitViewController *uikitViewController = [[QDUIKitViewController alloc] init]; uikitViewController.hidesBottomBarWhenPushed = NO; QDNavigationController *uikitNavController = [[QDNavigationController alloc] initWithRootViewController:uikitViewController]; // UIComponents QDComponentsViewController *componentViewController = [[QDComponentsViewController alloc] init]; componentViewController.hidesBottomBarWhenPushed = NO; QDNavigationController *componentNavController = [[QDNavigationController alloc] initWithRootViewController:componentViewController]; tabBarViewController.viewControllers = @[uikitNavController, componentNavController]; self.window.rootViewController = tabBarViewController; [self.window makeKeyAndVisible];}
完成效果
接下来添加第三个模块QDLabViewController
继承关系
- QMUICommonTableViewController
- – QDCommonTableViewController
- – QDCommonListViewController
- – QDLabViewController
这块就忽略了。直接添加即可。
接下来是about 界面
界面的布局和创建分离了,但是布局是算出来的,看上去好难读的样子。不如masnory方便。
导航栏点击过去还是存在bug,因此把导航栏和底部栏也添加上去。
找到QMUIConfigurationTemplate
更改以下配置
#pragma mark - NavigationBar QMUICMI.navBarBackgroundImage = [UIImageMake(@"navigationbar_background") resizableImageWithCapInsets:UIEdgeInsetsMake(0, 2, 0, 2)];// NavBarBackgroundImage : UINavigationBar 的背景图 QMUICMI.navBarShadowImage = [UIImage new]; QMUICMI.navBarTintColor = UIColorWhite; QMUICMI.navBarTitleColor = NavBarTintColor; QMUICMI.navBarBackIndicatorImage = [UIImage qmui_imageWithShape:QMUIImageShapeNavBack size:CGSizeMake(12, 20) tintColor:NavBarTintColor]; QMUICMI.navBarCloseButtonImage = [UIImage qmui_imageWithShape:QMUIImageShapeNavClose size:CGSizeMake(16, 16) tintColor:NavBarTintColor];
这个更改了navigationbar
的背景图片,文字颜色,指示图片和关闭图片。
观察一下图片
竟然是pdf 格式。。。。
参考一下这篇文章:
在xcode6中使用矢量图(iPhone6置配UI)
先不深究这个问题了
只要添加这些配置就好了
0 0
- QMUI / QMUI_iOS框架学习(四)
- QMUI / QMUI_iOS框架学习(一)
- QMUI / QMUI_iOS框架学习(二)
- QMUI / QMUI_iOS框架学习(三)
- QMUI / QMUI_iOS框架学习(五)
- QMUI / QMUI_iOS框架学习(六)
- QMUI Android UI 框架正式发布
- jhipster框架学习(四)
- Mina框架学习笔记(四)
- Mina框架学习笔记(四)
- spring框架学习(四)自动装配
- spring框架学习(四)自动装配
- Mina框架学习笔记(四)
- spring框架学习(四)自动装配
- Volley网络框架学习笔记(四)
- Mybatis框架基础学习(四)
- spring框架学习(四)自动装配
- spring框架学习(四)自动装配
- IQKeyboardManager使用导致UINavigationController导航控制器移位异常
- 程序计数器 寄存器
- quartz任务调度框架入门
- Laravel和composer新手安装时的问题
- Windows系统-右键菜单执行操作
- QMUI / QMUI_iOS框架学习(四)
- 第一天:认识CPLEX
- NFS网络文件系统及其配置
- 新版blast+的使用简介
- 数据结构 二叉树的层序遍历
- Java 集合系列01之 总体框架
- Canvas常用语法详解
- imx6sl recovery.img 解包和打包
- JSP_1th_第一个JSP程序