Skip to content

Page indicator replaced with custom implementation

Compare
Choose a tag to compare
@twof twof released this 19 Dec 09:06
· 18 commits to master since this release

Replacing the UIPageControl with a custom implementation affords us significantly more flexibility as evidenced by the new features in this release.

Updates:

  • Providing an initial page, dot size, and dot replacement image are all more reliable
  • Faster load times with less jank
  • Ability to replace any dot with a custom UIImage
let pagedView = SimplePagedView(
    imageIndices: [1: #imageLiteral(resourceName: "add")], // will replace the dot at index 1 with a UIImageView
    with: green, red, orange
)
let pagedView = SimplePagedView(
    // also supports negative indexing similar to Python. This will replace the last dot with a UIImageView
    imageIndices: [-1: #imageLiteral(resourceName: "add")],
    with: green, red, orange
)

simulator screen shot - iphone 8 - 2018-12-19 at 01 01 53

Non-feature updates:
Check out the included example project and playground to try out other features 😄