iOS分段控件UISegmentedControl使用

在故事板中添加UISegmentedControl

具体添加步聚如下:

选择Xcode的View菜单下的Show Library (或者Shift+Common+L)

打开控件库如下

 在控件库中输入seg搜索控件,在出现Segmented Control后,将其拖到View Controller Scene中

到这里,添加分段控件UI已完成,

接下来将控件与变量关联:

在ViewController.m中的 @interface ViewController()中添加一个*colorSeg指针

回到故事板,点击View Controller Scene 下的 View Co

猜你喜欢

转载自blog.csdn.net/fittec/article/details/134904932