3 Commits

Author SHA1 Message Date
Oskar 5d549ab629 IBInspectable fixes 2018-07-14 19:19:54 +02:00
Oskar c54689bccc Merge branch 'master' of https://github.com/OskarGroth/OGSwitch 2018-07-14 19:15:14 +02:00
Oskar 5ddc45e132 Remove podspec 2018-07-14 19:15:03 +02:00
5 changed files with 11 additions and 42 deletions
-12
View File
@@ -35,8 +35,6 @@
750F2E511E5D2D7200C20E79 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
750F2E531E5D2D7200C20E79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
75256FE120FA5ABC00ED6782 /* OGSwitch.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OGSwitch.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7553A35020F5045900EEA571 /* OGSwitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OGSwitch.h; sourceTree = "<group>"; };
7553A35120F5045900EEA571 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -55,7 +53,6 @@
isa = PBXGroup;
children = (
750F2E4B1E5D2D7100C20E79 /* OGSwitchDemo */,
7553A34F20F5045900EEA571 /* OGSwitch */,
750F2E3A1E5D2CD000C20E79 /* Products */,
75256FE020FA5ABC00ED6782 /* Frameworks */,
);
@@ -88,15 +85,6 @@
name = Frameworks;
sourceTree = "<group>";
};
7553A34F20F5045900EEA571 /* OGSwitch */ = {
isa = PBXGroup;
children = (
7553A35020F5045900EEA571 /* OGSwitch.h */,
7553A35120F5045900EEA571 /* Info.plist */,
);
path = OGSwitch;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
-24
View File
@@ -1,24 +0,0 @@
Pod::Spec.new do |s|
s.name = 'OGSwitch'
s.version = '1.0'
s.summary = 'Switch Control for macOS'
s.homepage = 'https://github.com/OskarGroth/OGSwitch'
s.license = {
:type => 'MIT',
:file => 'LICENSE'
}
s.author = {
'Oskar Groth' => 'oskar@cindori.org'
}
s.source = {
:git => 'https://github.com/OskarGroth/OGSwitch.git',
:tag => s.version.to_s
}
s.platform = :osx, '10.9'
s.source_files = 'OGSwitch/OGSwitch.{swift}'
s.requires_arc = true
s.screenshot = "https://raw.githubusercontent.com/OskarGroth/OGSwitch/master/screenshot.jpg"
s.social_media_url = "https://twitter.com/cindoriapps"
end
+10 -6
View File
@@ -49,7 +49,16 @@ import QuartzCore
reloadLayer()
}
}
@IBInspectable public var ignoreRatio: Bool = false
@IBInspectable public var ignoreRatio: Bool = false {
didSet {
reloadLayer()
}
}
@IBInspectable public var isEnabled: Bool = true {
didSet {
reloadLayerAnimated(animated: true)
}
}
let kBorderLineWidth:CGFloat = 1.0
let kGoldenRatio:CGFloat = 1.6180339875
@@ -69,11 +78,6 @@ import QuartzCore
public var knobInsideLayer: CALayer?
public var iconLayer = CALayer()
public var lockInteraction: Bool = false
public var isEnabled: Bool = true {
didSet {
reloadLayerAnimated(animated: true)
}
}
override public var acceptsFirstResponder: Bool {
get {
+1
View File
@@ -698,6 +698,7 @@
<userDefinedRuntimeAttribute type="color" keyPath="disabledBackgroundColor">
<color key="value" red="1" green="0.40000000600000002" blue="0.40000000600000002" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="isEnabled" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="switchPress:" target="Voe-Tx-rLC" id="Mqi-G6-fmv"/>