iOS控件CHIPageControl:酷帥的翻頁狀態切換動畫組件

zrgt1375 7年前發布 | 9K 次閱讀 iOS開發 移動開發

CHIPageControl is a set of cool animated page controls to replace boring UIPageControl. We were inspired by Jardson Almeida dribbble shot and implemented a few more page controls.

Made with :heart: by Chili .

Overview

Requirements

  • iOS 9.0+
  • Xcode 8+
  • Swift 3

Installation

Just add the CHIPageControl folder to your project.

or use CocoaPods with Podfile:

pod 'CHIPageControl', '~> 0.0.1'

Usage

:art: Storyboards

Just drop UIView and set its class to be one of CHIPageControls.

:computer: Code

let pageControl = CHIPageControlAji(frame: CGRect(x: 0, y:0, with: 100, height: 20))
pageControl.numberOfPages = 4
pageControl.radius = 4
pageControl.tintColor = .red
pageControl.padding = 6

Updating progress

//update dinamically
pageControl.progress = 0.5

//set progress with animation
pageControl.set(progress: 2, animated: true)

Page Controls ??? ??? ???

  • CHIPageControlAji
  • CHIPageControlAleppo
  • CHIPageControlChimayo
  • CHIPageControlFresno
  • CHIPageControlJalapeno
  • CHIPageControlJaloro
  • CHIPageControlPaprika
  • CHIPageControlPuya

License

Airstream is released under the MIT license. See LICENSE for details.

 

來自:https://juejin.im/entry/58c9f2970ce4630057ba9c35

 

 本文由用戶 zrgt1375 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!