添加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];
添加navbar以及上面的左右按钮代码的更多相关文章
- js 移动端写搜索时怎么调用软键盘上面的搜索按钮
这段时间一直在做移动端,所以遇到很多问题,现在很多网站在做移动端搜索的时候都不会在后面加一个搜索按钮,而是直接调用输入法上面的搜索搜索按钮进行搜索 input的一个新属性给我们提供非常方便的书写, 就 ...
- 如何显示bootstrap fileinput缩略图上面的删除按钮
bootstrap上传文件控件初始化js: //bootstrap上传文件控件 $(".fileupload").fileinput({ language: "zh&qu ...
- datagrid上面的查询按钮设置了,但是分页工具栏不显示
原因:查询的linkbutton没有放在toolbar里. <script type="text/javascript"> $(function(){ $('#dg') ...
- 抓取oschina上面的代码分享python块区下的 标题和对应URL
# -*- coding=utf-8 -*- import requests,re from lxml import etree import sys reload(sys) sys.setdefau ...
- VS2012如何更新下载TFS上面的代码到本地
现在的代码基本上全都放在TFS上面,如何同步TFS上面的code呢? 1. Open "Team Explorer - Home" 2. Click "Source Co ...
- 重新实践c++primer上面的代码
又重新敲了敲c++primer上面的代码,觉得很有意思,讲的很细,c++真牛逼啊 #include <iostream> #include <string> #include ...
- Git同步更新操作GitHub和码云仓库上面的代码
一.前言 问题: 小编在生活中,一般都是将代码保存到github上,但由于国内的码云仓库确实速度比github快很多,用起来也很方便,于是后来就慢慢转码云了,当然小编在github上的代码也不想放弃更 ...
- 关于Hexo,Next主题的‘下一页’、‘上一页’按钮错误显示为html代码 的解决方法
关于Next主题的'下一页'.'上一页'按钮错误显示为html代码的解决方法 我在建立自己的博客过程中遇到了页面'下一页'和'上一页'按钮显示为html代码<i class="fa f ...
- [BS-10] 统一设置app所有页面的“返回”按钮样式
统一设置app所有页面的“返回”按钮样式 如果想统一设置app所有页面的“返回”按钮样式,首先自定义WZNavigationController类继承UINavigationController类,然 ...
随机推荐
- PHP使用SOAP调用.net的WebService数据
需要和一个.net系统进行数据交换,对方提供了一个WebService接口,使用PHP如何调用这个数据呢,下面就看看使用SOAP调用的方法吧 这个与一般的PHP POST或GET传值再查库拿数据的思路 ...
- HttpWebRequest模拟登陆,存储Cookie以便登录请求后使用
[一篮饭特稀原创,转载请注明出自http://www.cnblogs.com/wanghafan/p/3284481.html] PostLogin :登录,并保存Cookie 1 public st ...
- hdu 1848 Fibonacci again and again (初写SG函数,详解)
思路: SG函数的应用,可取的值为不连续的固定值,可用GetSG求出SG,然后三堆数异或. SG函数相关注释见代码: 相关详细说明请结合前一篇博客: #include<stdio.h> # ...
- Linux文件查找命令find,xargs详述
目录: 一.find 命令格式 1.find命令的一般形式为: 2.find命令的参数: 3.find命令选项: 4.使用exec或ok来执行shell命令: 二.find命令的例子: 1.查找当前用 ...
- iOS开发--线程通信
线程间的通信主要用于主线程与子线程的,也有用于子线程与子线程的 介绍下面几种通信方式 1.利用GCD方式(推荐) - (void)touchesBegan:(NSSet<UITouch *> ...
- JavaPersistenceWithHibernate第二版笔记-第六章-Mapping inheritance-002Table per concrete class with implicit polymorphism(@MappedSuperclass、@AttributeOverride)
一.结构 二.代码 1. package org.jpwh.model.inheritance.mappedsuperclass; import javax.persistence.MappedSup ...
- React 万能的函数表达式
一.语法简介 表达式可以以下两种方法, (1)(function A(){})(this),(this)参数在函数外面 (2)(function B(){}(this)),(this)参数在函数里面 ...
- 安装MySQldb出错解决方法
sudo yum install mysql-devel sudo yum install python-devel _mysql.c:36:23: error: my_config.h: No su ...
- PHP中global全局变量的使用
在方法里面想用外面的变量,可以声明这个变量为全局变量. $a=1; $b=2; test_global(); function test_global() { global $a,$b; echo $ ...
- 308. Range Sum Query 2D - Mutable
题目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper ...