文章来源:淘论文网   发布者: 毕业设计   浏览量: 23



还可以点击去查询以下关键词:
[Rubber]    [动画]    [页面]    [控制]    [定制]    [插件]    [TKRubberIndicator]    [Rubber动画页面控制定制插件 - TKRubberIndicator]   

项目介绍:

项目简介

TKRubberIndicator是一个胶状动画页面控制控件。

环境需求:

Swift3.0

iOS8.0+

Xcode8.0

安装

CocoaPods

你可以使用CocoaPods在你的Podfile中加入如下完成安装 :

platform :ios, '8.0' use_frameworks!
pod 'TKRubberPageControl'
为了获得所有的功能,开题报告开题报告,在import UIKit时要importTKRubberPageControl

import UIKit import TKRubberPageControl
手动

1.下载并吧TkRubberPageControl.swift放入你的文件

2.完成

使用案例

这里提供 闭包和 传统的 Target-Action 两种方式

class ViewController: UIViewController {

let page = TKRubberIndicator(frame: CGRectMake(100, 100, 200, 100), count: 6) override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor(red:0.553, green:0.376, blue:0.549, alpha:1) page.center = self.view.center page.valueChange = {(num) -> Void in print('Closure : Page is \(num)') } page.addTarget(self, action: 'targetActionValueChange:', forControlEvents: UIControlEvents.ValueChanged) self.view.addSubview(page) // 可以变化 page 的个数 page.numberOfpage = 2 } @IBAction func pageCountChange(sender: UISegmentedControl) { page.numberOfpage = (sender.selectedSegmentIndex + 1) * 2 } func targetActionValueChange(page:TKRubberIndicator){ print('Target-Action : Page is \(page.currentIndex)') } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() }

}

BaseKeyUsage
smallBubbleSize   未选中小球尺寸   unselect small ball size  
mainBubbleSize   选中大球尺寸   select big ball size  
bubbleXOffsetSpace   小球间距   The distance between the ball  
bubbleYOffsetSpace   纵向间距   bubble Y Offset Space  
animationDuration   动画时长   animation duration  
backgroundColor   背景颜色   control background color  
smallBubbleColor   小球颜色   unselect small ball color  
mainBubbleColor   大球颜色   select big ball color  

github地址:https://github.com/TBXark/TKRubberIndicator


这里还有:


还可以点击去查询:
[Rubber]    [动画]    [页面]    [控制]    [定制]    [插件]    [TKRubberIndicator]    [Rubber动画页面控制定制插件 - TKRubberIndicator]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/7671.docx
  • 上一篇:TODBModel——基于FMDB的模型化数据库
  • 下一篇:一步步实现微信定制聊天框架的搭建