Skip to content

Commit 9b3ca05

Browse files
committed
Clean up
1 parent ab6fe8f commit 9b3ca05

File tree

8 files changed

+33
-70
lines changed

8 files changed

+33
-70
lines changed

.swift-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.2

.swiftlint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
included:
2+
- Sources
3+
- Tests
4+
5+
disabled_rules:
6+
- identifier_name
7+
- type_name
8+
- cyclomatic_complexity
9+
- file_length
10+
11+
line_length: 200

Arrows.xcodeproj/project.pbxproj

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
/* Begin PBXFileReference section */
1414
52D6D97C1BEFF229002C0205 /* Arrows.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Arrows.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1515
52D6D9F01BEFFFBE002C0205 /* Arrows.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Arrows.framework; sourceTree = BUILT_PRODUCTS_DIR; };
16-
8933C7891EB5B82A000D00A4 /* ArrowsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrowsTests.swift; sourceTree = "<group>"; };
1716
AD2FAA261CD0B6D800659CF4 /* Arrows.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Arrows.plist; sourceTree = "<group>"; };
18-
AD2FAA281CD0B6E100659CF4 /* ArrowsTests.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = ArrowsTests.plist; sourceTree = "<group>"; };
1917
C48D94EF21733452008A498D /* ArrowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrowView.swift; sourceTree = "<group>"; };
2018
/* End PBXFileReference section */
2119

@@ -41,7 +39,6 @@
4139
isa = PBXGroup;
4240
children = (
4341
8933C7811EB5B7E0000D00A4 /* Sources */,
44-
8933C7831EB5B7EB000D00A4 /* Tests */,
4542
52D6D99C1BEFF38C002C0205 /* Configs */,
4643
52D6D97D1BEFF229002C0205 /* Products */,
4744
);
@@ -60,7 +57,6 @@
6057
isa = PBXGroup;
6158
children = (
6259
DD7502721C68FC1B006590AF /* Frameworks */,
63-
DD7502731C68FC20006590AF /* Tests */,
6460
);
6561
path = Configs;
6662
sourceTree = "<group>";
@@ -73,15 +69,6 @@
7369
path = Sources;
7470
sourceTree = "<group>";
7571
};
76-
8933C7831EB5B7EB000D00A4 /* Tests */ = {
77-
isa = PBXGroup;
78-
children = (
79-
8933C7891EB5B82A000D00A4 /* ArrowsTests.swift */,
80-
);
81-
name = Tests;
82-
path = Tests/ArrowsTests;
83-
sourceTree = "<group>";
84-
};
8572
DD7502721C68FC1B006590AF /* Frameworks */ = {
8673
isa = PBXGroup;
8774
children = (
@@ -90,14 +77,6 @@
9077
name = Frameworks;
9178
sourceTree = "<group>";
9279
};
93-
DD7502731C68FC20006590AF /* Tests */ = {
94-
isa = PBXGroup;
95-
children = (
96-
AD2FAA281CD0B6E100659CF4 /* ArrowsTests.plist */,
97-
);
98-
name = Tests;
99-
sourceTree = "<group>";
100-
};
10180
/* End PBXGroup section */
10281

10382
/* Begin PBXHeadersBuildPhase section */

Configs/ArrowsTests.plist

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ class YourViewController: UIViewController {
3636

3737
The perfect companion for `Arrows` is [Panels](https://github.com/antoniocasero/Panels), take a look!
3838

39+
## More options
40+
41+
```swift
42+
/// Get the current position, if you want to change
43+
/// position use `update` function
44+
fileprivate(set) var arrowPosition: Position = .middle
45+
46+
/// Animation duration between arrow states (accesible from IB)
47+
@IBInspectable open var arrowAnimationDuration: Double = 0.30
48+
49+
/// Set arrow color (accesible from IB)
50+
@IBInspectable open var arrowColor: UIColor = .black
51+
```
52+
3953
<p align="center">
4054
<img src="Resources/ArrowExample.gif" width="237" height="471" alt="Arrowa demo1">
4155
</p>
@@ -47,7 +61,7 @@ The perfect companion for `Arrows` is [Panels](https://github.com/antoniocasero/
4761
Add the line `pod "Arrows"` to your `Podfile`
4862

4963
### Carthage
50-
Add the line `github "antoniocasero/Arrowa"` to your `Cartfile`
64+
Add the line `github "antoniocasero/Arrows"` to your `Cartfile`
5165

5266
## Author
5367
Project created by Antonio Casero ([@acaserop](https://twitter.com/acaserop) on Twitter).

Sources/ArrowView.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ open class ArrowView: UIView {
1414
/// Get the current position, if you want to change
1515
/// position use `update` function
1616
fileprivate(set) var arrowPosition: Position = .middle
17-
@IBInspectable var arrowColor: UIColor = .black {
17+
18+
/// Set arrow color
19+
@IBInspectable open var arrowColor: UIColor = .black {
1820
didSet {
1921
arrowLayer.fillColor = arrowColor.cgColor
2022
}
2123
}
2224

2325
/// Animation duration between arrow states
24-
open var arrowAnimationDuration: Double = 0.30
26+
@IBInspectable open var arrowAnimationDuration: Double = 0.30
2527

2628
/// Arrow positions
2729
///
@@ -81,7 +83,7 @@ open class ArrowView: UIView {
8183
}
8284

8385
extension ArrowView {
84-
private func commonInit(){
86+
private func commonInit() {
8587
layer.frame = self.bounds
8688
backgroundColor = .clear
8789
update(to: arrowPosition, animated: false)
@@ -111,7 +113,6 @@ extension ArrowView {
111113
controlPoint1: CGPoint(x: arrowFrame.minX + 0.86212 * frame.width, y: arrowFrame.minY + 0.48781 * arrowFrame.height),
112114
controlPoint2: CGPoint(x: arrowFrame.minX + 0.85246 * frame.width, y: arrowFrame.minY + 0.45044 * arrowFrame.height))
113115

114-
115116
bezierPath.close()
116117
bezierPath.miterLimit = 4
117118
return bezierPath

Tests/ArrowsTests/ArrowsTests.swift

Lines changed: 0 additions & 19 deletions
This file was deleted.

Tests/LinuxMain.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import XCTest
22
@testable import ArrowsTests
33

44
XCTMain([
5-
testCase(ArrowsTests.allTests),
5+
testCase(ArrowsTests.allTests)
66
])

0 commit comments

Comments
 (0)