zoukankan      html  css  js  c++  java
  • UISB 导航栏工具栏

    secendelegate.m

    #import "SceneDelegate.h"
    #import "VCRoot.h"
    @interface SceneDelegate ()
    
    @end
    
    @implementation SceneDelegate
    
    
    - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
        self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
        self.window.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
        
        
        UINavigationController* nav=[[UINavigationController alloc] initWithRootViewController:[[VCRoot alloc]init]];
        
        self.window.rootViewController=nav;
        [self.window makeKeyAndVisible];
    }
        

    VCRoot.m

    #import "VCRoot.h"
    
    @interface VCRoot ()
    
    @end
    
    @implementation VCRoot
    
    - (void)viewDidLoad {
        [super viewDidLoad];
    //    self.view.backgroundColor=[UIColor yellowColor];
        //默认 半透明
        self.navigationController.navigationBar.barStyle=UIBarStyleDefault;
        // 设置 透明
        self.navigationController.navigationBar.translucent=NO;
        // 设置 导航栏的颜色
        self.navigationController.navigationBar.barTintColor=[UIColor redColor];
        //设置导航栏元素风格
        self.navigationController.navigationBar.tintColor=[UIColor greenColor];
        
        //隐藏导航栏
    //    self.navigationController.navigationBar.hidden=YES;
    //    self.navigationController.navigationBarHidden=YES;
        
        
        
        
        self.title=@"根视图";
        
        UIBarButtonItem* btn = [[UIBarButtonItem alloc]initWithTitle:@"右侧按钮" style:UIBarButtonItemStyleDone target:self action:nil];
        
        self.navigationItem.rightBarButtonItem=btn;
        
        
        UIBarButtonItem* btn01=[[UIBarButtonItem alloc]initWithTitle:@"left" style:UIBarButtonItemStylePlain target:nil action:nil];
        
        UIBarButtonItem* btn02=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:nil action:nil];
        
        UIButton* btnImage = [UIButton buttonWithType:UIButtonTypeCustom];
        
        [btnImage setImage:[UIImage imageNamed:@"Processsettings"] forState:UIControlStateNormal];
        
        btnImage.frame=CGRectMake(0, 0, 60, 60);
        
        UIBarButtonItem* btn03=[[UIBarButtonItem alloc]initWithCustomView:btnImage];
        NSArray* arrayBtns=[NSArray arrayWithObjects:btn01, btn02,btn03,nil];
        
        
        self.toolbarItems=arrayBtns;
        
    
        
    }
    
    
    
    @end
  • 相关阅读:
    Feature的开发和部署
    MOSS 2007应用如何修改上传文件大小及类型的限制
    学习Ajax的优秀网站
    Office SharePoint 权限开发
    Asp.net操作Excel汇总
    如何取到MOSS列表中item的链接
    解决MOSS、SharePoint的未知错误
    Ajax 之 XMLHttpRequest
    C#中从资源文件里加载文件
    linux 技巧:使用 screen 管理你的远程会话 [linux]
  • 原文地址:https://www.cnblogs.com/zhangqing979797/p/13747076.html
Copyright © 2011-2022 走看看