4 Commits

Author SHA1 Message Date
Oskar Groth 9bc2acc5f4 Update README.md 2018-07-14 19:13:09 +02:00
Oskar Groth d103720de4 Update 2018-07-14 19:08:46 +02:00
Oskar 09cd2cd79c IBDesignable 2018-07-14 19:06:11 +02:00
Oskar 4c2a062a71 Swift header 2018-07-14 18:54:12 +02:00
5 changed files with 10 additions and 7 deletions
+4 -2
View File
@@ -7,8 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
75256FD820FA5A0E00ED6782 /* OGSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 75256FD620FA5A0E00ED6782 /* OGSwitch.h */; settings = {ATTRIBUTES = (Public, ); }; };
75256FDF20FA5A3E00ED6782 /* OGSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75256FDE20FA5A3E00ED6782 /* OGSwitch.swift */; };
753FF1A520FA64B500DFA33E /* OGSwitch.swift in Headers */ = {isa = PBXBuildFile; fileRef = 75256FDE20FA5A3E00ED6782 /* OGSwitch.swift */; settings = {ATTRIBUTES = (Public, ); }; };
753FF1A620FA64D200DFA33E /* OGSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 75256FD620FA5A0E00ED6782 /* OGSwitch.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -62,7 +63,8 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
75256FD820FA5A0E00ED6782 /* OGSwitch.h in Headers */,
753FF1A620FA64D200DFA33E /* OGSwitch.h in Headers */,
753FF1A520FA64B500DFA33E /* OGSwitch.swift in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
-4
View File
@@ -13,7 +13,3 @@ FOUNDATION_EXPORT double OGSwitchVersionNumber;
//! Project version string for OGSwitch.
FOUNDATION_EXPORT const unsigned char OGSwitchVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <OGSwitch/PublicHeader.h>
+1 -1
View File
@@ -11,7 +11,7 @@ import QuartzCore
//Can not be NSControl due to 10.9 issues: https://github.com/iluuu1994/ITSwitch/issues/21
public class OGSwitch : NSView {
@IBDesignable public class OGSwitch : NSView {
@IBInspectable public var tintColor: NSColor = NSColor(calibratedRed:0.27, green: 0.86, blue: 0.36, alpha: 1.0) {
didSet {
+5
View File
@@ -9,6 +9,11 @@ This is a `NSView` subclass that lets you create beautiful iOS-inspired switches
![OGSwitch for macOS](https://s3.amazonaws.com/cindori/images/ogswitch.png "OGSwitch for macOS")
`OGSwitch` now also supports `IBDesignable` and renders directly in Interface Builder:
![IBDesignable](https://i.imgur.com/F86YoKv.png "IBDesignable")
## Installation (Carthage)
Configure your Cartfile to use `OGSwitch`: