Discover the world 🌎 around you..!!!
The Radar Kit allowing you to locate places, trip neary by you Or it will help you to search out the people around you with the few lines of code..!!!
The Pod has been used in a project where we discover the list of languages that user want to learn which they can see like below
Get more for UI/UX from dribbble
- iOS 12.0+
- Xcode 12.0+
To install it, simply add the following line to your Podfile:
pod 'RadarKit', git: 'https://github.com/parthgohel2810/RadarKit.git', branch: 'main'
- Change the class of a view from UIView to CustomRadarView
@IBOutlet private weak var radarView: CustomRadarView!
- Programmatically:
let radarView = CustomRadarView(frame: myFrame)
private func configureRadarView() {
radarView.delegate = self
radarView.dataSource = self
radarView.diskRadius = 0.0
radarView.dotColor = .ringStroke.filterNil
radarView.circleOnColor = .ringOnColor.filterNil
radarView.circleOffColor = .ringStroke.filterNil
radarView.numberOfCircles = 4
radarView.isRotateRingAnimation = true
radarView.paddingBetweenCircle = 36
radarView.paddingBetweenItems = 20
radarView.enableRippleEffect = false
}
The radius of the central disk in the view, if you would like to hide it, you can set the radius to 0
The color of the central disk in the view, the default color is ripplePink color
This property make distance between the first circle and the central disk
The number of circles to draw around the disk, the default value is 3
The padding between circles, circles could be drawn outside the frame
The color of the off status of the circle, used for animation
The color of the on status of the circle, used for animation
The duration of the animation, the default value is 0.9
You can start/ stop the animation at any time by calling startAnimation()
& stopAnimation()
Allows circle to rotate, used for animation
The color of the two dots which place at two end of circle,
The padding between items, the default value is 10
For removal of Ripple effect use enableRippleEffect
property
If you would like to add one item, use the method add(item:using:)
If you would like to add multiple items, it's recommended to use the method add(items:using:)
for more detail and information please refer Example
project
For removal of an item, use the method remove(item:)
If you would like to customize items, use the protocol RadarViewDataSource
and implement:
radarView?.dataSource = self
...
func radarView(radarView: RadarView, viewFor item: Item, preferredSize: CGSize) -> UIView {
let myCustomItemView = UIView(frame: CGRect(x: 0, y: 0, width: preferredSize.width, height: preferredSize.height))
return myCustomItemView
}
Action on items can be detected using the protocol RadarViewDelegate
and implement:
radarView?.delegate = self
...
func radarView(radarView: RadarView, didSelect item: Item) {
print(item.uniqueKey)
}
MI-RadarKit is MIT-licensed.
If you use our open-source libraries in your project, please make sure to credit us and Give a star to www.mindinventorycom