This is a simple, minimalistic dartboard view created for practicing UIView. Will try to improve the design and options.
- setting number of circles
- scaling
- radius difference between circles
- line width
- back color
- line color
- bullseye color
- size of the point
- color of the point
- Double tap to mark a point.
- Swipe up to increase circles.
- Swipe down to decrease circles.
- Pinch to scale the rings.
- copy the file to your Xcode project.
- drag and drop a view to your application.
- click the view.
- goto Identity inspector in Utilities section.
- set the Class: DartsView.
- copy
ViewController.swift
file to your project. - select the View Controller.
- select the Identity inspector in Utilities section.
- set the Class: ViewController.
- wire up the DartView view outlet to
var dartboard: DartsView
in View Controller.
- click the view.
- go to Attributes inspector.
- options are available to change.