如果您对Swift-导航条感兴趣,那么本文将是一篇不错的选择,我们将为您详在本文中,您将会了解到关于Swift-导航条的详细内容,我们还将为您解答UINavigationBar的使用的相关问题,并且为
如果您对Swift - 导航条感兴趣,那么本文将是一篇不错的选择,我们将为您详在本文中,您将会了解到关于Swift - 导航条的详细内容,我们还将为您解答UINavigationBar的使用的相关问题,并且为您提供关于Bootstrap CSS——导航条、bootstrap 导航条、bootstrap 导航条 组件排列、Bootstrap-导航条-栅格系统-Carousel(轮播效果)-标签页的有价值信息。
本文目录一览:- Swift - 导航条(UINavigationBar)的使用(swift导航栏)
- Bootstrap CSS——导航条
- bootstrap 导航条
- bootstrap 导航条 组件排列
- Bootstrap-导航条-栅格系统-Carousel(轮播效果)-标签页
Swift - 导航条(UINavigationBar)的使用(swift导航栏)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@H_301_86@
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
import
UIKit
class
ViewController
:
UIViewController
{
var
count = 0
//声明导航条
navigationBar:
UINavigationBar
?
override
func
viewDidLoad() {
super
.viewDidLoad()
// Do any additional setup after loading the view,typically from a nib.
//实例化导航条
navigationBar =
(frame:
CGRectMake
(0,320,44))
self
.view.addSubview(navigationBar!)
onAdd()
}
didReceiveMemoryWarning() {
.didReceiveMemoryWarning()
// dispose of any resources that can be recreated.
}
//增加导航项函数
onAdd(){
count++
//给导航条增加导航项
navigationBar?.pushNavigationItem(onMakeNavitem(),animated:
true
)
}
//删除导航项函数
onRemove(){
if
count > 1{
//减少导航项数量
count--
//从导航条中移除最后一个导航项
navigationBar?.popNavigationItemAnimated(
)
}
}
//创建一个导航项
onMakeNavitem()->
UINavigationItem
{
navigationItem =
()
//创建左边按钮
leftBtn =
UIBarButtonItem
(barButtonSystemItem:
UIBarButtonSystemItem
.
Add
,
target:
"onAdd"
)
//创建右边按钮
rightBtn =
Cancel
"onRemove"
)
//设置导航栏标题
navigationItem.title =
"第\(count)个导航项"
//设置导航项左边的按钮
navigationItem.setLeftBarButtonItem(leftBtn,monospace!important; min-height:inherit!important">)
//设置导航项右边的按钮
navigationItem.setRightBarButtonItem(rightBtn,monospace!important; min-height:inherit!important">)
return
navigationItem
}
}
|
Bootstrap CSS——导航条
总结
以上是小编为你收集整理的Bootstrap CSS——导航条全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
bootstrap 导航条
总结
以上是小编为你收集整理的bootstrap 导航条全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
bootstrap 导航条 组件排列
总结
以上是小编为你收集整理的bootstrap 导航条 组件排列全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
Bootstrap-导航条-栅格系统-Carousel(轮播效果)-标签页
总结
以上是小编为你收集整理的Bootstrap-导航条-栅格系统-Carousel(轮播效果)-标签页全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
我们今天的关于Swift - 导航条和UINavigationBar的使用的分享就到这里,谢谢您的阅读,如果想了解更多关于Bootstrap CSS——导航条、bootstrap 导航条、bootstrap 导航条 组件排列、Bootstrap-导航条-栅格系统-Carousel(轮播效果)-标签页的相关信息,可以在本站进行搜索。
本文标签: