zoukankan      html  css  js  c++  java
  • 添加navbar以及上面的左右按钮代码

    UINavigationBar *navBar = [[UINavigationBaralloc] initWithFrame:CGRectMake(0, 0, 824, 44)];

        navBar.barStyle = UIBarStyleDefault;

        

        

        UINavigationItem *navItem = [[UINavigationItemalloc] init];

        navItem.leftItemsSupplementBackButton = YES;

        navItem.title = @"Add CRA";

        

        UIBarButtonItem *leftButton = [[UIBarButtonItemalloc] initWithTitle:@"Back"

                                                                       style:UIBarButtonItemStylePlain

                                                                      target:self

                                                                      action:@selector(back)];

        navItem.leftBarButtonItem = leftButton;

        

        UIBarButtonItem *rightButton = [[UIBarButtonItemalloc] initWithTitle:@"Done"

                                                                        style:UIBarButtonItemStylePlain

                                                                       target:self

                                                                       action:@selector(done)];

        navItem.rightBarButtonItem = rightButton;

        navBar.items = @[navItem];

        

        [self.view addSubview:navBar];

  • 相关阅读:
    我的Vue朝圣之路2
    我的Vue朝圣之路1
    1.Rabbitmq学习记录《本质介绍,协议AMQP分析》
    IdentityServer4(客户端授权模式)
    windows10环境下的RabbitMQ使用_笔记
    windows10环境下的RabbitMQ安装_笔记
    asp.net Code CSRedis学习记录
    visual studio code 命令行创建发布一个项目
    RabbitMQ学习记录1
    AspNetCore Redis实现分布式缓存
  • 原文地址:https://www.cnblogs.com/sanjianghuiliu/p/3701062.html
Copyright © 2011-2022 走看看