Commit 5e8d2dec by Daniel Dahan

initial commit

parent ebfbb737
...@@ -7,20 +7,27 @@ ...@@ -7,20 +7,27 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
963832421B88DFD80015F710 /* FocusKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* FocusKit.framework */; }; 963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; };
963832561B88E30F0015F710 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 963832541B88E30F0015F710 /* Info.plist */; };
9638325A1B88E31A0015F710 /* FocusKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832581B88E31A0015F710 /* FocusKitTests.swift */; }; 9638325A1B88E31A0015F710 /* FocusKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832581B88E31A0015F710 /* FocusKitTests.swift */; };
9638325B1B88E31A0015F710 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 963832591B88E31A0015F710 /* Info.plist */; };
963832691B88E5BF0015F710 /* Capture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9638325E1B88E5BF0015F710 /* Capture.swift */; }; 963832691B88E5BF0015F710 /* Capture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9638325E1B88E5BF0015F710 /* Capture.swift */; };
9638326A1B88E5BF0015F710 /* CapturePreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9638325F1B88E5BF0015F710 /* CapturePreview.swift */; }; 9638326A1B88E5BF0015F710 /* CapturePreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9638325F1B88E5BF0015F710 /* CapturePreview.swift */; };
9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832601B88E5BF0015F710 /* FabButton.swift */; }; 9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832601B88E5BF0015F710 /* FabButton.swift */; };
9638326C1B88E5BF0015F710 /* FlatButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832611B88E5BF0015F710 /* FlatButton.swift */; }; 9638326C1B88E5BF0015F710 /* FlatButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832611B88E5BF0015F710 /* FlatButton.swift */; };
9638326E1B88E5BF0015F710 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 963832631B88E5BF0015F710 /* LICENSE */; }; 9638326E1B88E5BF0015F710 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 963832631B88E5BF0015F710 /* LICENSE */; };
9638326F1B88E5BF0015F710 /* MaterialKit+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832641B88E5BF0015F710 /* MaterialKit+UIView.swift */; };
963832701B88E5BF0015F710 /* RaisedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832651B88E5BF0015F710 /* RaisedButton.swift */; }; 963832701B88E5BF0015F710 /* RaisedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832651B88E5BF0015F710 /* RaisedButton.swift */; };
963832711B88E5BF0015F710 /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832661B88E5BF0015F710 /* Text.swift */; }; 963832711B88E5BF0015F710 /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832661B88E5BF0015F710 /* Text.swift */; };
963832721B88E5BF0015F710 /* TextStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832671B88E5BF0015F710 /* TextStorage.swift */; }; 963832721B88E5BF0015F710 /* TextStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832671B88E5BF0015F710 /* TextStorage.swift */; };
963832731B88E5BF0015F710 /* TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832681B88E5BF0015F710 /* TextView.swift */; }; 963832731B88E5BF0015F710 /* TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832681B88E5BF0015F710 /* TextView.swift */; };
9638327E1B89070E0015F710 /* Text.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832661B88E5BF0015F710 /* Text.swift */; settings = {ATTRIBUTES = (Public, ); }; };
9638327F1B89070E0015F710 /* TextStorage.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832671B88E5BF0015F710 /* TextStorage.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832801B89070E0015F710 /* TextView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832681B88E5BF0015F710 /* TextView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832811B89070E0015F710 /* FabButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832601B88E5BF0015F710 /* FabButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832821B89070E0015F710 /* FlatButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832611B88E5BF0015F710 /* FlatButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832831B89070E0015F710 /* RaisedButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832651B88E5BF0015F710 /* RaisedButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832841B89070E0015F710 /* Capture.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9638325E1B88E5BF0015F710 /* Capture.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832851B89070E0015F710 /* CapturePreview.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9638325F1B88E5BF0015F710 /* CapturePreview.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832881B8908180015F710 /* Layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832871B8908180015F710 /* Layout.swift */; };
963832891B89097D0015F710 /* Layout.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832871B8908180015F710 /* Layout.swift */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -34,8 +41,8 @@ ...@@ -34,8 +41,8 @@
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
963832361B88DFD80015F710 /* FocusKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FocusKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
963832411B88DFD80015F710 /* FocusKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FocusKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 963832411B88DFD80015F710 /* MaterialKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
963832541B88E30F0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 963832541B88E30F0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
963832581B88E31A0015F710 /* FocusKitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FocusKitTests.swift; sourceTree = "<group>"; }; 963832581B88E31A0015F710 /* FocusKitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FocusKitTests.swift; sourceTree = "<group>"; };
963832591B88E31A0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 963832591B88E31A0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
...@@ -44,11 +51,11 @@ ...@@ -44,11 +51,11 @@
963832601B88E5BF0015F710 /* FabButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FabButton.swift; sourceTree = "<group>"; }; 963832601B88E5BF0015F710 /* FabButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FabButton.swift; sourceTree = "<group>"; };
963832611B88E5BF0015F710 /* FlatButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlatButton.swift; sourceTree = "<group>"; }; 963832611B88E5BF0015F710 /* FlatButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlatButton.swift; sourceTree = "<group>"; };
963832631B88E5BF0015F710 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 963832631B88E5BF0015F710 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
963832641B88E5BF0015F710 /* MaterialKit+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MaterialKit+UIView.swift"; sourceTree = "<group>"; };
963832651B88E5BF0015F710 /* RaisedButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RaisedButton.swift; sourceTree = "<group>"; }; 963832651B88E5BF0015F710 /* RaisedButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RaisedButton.swift; sourceTree = "<group>"; };
963832661B88E5BF0015F710 /* Text.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Text.swift; sourceTree = "<group>"; }; 963832661B88E5BF0015F710 /* Text.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Text.swift; sourceTree = "<group>"; };
963832671B88E5BF0015F710 /* TextStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextStorage.swift; sourceTree = "<group>"; }; 963832671B88E5BF0015F710 /* TextStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextStorage.swift; sourceTree = "<group>"; };
963832681B88E5BF0015F710 /* TextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = "<group>"; }; 963832681B88E5BF0015F710 /* TextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = "<group>"; };
963832871B8908180015F710 /* Layout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Layout.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -63,7 +70,7 @@ ...@@ -63,7 +70,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
963832421B88DFD80015F710 /* FocusKit.framework in Frameworks */, 963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -82,8 +89,8 @@ ...@@ -82,8 +89,8 @@
963832371B88DFD80015F710 /* Products */ = { 963832371B88DFD80015F710 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
963832361B88DFD80015F710 /* FocusKit.framework */, 963832361B88DFD80015F710 /* MaterialKit.framework */,
963832411B88DFD80015F710 /* FocusKitTests.xctest */, 963832411B88DFD80015F710 /* MaterialKitTests.xctest */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -92,10 +99,11 @@ ...@@ -92,10 +99,11 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
9638325C1B88E3420015F710 /* Supporting Files */, 9638325C1B88E3420015F710 /* Supporting Files */,
963832631B88E5BF0015F710 /* LICENSE */,
963832861B8907FE0015F710 /* Layout */,
963832761B88E8990015F710 /* Text */, 963832761B88E8990015F710 /* Text */,
963832751B88E87B0015F710 /* Material */, 963832751B88E87B0015F710 /* Button */,
963832741B88E86B0015F710 /* Capture */, 963832741B88E86B0015F710 /* Capture */,
963832631B88E5BF0015F710 /* LICENSE */,
); );
path = Source; path = Source;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -134,15 +142,14 @@ ...@@ -134,15 +142,14 @@
name = Capture; name = Capture;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
963832751B88E87B0015F710 /* Material */ = { 963832751B88E87B0015F710 /* Button */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
963832641B88E5BF0015F710 /* MaterialKit+UIView.swift */,
963832601B88E5BF0015F710 /* FabButton.swift */, 963832601B88E5BF0015F710 /* FabButton.swift */,
963832611B88E5BF0015F710 /* FlatButton.swift */, 963832611B88E5BF0015F710 /* FlatButton.swift */,
963832651B88E5BF0015F710 /* RaisedButton.swift */, 963832651B88E5BF0015F710 /* RaisedButton.swift */,
); );
name = Material; name = Button;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
963832761B88E8990015F710 /* Text */ = { 963832761B88E8990015F710 /* Text */ = {
...@@ -155,6 +162,14 @@ ...@@ -155,6 +162,14 @@
name = Text; name = Text;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
963832861B8907FE0015F710 /* Layout */ = {
isa = PBXGroup;
children = (
963832871B8908180015F710 /* Layout.swift */,
);
name = Layout;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */ /* Begin PBXHeadersBuildPhase section */
...@@ -162,15 +177,24 @@ ...@@ -162,15 +177,24 @@
isa = PBXHeadersBuildPhase; isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
9638327E1B89070E0015F710 /* Text.swift in Headers */,
9638327F1B89070E0015F710 /* TextStorage.swift in Headers */,
963832801B89070E0015F710 /* TextView.swift in Headers */,
963832811B89070E0015F710 /* FabButton.swift in Headers */,
963832821B89070E0015F710 /* FlatButton.swift in Headers */,
963832831B89070E0015F710 /* RaisedButton.swift in Headers */,
963832841B89070E0015F710 /* Capture.swift in Headers */,
963832851B89070E0015F710 /* CapturePreview.swift in Headers */,
963832891B89097D0015F710 /* Layout.swift in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXHeadersBuildPhase section */ /* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
963832351B88DFD80015F710 /* FocusKit */ = { 963832351B88DFD80015F710 /* MaterialKit */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 9638324C1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "FocusKit" */; buildConfigurationList = 9638324C1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "MaterialKit" */;
buildPhases = ( buildPhases = (
963832311B88DFD80015F710 /* Sources */, 963832311B88DFD80015F710 /* Sources */,
963832321B88DFD80015F710 /* Frameworks */, 963832321B88DFD80015F710 /* Frameworks */,
...@@ -181,14 +205,14 @@ ...@@ -181,14 +205,14 @@
); );
dependencies = ( dependencies = (
); );
name = FocusKit; name = MaterialKit;
productName = FocusKit; productName = FocusKit;
productReference = 963832361B88DFD80015F710 /* FocusKit.framework */; productReference = 963832361B88DFD80015F710 /* MaterialKit.framework */;
productType = "com.apple.product-type.framework"; productType = "com.apple.product-type.framework";
}; };
963832401B88DFD80015F710 /* FocusKitTests */ = { 963832401B88DFD80015F710 /* MaterialKitTests */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 9638324F1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "FocusKitTests" */; buildConfigurationList = 9638324F1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "MaterialKitTests" */;
buildPhases = ( buildPhases = (
9638323D1B88DFD80015F710 /* Sources */, 9638323D1B88DFD80015F710 /* Sources */,
9638323E1B88DFD80015F710 /* Frameworks */, 9638323E1B88DFD80015F710 /* Frameworks */,
...@@ -199,9 +223,9 @@ ...@@ -199,9 +223,9 @@
dependencies = ( dependencies = (
963832441B88DFD80015F710 /* PBXTargetDependency */, 963832441B88DFD80015F710 /* PBXTargetDependency */,
); );
name = FocusKitTests; name = MaterialKitTests;
productName = FocusKitTests; productName = FocusKitTests;
productReference = 963832411B88DFD80015F710 /* FocusKitTests.xctest */; productReference = 963832411B88DFD80015F710 /* MaterialKitTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test"; productType = "com.apple.product-type.bundle.unit-test";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
...@@ -221,7 +245,7 @@ ...@@ -221,7 +245,7 @@
}; };
}; };
}; };
buildConfigurationList = 963832301B88DFD80015F710 /* Build configuration list for PBXProject "FocusKit" */; buildConfigurationList = 963832301B88DFD80015F710 /* Build configuration list for PBXProject "MaterialKit" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
developmentRegion = English; developmentRegion = English;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
...@@ -233,8 +257,8 @@ ...@@ -233,8 +257,8 @@
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
targets = ( targets = (
963832351B88DFD80015F710 /* FocusKit */, 963832351B88DFD80015F710 /* MaterialKit */,
963832401B88DFD80015F710 /* FocusKitTests */, 963832401B88DFD80015F710 /* MaterialKitTests */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
...@@ -245,7 +269,6 @@ ...@@ -245,7 +269,6 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
9638326E1B88E5BF0015F710 /* LICENSE in Resources */, 9638326E1B88E5BF0015F710 /* LICENSE in Resources */,
963832561B88E30F0015F710 /* Info.plist in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -253,7 +276,6 @@ ...@@ -253,7 +276,6 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
9638325B1B88E31A0015F710 /* Info.plist in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -268,8 +290,8 @@ ...@@ -268,8 +290,8 @@
9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */, 9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */,
9638326C1B88E5BF0015F710 /* FlatButton.swift in Sources */, 9638326C1B88E5BF0015F710 /* FlatButton.swift in Sources */,
963832711B88E5BF0015F710 /* Text.swift in Sources */, 963832711B88E5BF0015F710 /* Text.swift in Sources */,
9638326F1B88E5BF0015F710 /* MaterialKit+UIView.swift in Sources */,
9638326A1B88E5BF0015F710 /* CapturePreview.swift in Sources */, 9638326A1B88E5BF0015F710 /* CapturePreview.swift in Sources */,
963832881B8908180015F710 /* Layout.swift in Sources */,
963832731B88E5BF0015F710 /* TextView.swift in Sources */, 963832731B88E5BF0015F710 /* TextView.swift in Sources */,
963832721B88E5BF0015F710 /* TextStorage.swift in Sources */, 963832721B88E5BF0015F710 /* TextStorage.swift in Sources */,
963832701B88E5BF0015F710 /* RaisedButton.swift in Sources */, 963832701B88E5BF0015F710 /* RaisedButton.swift in Sources */,
...@@ -289,7 +311,7 @@ ...@@ -289,7 +311,7 @@
/* Begin PBXTargetDependency section */ /* Begin PBXTargetDependency section */
963832441B88DFD80015F710 /* PBXTargetDependency */ = { 963832441B88DFD80015F710 /* PBXTargetDependency */ = {
isa = PBXTargetDependency; isa = PBXTargetDependency;
target = 963832351B88DFD80015F710 /* FocusKit */; target = 963832351B88DFD80015F710 /* MaterialKit */;
targetProxy = 963832431B88DFD80015F710 /* PBXContainerItemProxy */; targetProxy = 963832431B88DFD80015F710 /* PBXContainerItemProxy */;
}; };
/* End PBXTargetDependency section */ /* End PBXTargetDependency section */
...@@ -332,7 +354,7 @@ ...@@ -332,7 +354,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
...@@ -374,7 +396,7 @@ ...@@ -374,7 +396,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
...@@ -395,7 +417,7 @@ ...@@ -395,7 +417,7 @@
INFOPLIST_FILE = Source/Info.plist; INFOPLIST_FILE = Source/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = MaterialKit;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
}; };
...@@ -412,7 +434,7 @@ ...@@ -412,7 +434,7 @@
INFOPLIST_FILE = Source/Info.plist; INFOPLIST_FILE = Source/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = MaterialKit;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
}; };
name = Release; name = Release;
...@@ -430,7 +452,7 @@ ...@@ -430,7 +452,7 @@
); );
INFOPLIST_FILE = Tests/Info.plist; INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = MaterialKitTests;
}; };
name = Debug; name = Debug;
}; };
...@@ -443,14 +465,14 @@ ...@@ -443,14 +465,14 @@
); );
INFOPLIST_FILE = Tests/Info.plist; INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = MaterialKitTests;
}; };
name = Release; name = Release;
}; };
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
963832301B88DFD80015F710 /* Build configuration list for PBXProject "FocusKit" */ = { 963832301B88DFD80015F710 /* Build configuration list for PBXProject "MaterialKit" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
9638324A1B88DFD80015F710 /* Debug */, 9638324A1B88DFD80015F710 /* Debug */,
...@@ -459,7 +481,7 @@ ...@@ -459,7 +481,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
9638324C1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "FocusKit" */ = { 9638324C1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "MaterialKit" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
9638324D1B88DFD80015F710 /* Debug */, 9638324D1B88DFD80015F710 /* Debug */,
...@@ -468,7 +490,7 @@ ...@@ -468,7 +490,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
9638324F1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "FocusKitTests" */ = { 9638324F1B88DFD80015F710 /* Build configuration list for PBXNativeTarget "MaterialKitTests" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
963832501B88DFD80015F710 /* Debug */, 963832501B88DFD80015F710 /* Debug */,
......
...@@ -21,28 +21,28 @@ import AVFoundation ...@@ -21,28 +21,28 @@ import AVFoundation
@objc(PreviewDelegate) @objc(PreviewDelegate)
public protocol PreviewDelegate { public protocol PreviewDelegate {
optional func preview(preview: Preview!, tappedToFocusAt point: CGPoint) optional func previewTappedToFocusAt(preview: Preview, point: CGPoint)
optional func preview(preview: Preview!, tappedToExposeAt point: CGPoint) optional func previewTappedToExposeAt(preview: Preview, point: CGPoint)
optional func preview(preview: Preview!, tappedToReset focus: UIView!, exposure: UIView!) optional func previewTappedToReset(preview: Preview, focus: UIView, exposure: UIView)
} }
public class Preview: UIView { public class Preview: UIView {
/** /**
* boxBounds :name: boxBounds
* A static property that sets the initial size of the focusBox and exposureBox properties. :description: A static property that sets the initial size of the focusBox and exposureBox properties.
*/ */
static public var boxBounds: CGRect = CGRectMake(0, 0, 150, 150) static public var boxBounds: CGRect = CGRectMake(0, 0, 150, 150)
/** /**
* delegate :name: delegate
* An optional instance of PreviewDelegate to handle events that are triggered during various :description: An optional instance of PreviewDelegate to handle events that are triggered during various
* stages of engagement. stages of engagement.
*/ */
public weak var delegate: PreviewDelegate? public weak var delegate: PreviewDelegate?
/** /**
* tapToFocusEnabled :name: tapToFocusEnabled
* A mutator and accessor that enables and disables tap to focus gesture. :description: A mutator and accessor that enables and disables tap to focus gesture.
*/ */
public var tapToFocusEnabled: Bool { public var tapToFocusEnabled: Bool {
get { get {
...@@ -54,8 +54,8 @@ public class Preview: UIView { ...@@ -54,8 +54,8 @@ public class Preview: UIView {
} }
/** /**
* tapToExposeEnabled :name: tapToExposeEnabled
* A mutator and accessor that enables and disables tap to expose gesture. :description: A mutator and accessor that enables and disables tap to expose gesture.
*/ */
public var tapToExposeEnabled: Bool { public var tapToExposeEnabled: Bool {
get { get {
...@@ -66,9 +66,9 @@ public class Preview: UIView { ...@@ -66,9 +66,9 @@ public class Preview: UIView {
} }
} }
/** //
* override for layerClass // override for layerClass
*/ //
override public class func layerClass() -> AnyClass { override public class func layerClass() -> AnyClass {
return AVCaptureVideoPreviewLayer.self return AVCaptureVideoPreviewLayer.self
} }
...@@ -142,7 +142,7 @@ public class Preview: UIView { ...@@ -142,7 +142,7 @@ public class Preview: UIView {
internal func handleSingleTap(recognizer: UIGestureRecognizer) { internal func handleSingleTap(recognizer: UIGestureRecognizer) {
let point: CGPoint = recognizer.locationInView(self) let point: CGPoint = recognizer.locationInView(self)
runBoxAnimationOnView(focusBox, point: point) runBoxAnimationOnView(focusBox, point: point)
delegate?.preview?(self, tappedToFocusAt: captureDevicePointForPoint(point)) delegate?.previewTappedToFocusAt?(self, point: captureDevicePointForPoint(point))
} }
/** /**
...@@ -153,7 +153,7 @@ public class Preview: UIView { ...@@ -153,7 +153,7 @@ public class Preview: UIView {
internal func handleDoubleTap(recognizer: UIGestureRecognizer) { internal func handleDoubleTap(recognizer: UIGestureRecognizer) {
let point: CGPoint = recognizer.locationInView(self) let point: CGPoint = recognizer.locationInView(self)
runBoxAnimationOnView(exposureBox, point: point) runBoxAnimationOnView(exposureBox, point: point)
delegate?.preview?(self, tappedToExposeAt: captureDevicePointForPoint(point)) delegate?.previewTappedToExposeAt?(self, point: captureDevicePointForPoint(point))
} }
/** /**
...@@ -270,7 +270,7 @@ public class Preview: UIView { ...@@ -270,7 +270,7 @@ public class Preview: UIView {
self.exposureBox!.hidden = true self.exposureBox!.hidden = true
self.focusBox!.transform = CGAffineTransformIdentity self.focusBox!.transform = CGAffineTransformIdentity
self.exposureBox!.transform = CGAffineTransformIdentity self.exposureBox!.transform = CGAffineTransformIdentity
self.delegate?.preview?(self, tappedToReset: self.focusBox!, exposure: self.exposureBox!) self.delegate?.previewTappedToReset?(self, focus: self.focusBox!, exposure: self.exposureBox!)
} }
} }
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import UIKit import UIKit
class FabButton : UIButton { public class FabButton : UIButton {
var lineWidth: CGFloat = 2.0 var lineWidth: CGFloat = 2.0
...@@ -29,20 +29,24 @@ class FabButton : UIButton { ...@@ -29,20 +29,24 @@ class FabButton : UIButton {
private var hLine: UIView? private var hLine: UIView?
private var backgroundColorView: UIView? private var backgroundColorView: UIView?
private var pulseView: UIView? private var pulseView: UIView?
override func drawRect(rect: CGRect) { public convenience init() {
self.init(frame: CGRectZero)
}
public override func drawRect(rect: CGRect) {
setupContext(rect) setupContext(rect)
setupBackgroundColorView() setupBackgroundColorView()
setupPlus() setupPlus()
} }
required init(coder aDecoder: NSCoder) { public required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
initialize() initialize()
applyShadow() applyShadow()
} }
required override init(frame: CGRect) { public required override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
initialize() initialize()
applyShadow() applyShadow()
...@@ -67,11 +71,11 @@ class FabButton : UIButton { ...@@ -67,11 +71,11 @@ class FabButton : UIButton {
// so the pulse doesn't animate off the button // so the pulse doesn't animate off the button
func setupBackgroundColorView() { func setupBackgroundColorView() {
backgroundColorView = UIView() backgroundColorView = UIView()
backgroundColorView!.frame = self.bounds backgroundColorView!.frame = bounds
backgroundColorView!.layer.cornerRadius = boundsW() / 2.0 backgroundColorView!.layer.cornerRadius = bounds.width / 2.0
backgroundColorView!.backgroundColor = color backgroundColorView!.backgroundColor = color
backgroundColorView!.layer.masksToBounds = true backgroundColorView!.layer.masksToBounds = true
self.insertSubview(backgroundColorView!, atIndex: 0) insertSubview(backgroundColorView!, atIndex: 0)
} }
// I make the + with two views because // I make the + with two views because
...@@ -103,12 +107,14 @@ class FabButton : UIButton { ...@@ -103,12 +107,14 @@ class FabButton : UIButton {
layer.shadowRadius = 5 layer.shadowRadius = 5
} }
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { override public func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
pulseTouches(touches) super.touchesBegan(touches, withEvent: event)
pulseTouches(touches)
} }
override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) { override public func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) {
shrink() super.touchesEnded(touches, withEvent: event)
shrink()
removePulse() removePulse()
} }
...@@ -116,8 +122,8 @@ class FabButton : UIButton { ...@@ -116,8 +122,8 @@ class FabButton : UIButton {
let touch = touches.allObjects.last as! UITouch let touch = touches.allObjects.last as! UITouch
let touchLocation = touch.locationInView(self) let touchLocation = touch.locationInView(self)
pulseView = UIView() pulseView = UIView()
pulseView!.frame = CGRectMake(0, 0, boundsW(), boundsH()) pulseView!.frame = CGRectMake(0, 0, bounds.width, bounds.height)
pulseView!.layer.cornerRadius = boundsW() / 2.0 pulseView!.layer.cornerRadius = bounds.width / 2.0
pulseView!.center = touchLocation pulseView!.center = touchLocation
pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5) pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5)
backgroundColorView!.addSubview(pulseView!) backgroundColorView!.addSubview(pulseView!)
...@@ -134,7 +140,7 @@ class FabButton : UIButton { ...@@ -134,7 +140,7 @@ class FabButton : UIButton {
} }
func removePulse() { func removePulse() {
UIView.animateWithDuration(0.3, animations: { () -> Void in UIView.animateWithDuration(0.3, animations: { _ in
self.pulseView?.alpha = 0.0 self.pulseView?.alpha = 0.0
}) { (finished) -> Void in }) { (finished) -> Void in
self.pulseView?.removeFromSuperview() self.pulseView?.removeFromSuperview()
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import UIKit import UIKit
class FlatButton : UIButton { public class FlatButton : UIButton {
var textColor: UIColor? var textColor: UIColor?
var pulseColor: UIColor? var pulseColor: UIColor?
...@@ -28,18 +28,18 @@ class FlatButton : UIButton { ...@@ -28,18 +28,18 @@ class FlatButton : UIButton {
private var backgroundColorView: UIView = UIView() private var backgroundColorView: UIView = UIView()
private var pulseView: UIView? private var pulseView: UIView?
override func drawRect(rect: CGRect) { public override func drawRect(rect: CGRect) {
setupContext(rect) setupContext(rect)
setupBackgroundColorView() setupBackgroundColorView()
} }
required init(coder aDecoder: NSCoder) { public required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
initialize() initialize()
applyShadow() applyShadow()
} }
required override init(frame: CGRect) { public required override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
initialize() initialize()
applyShadow() applyShadow()
...@@ -75,11 +75,11 @@ class FlatButton : UIButton { ...@@ -75,11 +75,11 @@ class FlatButton : UIButton {
layer.shadowRadius = 5 layer.shadowRadius = 5
} }
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { public override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
pulseTouches(touches) pulseTouches(touches)
} }
override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) { public override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) {
shrink() shrink()
removePulse() removePulse()
} }
...@@ -89,7 +89,7 @@ class FlatButton : UIButton { ...@@ -89,7 +89,7 @@ class FlatButton : UIButton {
let touchLocation = touch.locationInView(self) let touchLocation = touch.locationInView(self)
pulseView = UIView() pulseView = UIView()
pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height) pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height)
pulseView!.layer.cornerRadius = boundsH() / 2.0 pulseView!.layer.cornerRadius = bounds.height / 2.0
pulseView!.center = touchLocation pulseView!.center = touchLocation
pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5) pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5)
backgroundColorView.addSubview(pulseView!) backgroundColorView.addSubview(pulseView!)
......
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
public struct Layout {
public static func topRight(parent: UIView, child: UIView, width: CGFloat, height: CGFloat, top: CGFloat, right: CGFloat) {
parent.addSubview(child)
var metrics = ["width" : width, "height" : height, "top" : top, "right" : right]
var views = ["view" : child]
var viewBindingsDict: NSMutableDictionary = NSMutableDictionary()
viewBindingsDict.setValue(child, forKey: "child")
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:[child(width)]-(right)-|", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(top)-[child(height)]", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
}
public static func topLeft(parent: UIView, child: UIView, width: CGFloat, height: CGFloat, top: CGFloat, left: CGFloat) {
parent.addSubview(child)
var metrics = ["width" : width, "height" : height, "top" : top, "left" : left]
var views = ["view" : child]
var viewBindingsDict: NSMutableDictionary = NSMutableDictionary()
viewBindingsDict.setValue(child, forKey: "child")
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-(left)-[child(width)]", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(top)-[child(height)]", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
}
public static func bottomRight(parent: UIView, child: UIView, width: CGFloat, height: CGFloat, bottom: CGFloat, right: CGFloat) {
parent.addSubview(child)
var metrics = ["width" : width, "height" : height, "bottom" : bottom, "right" : right]
var views = ["view" : child]
var viewBindingsDict: NSMutableDictionary = NSMutableDictionary()
viewBindingsDict.setValue(child, forKey: "child")
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:[child(width)]-(right)-|", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:[child(height)]-(bottom)-|", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
}
public static func bottomLeft(parent: UIView, child: UIView, width: CGFloat, height: CGFloat, bottom: CGFloat, left: CGFloat) {
parent.addSubview(child)
var metrics = ["width" : width, "height" : height, "bottom" : bottom, "left" : left]
var views = ["view" : child]
var viewBindingsDict: NSMutableDictionary = NSMutableDictionary()
viewBindingsDict.setValue(child, forKey: "child")
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-(left)-[child(width)]", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
parent.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:[child(height)]-(bottom)-|", options: nil, metrics: metrics, views: viewBindingsDict as [NSObject : AnyObject]))
}
}
//
// Copyright (C) 2015 Adam Dahan <https://github.com/adamdahan>.
// Copyright (C) 2015 Daniel Dahan <https://github.com/danieldahan>.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
extension UIView {
func frameW() -> CGFloat {
return self.frame.size.width
}
func frameH() -> CGFloat {
return self.frame.size.height
}
func frameX() -> CGFloat {
return self.frame.origin.x
}
func frameY() -> CGFloat {
return self.frame.origin.y
}
func boundsW() -> CGFloat {
return self.bounds.size.width
}
func boundsH() -> CGFloat {
return self.bounds.size.height
}
func boundsX() -> CGFloat {
return self.bounds.origin.x
}
func boundsY() -> CGFloat {
return self.bounds.origin.y
}
}
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import UIKit import UIKit
class RaisedButton : UIButton { public class RaisedButton : UIButton {
var color: UIColor? var color: UIColor?
var pulseColor: UIColor? var pulseColor: UIColor?
...@@ -28,18 +28,18 @@ class RaisedButton : UIButton { ...@@ -28,18 +28,18 @@ class RaisedButton : UIButton {
private var backgroundColorView: UIView = UIView() private var backgroundColorView: UIView = UIView()
private var pulseView: UIView? private var pulseView: UIView?
override func drawRect(rect: CGRect) { public override func drawRect(rect: CGRect) {
setupContext(rect) setupContext(rect)
setupBackgroundColorView() setupBackgroundColorView()
} }
required init(coder aDecoder: NSCoder) { public required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
initialize() initialize()
applyShadow() applyShadow()
} }
required override init(frame: CGRect) { public required override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
initialize() initialize()
applyShadow() applyShadow()
...@@ -76,11 +76,11 @@ class RaisedButton : UIButton { ...@@ -76,11 +76,11 @@ class RaisedButton : UIButton {
layer.shadowRadius = 5 layer.shadowRadius = 5
} }
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { public override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
pulseTouches(touches) pulseTouches(touches)
} }
override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) { public override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) {
shrink() shrink()
removePulse() removePulse()
} }
...@@ -90,7 +90,7 @@ class RaisedButton : UIButton { ...@@ -90,7 +90,7 @@ class RaisedButton : UIButton {
let touchLocation = touch.locationInView(self) let touchLocation = touch.locationInView(self)
pulseView = UIView() pulseView = UIView()
pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height) pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height)
pulseView!.layer.cornerRadius = boundsH() / 2.0 pulseView!.layer.cornerRadius = bounds.height / 2.0
pulseView!.center = touchLocation pulseView!.center = touchLocation
pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5) pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5)
backgroundColorView.addSubview(pulseView!) backgroundColorView.addSubview(pulseView!)
......
...@@ -26,10 +26,10 @@ public protocol TextDelegate { ...@@ -26,10 +26,10 @@ public protocol TextDelegate {
public class Text: NSObject { public class Text: NSObject {
/** /**
* searchPattern :name: searchPattern
* A string representation of the regular expression that matches text within :description: A string representation of the regular expression that matches text within
* the TextStorage string property. By default, the search pattern recognizes the TextStorage string property. By default, the search pattern recognizes words and emoji
* words and emoji characters beginning with hashtags. haracters beginning with hashtags.
*/ */
public var searchPattern: String = "(^|\\s)#[\\d\\w_\u{203C}\u{2049}\u{20E3}\u{2122}\u{2139}\u{2194}-\u{2199}\u{21A9}-\u{21AA}\u{231A}-\u{231B}\u{23E9}-\u{23EC}\u{23F0}\u{23F3}\u{24C2}\u{25AA}-\u{25AB}\u{25B6}\u{25C0}\u{25FB}-\u{25FE}\u{2600}-\u{2601}\u{260E}\u{2611}\u{2614}-\u{2615}\u{261D}\u{263A}\u{2648}-\u{2653}\u{2660}\u{2663}\u{2665}-\u{2666}\u{2668}\u{267B}\u{267F}\u{2693}\u{26A0}-\u{26A1}\u{26AA}-\u{26AB}\u{26BD}-\u{26BE}\u{26C4}-\u{26C5}\u{26CE}\u{26D4}\u{26EA}\u{26F2}-\u{26F3}\u{26F5}\u{26FA}\u{26FD}\u{2702}\u{2705}\u{2708}-\u{270C}\u{270F}\u{2712}\u{2714}\u{2716}\u{2728}\u{2733}-\u{2734}\u{2744}\u{2747}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2764}\u{2795}-\u{2797}\u{27A1}\u{27B0}\u{2934}-\u{2935}\u{2B05}-\u{2B07}\u{2B1B}-\u{2B1C}\u{2B50}\u{2B55}\u{3030}\u{303D}\u{3297}\u{3299}\u{1F004}\u{1F0CF}\u{1F170}-\u{1F171}\u{1F17E}-\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E7}-\u{1F1EC}\u{1F1EE}-\u{1F1F0}\u{1F1F3}\u{1F1F5}\u{1F1F7}-\u{1F1FA}\u{1F201}-\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}-\u{1F251}\u{1F300}-\u{1F320}\u{1F330}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F380}-\u{1F393}\u{1F3A0}-\u{1F3C4}\u{1F3C6}-\u{1F3CA}\u{1F3E0}-\u{1F3F0}\u{1F400}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4F7}\u{1F4F9}-\u{1F4FC}\u{1F500}-\u{1F507}\u{1F509}-\u{1F53D}\u{1F550}-\u{1F567}\u{1F5FB}-\u{1F640}\u{1F645}-\u{1F64F}\u{1F680}-\u{1F68A}]+" { public var searchPattern: String = "(^|\\s)#[\\d\\w_\u{203C}\u{2049}\u{20E3}\u{2122}\u{2139}\u{2194}-\u{2199}\u{21A9}-\u{21AA}\u{231A}-\u{231B}\u{23E9}-\u{23EC}\u{23F0}\u{23F3}\u{24C2}\u{25AA}-\u{25AB}\u{25B6}\u{25C0}\u{25FB}-\u{25FE}\u{2600}-\u{2601}\u{260E}\u{2611}\u{2614}-\u{2615}\u{261D}\u{263A}\u{2648}-\u{2653}\u{2660}\u{2663}\u{2665}-\u{2666}\u{2668}\u{267B}\u{267F}\u{2693}\u{26A0}-\u{26A1}\u{26AA}-\u{26AB}\u{26BD}-\u{26BE}\u{26C4}-\u{26C5}\u{26CE}\u{26D4}\u{26EA}\u{26F2}-\u{26F3}\u{26F5}\u{26FA}\u{26FD}\u{2702}\u{2705}\u{2708}-\u{270C}\u{270F}\u{2712}\u{2714}\u{2716}\u{2728}\u{2733}-\u{2734}\u{2744}\u{2747}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2764}\u{2795}-\u{2797}\u{27A1}\u{27B0}\u{2934}-\u{2935}\u{2B05}-\u{2B07}\u{2B1B}-\u{2B1C}\u{2B50}\u{2B55}\u{3030}\u{303D}\u{3297}\u{3299}\u{1F004}\u{1F0CF}\u{1F170}-\u{1F171}\u{1F17E}-\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E7}-\u{1F1EC}\u{1F1EE}-\u{1F1F0}\u{1F1F3}\u{1F1F5}\u{1F1F7}-\u{1F1FA}\u{1F201}-\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}-\u{1F251}\u{1F300}-\u{1F320}\u{1F330}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F380}-\u{1F393}\u{1F3A0}-\u{1F3C4}\u{1F3C6}-\u{1F3CA}\u{1F3E0}-\u{1F3F0}\u{1F400}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4F7}\u{1F4F9}-\u{1F4FC}\u{1F500}-\u{1F507}\u{1F509}-\u{1F53D}\u{1F550}-\u{1F567}\u{1F5FB}-\u{1F640}\u{1F645}-\u{1F64F}\u{1F680}-\u{1F68A}]+" {
didSet { didSet {
...@@ -38,15 +38,14 @@ public class Text: NSObject { ...@@ -38,15 +38,14 @@ public class Text: NSObject {
} }
/** /**
* textStorage :name: textStorage
* Reference to wrapped NSTextStorage :description: Reference to wrapped NSTextStorage
*/ */
public let textStorage: TextStorage public let textStorage: TextStorage
/** /**
* delegate :name: delegate
* An optional instance of TextDelegate to handle text processing events :description: An optional instance of TextDelegate to handle text processing events.
*
*/ */
public weak var delegate: TextDelegate? public weak var delegate: TextDelegate?
...@@ -63,8 +62,8 @@ public class Text: NSObject { ...@@ -63,8 +62,8 @@ public class Text: NSObject {
} }
/** /**
* string :name: string
* Managed string value. :description: Managed string value.
*/ */
public var string: String { public var string: String {
get { get {
...@@ -73,9 +72,9 @@ public class Text: NSObject { ...@@ -73,9 +72,9 @@ public class Text: NSObject {
} }
/** /**
* matches :name: matches
* An array of matches found in the TextStorage string property based on the :description: An array of matches found in the TextStorage string property based on the
* searchPattern property. searchPattern property.
*/ */
public var matches: Array<String> { public var matches: Array<String> {
get { get {
...@@ -85,8 +84,8 @@ public class Text: NSObject { ...@@ -85,8 +84,8 @@ public class Text: NSObject {
} }
/** /**
* unique :name: unique
* Ensures a unique value in the matches return array. :description: Ensures a unique value in the matches return array.
*/ */
private func unique<S: SequenceType, E: Hashable where E == S.Generator.Element>(source: S) -> [E] { private func unique<S: SequenceType, E: Hashable where E == S.Generator.Element>(source: S) -> [E] {
var seen: [E:Bool] = [:] var seen: [E:Bool] = [:]
......
...@@ -23,28 +23,28 @@ internal typealias TextStorageDidProcessEdit = (TextStorage!, NSTextCheckingResu ...@@ -23,28 +23,28 @@ internal typealias TextStorageDidProcessEdit = (TextStorage!, NSTextCheckingResu
public class TextStorage: NSTextStorage { public class TextStorage: NSTextStorage {
/** /**
* store :name: store
* Acts as the model, storing the string value. :description: Acts as the model, storing the string value.
*/ */
private lazy var store: NSMutableAttributedString = NSMutableAttributedString() private lazy var store: NSMutableAttributedString = NSMutableAttributedString()
/** /**
* searchExpression :name: searchExpression
* Matches text within the TextStorage string property. :description: Matches text within the TextStorage string property.
*/ */
internal var searchExpression: NSRegularExpression? internal var searchExpression: NSRegularExpression?
/** /**
* textStorageWillProcessEdit :name: textStorageWillProcessEdit
* If set, this block callback executes when there is a change in the TextStorage :description: If set, this block callback executes when there is a change in the TextStorage
* string value. string value.
*/ */
internal var textStorageWillProcessEdit: TextStorageWillProcessEdit? internal var textStorageWillProcessEdit: TextStorageWillProcessEdit?
/** /**
* textStorageDidProcessEdit :name: textStorageDidProcessEdit
* If set, this block callback executes when a match is detected after a change in :description: If set, this block callback executes when a match is detected after a change in
* the TextStorage string value. the TextStorage string value.
*/ */
internal var textStorageDidProcessEdit: TextStorageDidProcessEdit? internal var textStorageDidProcessEdit: TextStorageDidProcessEdit?
...@@ -57,8 +57,8 @@ public class TextStorage: NSTextStorage { ...@@ -57,8 +57,8 @@ public class TextStorage: NSTextStorage {
} }
/** /**
* string :name: string
* Managed string value. :description: Managed string value.
*/ */
override public var string: String { override public var string: String {
get { get {
......
...@@ -22,16 +22,16 @@ private var defaultTextColor: UIColor = UIColor(red: 33/255, green: 33/255, blue ...@@ -22,16 +22,16 @@ private var defaultTextColor: UIColor = UIColor(red: 33/255, green: 33/255, blue
private var defaultPlaceholderColor: UIColor = UIColor(red: 159/255, green: 160/255, blue: 164/255, alpha: 1) private var defaultPlaceholderColor: UIColor = UIColor(red: 159/255, green: 160/255, blue: 164/255, alpha: 1)
public class TextView: UITextView { public class TextView: UITextView {
/** //
* label // :name: label
* Placeholder label. // :description: Placeholder label.
*/ //
private lazy var label: UILabel = UILabel() private lazy var label: UILabel = UILabel()
/** //
* labelConstraints // :name: labelConstraints
* Autoresize constraints for the placeholder label. // :description: Autoresize constraints for the placeholder label.
*/ //
private var labelConstraints: Array<NSLayoutConstraint>? private var labelConstraints: Array<NSLayoutConstraint>?
required public init(coder aDecoder: NSCoder) { required public init(coder aDecoder: NSCoder) {
...@@ -47,17 +47,17 @@ public class TextView: UITextView { ...@@ -47,17 +47,17 @@ public class TextView: UITextView {
setupView() setupView()
} }
/** //
* deinit // :name: deinit
* Notification observer removed from UITextView. // :description: Notification observer removed from UITextView.
*/ //
deinit { deinit {
NSNotificationCenter.defaultCenter().removeObserver(self, name: UITextViewTextDidChangeNotification, object: nil) NSNotificationCenter.defaultCenter().removeObserver(self, name: UITextViewTextDidChangeNotification, object: nil)
} }
/** /**
* placeholder :name: placeholder
* The placeholder label string. :description: The placeholder label string.
*/ */
public var placeholder: String = "" { public var placeholder: String = "" {
didSet { didSet {
...@@ -66,8 +66,8 @@ public class TextView: UITextView { ...@@ -66,8 +66,8 @@ public class TextView: UITextView {
} }
/** /**
* placeholderColor :name: placeholderColor
* The placeholder color. :description: The placeholder color.
*/ */
public var placeholderColor: UIColor = defaultPlaceholderColor { public var placeholderColor: UIColor = defaultPlaceholderColor {
didSet { didSet {
...@@ -76,8 +76,8 @@ public class TextView: UITextView { ...@@ -76,8 +76,8 @@ public class TextView: UITextView {
} }
/** /**
* font :name: font
* Font to use for placeholder based on UITextView font. :description: Font to use for placeholder based on UITextView font.
*/ */
override public var font: UIFont! { override public var font: UIFont! {
didSet { didSet {
...@@ -86,8 +86,8 @@ public class TextView: UITextView { ...@@ -86,8 +86,8 @@ public class TextView: UITextView {
} }
/** /**
* textAlignment :name: textAlignment
* Sets placeholder textAlignment based on UITextView textAlignment. :description: Sets placeholder textAlignment based on UITextView textAlignment.
*/ */
override public var textAlignment: NSTextAlignment { override public var textAlignment: NSTextAlignment {
didSet { didSet {
...@@ -96,8 +96,8 @@ public class TextView: UITextView { ...@@ -96,8 +96,8 @@ public class TextView: UITextView {
} }
/** /**
* text :name: text
* When set, updates the placeholder text. :description: When set, updates the placeholder text.
*/ */
override public var text: String! { override public var text: String! {
didSet { didSet {
...@@ -106,8 +106,8 @@ public class TextView: UITextView { ...@@ -106,8 +106,8 @@ public class TextView: UITextView {
} }
/** /**
* attributedText :name: attributedText
* When set, updates the placeholder attributedText. :description: When set, updates the placeholder attributedText.
*/ */
override public var attributedText: NSAttributedString! { override public var attributedText: NSAttributedString! {
didSet { didSet {
...@@ -116,8 +116,8 @@ public class TextView: UITextView { ...@@ -116,8 +116,8 @@ public class TextView: UITextView {
} }
/** /**
* textContainerInset :name: textContainerInset
* When set, updates the placeholder constraints. :description: When set, updates the placeholder constraints.
*/ */
override public var textContainerInset: UIEdgeInsets { override public var textContainerInset: UIEdgeInsets {
didSet { didSet {
...@@ -130,18 +130,18 @@ public class TextView: UITextView { ...@@ -130,18 +130,18 @@ public class TextView: UITextView {
label.preferredMaxLayoutWidth = textContainer.size.width - textContainer.lineFragmentPadding * 2.0 label.preferredMaxLayoutWidth = textContainer.size.width - textContainer.lineFragmentPadding * 2.0
} }
/** //
* textViewTextDidChange // :name: textViewTextDidChange
* Updates the label visibility when text is empty or not. // :description: Updates the label visibility when text is empty or not.
*/ //
internal func textViewTextDidChange() { internal func textViewTextDidChange() {
label.hidden = !text.isEmpty label.hidden = !text.isEmpty
} }
/** //
* setupView // :name: setupView
* Sets up the common initilized values. // :description: Sets up the common initilized values.
*/ //
private func setupView() { private func setupView() {
backgroundColor = .clearColor() backgroundColor = .clearColor()
textColor = defaultTextColor textColor = defaultTextColor
...@@ -162,10 +162,10 @@ public class TextView: UITextView { ...@@ -162,10 +162,10 @@ public class TextView: UITextView {
updateLabelConstraints() updateLabelConstraints()
} }
/** //
* updateLabelConstraints // :name: updateLabelConstraints
* Updates the placeholder constraints. // :description: Updates the placeholder constraints.
*/ //
private func updateLabelConstraints() { private func updateLabelConstraints() {
if nil != labelConstraints { if nil != labelConstraints {
removeConstraints(labelConstraints!) removeConstraints(labelConstraints!)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment