Skip to content
/ Ruler Public

Support Horizontal & Vertical, It will base on UIScrollView's frame to adjust size.

License

Notifications You must be signed in to change notification settings

ykying/Ruler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruler

Support Horizontal & Vertical, It will base on UIScrollView's frame to adjust size.

demo

How To Use

Remember to set AutoLayout correctly.

    @IBOutlet weak var rulerScrollView: RulerScrollView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        rulerScrollView.initRuler(self, imageNameForUnit: "unit", rulerAutoAlignToCloseInt: true)
    }

Settings

//--- Full Settings ---
//    private var rulerScrollViewDelegate: RulerScrollViewDelegate? = nil
//    private var direction: RulerDirection = RulerDirection.Vertical
//    private var totalUnitCount: Int = 100
//    private var unitStartNumber: Int = 100
//    private var imageNameForOneUnit: String = "unit"
//    private var unitString: String = "CM"
//    private var autoAlignToCloseInt: Bool = false

	rulerScrollView.initRuler(self, imageNameForUnit: "unith", rulerDirection: RulerDirection.Horizontal, rulerTotalUnitCount: 100, rulerUnitStartNumber: 50, rulerUnitString: "kg")

License

Ruler is available under the MIT license. See the LICENSE file for more info.

About

Support Horizontal & Vertical, It will base on UIScrollView's frame to adjust size.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages