1.样式:动画
2. 在storyBoard中建立segmented control控件,拖拽绑定事件:事件
获取被点击的segment按钮的序号的关键字: selectedSegmentIndex。select
例子以下:im
3. 获取当前segment按钮数目的关键字:numberOfSegments。要获取数先要outlet该segmentControl。拖拽
例子以下:样式
4 .activeIndicatorView控件:top
1)storyBoard中新建activeIndicatorView控件,拖拽法,outlet ActiveIndicatorView控件。img
ActiveIndicatorView的开始动画:startAnimating()di
ActiveIndicatorView的中止动画:stopAnimating()co