Skip to content

ericji-o/InsPageControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlexiblePageControl(Objective-C)

A flexible UIPageControl like Instagram. Link

Update ✨✨

  • Name: InsPageControl
  • Language: Objective-C

Purpose: Objective-C project also can use it

OverView

Install

CocoaPods

For installing with CocoaPods, add it to your Podfile.

pod "InsPageControl"

Usage

let pageControl = PageControl()
pageControl.numberOfPages = 10
view.addSubview(pageControl)

Customize

pageControl.config = Config(displayCount: 7, dotSize: 6, dotSpace: 4, smallDotSizeRatio: 0.5, mediumDotSizeRatio: 0.7)

Update page

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    pageControl.setProgress(contentOffsetX: scrollView.contentOffset.x, pageWidth: scrollView.bounds.width)
}

Licence

Licence MIT

About

Translate swift to objc.

Resources

Stars

Watchers

Forks

Packages

No packages published