zoukankan      html  css  js  c++  java
  • 项目整理 (一)

    • 1. 自定义tabbar

      /**

       *  自定义添加控制器方法

       *

       *  @param childController 添加的子控制器对象

       *  @param title           标题

       *  @param image           图片

       *  @param selectImage     选中图片

       */

      - (void)addChildViewController:(UIViewController *)childController Title:(NSString *)title Image:(NSString *)image SelectImage:(NSString *)selectImage

      {

          //添加导航控制器

          YFNavigationController *navigation = [[YFNavigationController alloc] initWithRootViewController:childController];

          childController.title = title;

          childController.tabBarItem.image = [UIImage imageNamed:image];

          //将图片原来样子展示出来 不对其进行其他颜色渲染

          childController.tabBarItem.selectedImage = [[UIImage imageNamed:selectImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

          NSMutableDictionary *text = [NSMutableDictionary dictionary];

          text[NSForegroundColorAttributeName] = YFColor(123, 123, 123);

          NSMutableDictionary *selectText = [NSMutableDictionary dictionary];

          selectText[NSForegroundColorAttributeName] = YFMainColor;

          //设置文字颜色

          [childController.tabBarItem setTitleTextAttributes:text forState:UIControlStateNormal];

          [childController.tabBarItem setTitleTextAttributes:selectText forState:UIControlStateSelected];

          [self addChildViewController:navigation];

      }

    • 2.自定义导航条

         ① //通过背景图片来设置导航栏的外观。

            [self.navigationBar setBackgroundImage:nil forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];

             //隐藏底部黑线 

             [self.navigationController.navigationBar setShadowImage:nil];

      ②.  - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated

            {

                //操作.......    

                 //写在这会有一个tabbar推出效果

                 [super pushViewController:viewController animated:animated];

             } 

  • 相关阅读:
    双态运维分享之:业务场景驱动的服务型CMDB
    双态运维分享之二: 服务型CMDB的消费场景
    双态运维:如何让CMDB配置维护更贴近人性
    CMDB经验分享之 – 剖析CMDB的设计过程
    APM最佳实践: 诊断平安城市视频网性能问题
    先定一个运维小目标,比方监控它10000台主机
    大规模Docker平台自动化监控之路
    少走冤枉路!带你走过SNMP的那些坑
    完整性约束
    数据类型
  • 原文地址:https://www.cnblogs.com/yevgeni/p/5763705.html
Copyright © 2011-2022 走看看