Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make properties public #16

Merged
merged 4 commits into from
Jul 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
objects = {

/* Begin PBXBuildFile section */
1C84929C1B4FA52800445D83 /* GaugeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C84929B1B4FA52800445D83 /* GaugeKit.framework */; };
1C84929D1B4FA52800445D83 /* GaugeKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1C84929B1B4FA52800445D83 /* GaugeKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1C9404FB1B31D057001BF122 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C9404FA1B31D057001BF122 /* AppDelegate.swift */; };
1C9405001B31D057001BF122 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1C9404FE1B31D057001BF122 /* Main.storyboard */; };
1C9405021B31D057001BF122 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1C9405011B31D057001BF122 /* Images.xcassets */; };
1C9405051B31D057001BF122 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1C9405031B31D057001BF122 /* LaunchScreen.xib */; };
1C9405111B31D057001BF122 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C9405101B31D057001BF122 /* ExampleTests.swift */; };
1C94051B1B31D12D001BF122 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C94051A1B31D12D001BF122 /* MainViewController.swift */; };
1CE31D5C1B345569006E4F7C /* AppleGaugeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CE31D5B1B345569006E4F7C /* AppleGaugeViewController.swift */; };
1CE6536E1B4BBD3C00FA4569 /* GaugeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CE6536D1B4BBD3C00FA4569 /* GaugeKit.framework */; };
1CE6536F1B4BBD3C00FA4569 /* GaugeKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1CE6536D1B4BBD3C00FA4569 /* GaugeKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -29,21 +29,21 @@
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
1CE653701B4BBD3C00FA4569 /* Embed Frameworks */ = {
1C84929E1B4FA52900445D83 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
1CE6536F1B4BBD3C00FA4569 /* GaugeKit.framework in Embed Frameworks */,
1C84929D1B4FA52800445D83 /* GaugeKit.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
1C8603F11B49DFB2005F495B /* GaugeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GaugeKit.framework; path = "../build/Debug-iphoneos/GaugeKit.framework"; sourceTree = "<group>"; };
1C84929B1B4FA52800445D83 /* GaugeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = GaugeKit.framework; path = "/Users/petrkorolev/Library/Developer/Xcode/DerivedData/GaugeKit-evarryfseqjhwbcgaxucqvnmcesq/Build/Products/Debug-iphoneos/GaugeKit.framework"; sourceTree = "<absolute>"; };
1C9404F51B31D057001BF122 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
1C9404F91B31D057001BF122 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1C9404FA1B31D057001BF122 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -55,15 +55,14 @@
1C9405101B31D057001BF122 /* ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = "<group>"; };
1C94051A1B31D12D001BF122 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
1CE31D5B1B345569006E4F7C /* AppleGaugeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppleGaugeViewController.swift; sourceTree = "<group>"; };
1CE6536D1B4BBD3C00FA4569 /* GaugeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = GaugeKit.framework; path = "/Users/petrkorolev/Library/Developer/Xcode/DerivedData/GaugeKit-bmbifmbfuibegzaycqpznxyhungq/Build/Products/Debug-iphoneos/GaugeKit.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1C9404F21B31D057001BF122 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1CE6536E1B4BBD3C00FA4569 /* GaugeKit.framework in Frameworks */,
1C84929C1B4FA52800445D83 /* GaugeKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -80,8 +79,7 @@
1C9404EC1B31D057001BF122 = {
isa = PBXGroup;
children = (
1CE6536D1B4BBD3C00FA4569 /* GaugeKit.framework */,
1C8603F11B49DFB2005F495B /* GaugeKit.framework */,
1C84929B1B4FA52800445D83 /* GaugeKit.framework */,
1C9404F71B31D057001BF122 /* Example */,
1C94050D1B31D057001BF122 /* ExampleTests */,
1C9404F61B31D057001BF122 /* Products */,
Expand Down Expand Up @@ -146,7 +144,7 @@
1C9404F11B31D057001BF122 /* Sources */,
1C9404F21B31D057001BF122 /* Frameworks */,
1C9404F31B31D057001BF122 /* Resources */,
1CE653701B4BBD3C00FA4569 /* Embed Frameworks */,
1C84929E1B4FA52900445D83 /* Embed Frameworks */,
);
buildRules = (
);
Expand Down
112 changes: 112 additions & 0 deletions Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9404F41B31D057001BF122"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9405091B31D057001BF122"
BuildableName = "ExampleTests.xctest"
BlueprintName = "ExampleTests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9405091B31D057001BF122"
BuildableName = "ExampleTests.xctest"
BlueprintName = "ExampleTests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9404F41B31D057001BF122"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9404F41B31D057001BF122"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9404F41B31D057001BF122"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-29@3x-1.png",
"scale" : "3x"
},
{
Expand Down
Binary file modified Example/Example/Images.xcassets/AppIcon.appiconset/Icon-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Example/Example/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Example/Example/Images.xcassets/AppIcon.appiconset/Icon-40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Example/Example/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Example/Example/Images.xcassets/AppIcon.appiconset/Icon-76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions GaugeKit/Gauge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ public class Gauge: UIView {
case Custom
}

@IBInspectable var startColor: UIColor = UIColor.greenColor() {
@IBInspectable public var startColor: UIColor = UIColor.greenColor() {
didSet {
updateLayerProperties()
}
}

/// default is nil: endColor is same as startColor
@IBInspectable var endColor: UIColor {
@IBInspectable public var endColor: UIColor {
get {
if let _endColor = _endColor {
return _endColor
Expand All @@ -44,9 +44,10 @@ public class Gauge: UIView {
updateLayerProperties()
}
}
@IBInspectable var bgColor: UIColor? {
@IBInspectable public var bgColor: UIColor? {
didSet {
updateLayerProperties()
setNeedsLayout()
}
}

Expand All @@ -69,27 +70,27 @@ public class Gauge: UIView {
}
}
}
@IBInspectable var bgAlpha: CGFloat = 0.2 {
@IBInspectable public var bgAlpha: CGFloat = 0.2 {
didSet {
updateLayerProperties()
}
}
@IBInspectable var rotate: Double = 0 {
@IBInspectable public var rotate: Double = 0 {
didSet {
updateLayerProperties()
}
}
@IBInspectable var colorsArray: Bool = false {
@IBInspectable public var colorsArray: Bool = false {
didSet {
updateLayerProperties()
}
}
@IBInspectable var shadowRadius: CGFloat = 0 {
@IBInspectable public var shadowRadius: CGFloat = 0 {
didSet {
updateLayerProperties()
}
}
@IBInspectable var shadowOpacity: Float = 0.5 {
@IBInspectable public var shadowOpacity: Float = 0.5 {
didSet {
updateLayerProperties()
}
Expand Down