https://github.com/gbmiranda/iosalignmentindicatorviews
iOS views alignment indicator
https://github.com/gbmiranda/iosalignmentindicatorviews
aligment aligning apple ios ios-swift layer lines swift swift-3 uiimageview uiview
Last synced: 9 months ago
JSON representation
iOS views alignment indicator
- Host: GitHub
- URL: https://github.com/gbmiranda/iosalignmentindicatorviews
- Owner: gbmiranda
- Created: 2017-07-12T13:52:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-12T14:11:04.000Z (over 8 years ago)
- Last Synced: 2025-04-19T14:57:29.086Z (10 months ago)
- Topics: aligment, aligning, apple, ios, ios-swift, layer, lines, swift, swift-3, uiimageview, uiview
- Language: Swift
- Homepage:
- Size: 675 KB
- Stars: 38
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iOSAlignmentIndicatorViews
This is an iOS component to assist in aligning Views by creating lines similar to image editing programs such as Photoshop and Sketch.

# How to use
1. Add AlignmentIndicatorViews.swift to your project.
2. Call AlignmentIndicatorViews shared instance.
```swift
AlignmentIndicatorViews.shared.identifyViews(currentView: viewDrag, parentView: self.view, otherViews: self.draggableViews)
```
# Customization
## width
Use the width property to set the width of the lines.
```swift
private var lineWidth: CGFloat = 0.6
```
## color
Use the color property to set the color of the lines.
```swift
private var lineColor = UIColor.red
```
## More Properties
Before inserting new lines it is necessary to clean existing ones.
```swift
AlignmentIndicatorViews.shared.clearLayersLines()
```
# Author
Gabriel Braga | http://www.gabrielbraga.com