Skip to content

Instantly share code, notes, and snippets.

View hoang-lk's full-sized avatar
🏠
Working from home

Lê Kim Hoàng hoang-lk

🏠
Working from home
View GitHub Profile
@gali8
gali8 / NexorPageControl.swift
Created May 15, 2020 00:22
UIPageControl with custom dots and space
import UIKit
class NexorPageControl: UIPageControl {
fileprivate let activeDotFrame = CGRect(origin: .zero, size: CGSize(width: 21, height: 7))
fileprivate let inactiveDotFrame = CGRect(origin: .zero, size: CGSize(width: 7, height: 7))
fileprivate let dotPadding: CGFloat = 9 //default is 9
lazy var activeImage: UIImage = {
let view = UIView(frame: self.activeDotFrame)