Skip to content

Commit fe5afa2

Browse files
author
Daniel Dahan
committed
master: merged development
2 parents 994edd5 + b65ca0e commit fe5afa2

22 files changed

+1284
-535
lines changed

MK.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'MK'
3-
s.version = '1.3.0'
3+
s.version = '1.4.0'
44
s.license = { :type => "AGPLv3+", :file => "LICENSE" }
55
s.summary = 'A Material Design Framework In Swift'
66
s.homepage = 'http://materialkit.io'

MaterialKit.xcodeproj/project.pbxproj

+32-24
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
657CD0291B8EE0D3008C0029 /* MaterialView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 65B965741B8A60A00055B139 /* MaterialView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
11-
657CD02A1B8EE0D3008C0029 /* MaterialPulseView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9A94D1081B8A3F5100F586A5 /* MaterialPulseView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
12-
657CD02B1B8EE0D3008C0029 /* MaterialViewController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 65B965711B8A578D0055B139 /* MaterialViewController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
10+
657CD02A1B8EE0D3008C0029 /* MaterialCard.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9A94D1081B8A3F5100F586A5 /* MaterialCard.swift */; settings = {ATTRIBUTES = (Public, ); }; };
1311
657CD02C1B8EE0D3008C0029 /* SideNavController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 65B965861B8BEEC60055B139 /* SideNavController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
1412
657CD02D1B8EE0D3008C0029 /* MaterialButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 65B9657D1B8A7C330055B139 /* MaterialButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
15-
657CD02E1B8EE0D3008C0029 /* AddFabButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9638329D1B8EC34D0015F710 /* AddFabButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
13+
657CD02E1B8EE0D3008C0029 /* (null) in Headers */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (Public, ); }; };
1614
657CD02F1B8EE0D3008C0029 /* ImageCard.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9A94D10A1B8A485C00F586A5 /* ImageCard.swift */; settings = {ATTRIBUTES = (Public, ); }; };
17-
65B965721B8A578D0055B139 /* MaterialViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B965711B8A578D0055B139 /* MaterialViewController.swift */; };
18-
65B965751B8A60A00055B139 /* MaterialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B965741B8A60A00055B139 /* MaterialView.swift */; };
1915
65B9657E1B8A7C330055B139 /* MaterialButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B9657D1B8A7C330055B139 /* MaterialButton.swift */; };
2016
65B965871B8BEEC60055B139 /* SideNavController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B965861B8BEEC60055B139 /* SideNavController.swift */; };
2117
963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; };
@@ -38,13 +34,16 @@
3834
963832851B89070E0015F710 /* CapturePreview.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9638325F1B88E5BF0015F710 /* CapturePreview.swift */; settings = {ATTRIBUTES = (Public, ); }; };
3935
963832881B8908180015F710 /* Layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832871B8908180015F710 /* Layout.swift */; };
4036
963832891B89097D0015F710 /* Layout.swift in Headers */ = {isa = PBXBuildFile; fileRef = 963832871B8908180015F710 /* Layout.swift */; settings = {ATTRIBUTES = (Public, ); }; };
41-
9638329E1B8EC34D0015F710 /* AddFabButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9638329D1B8EC34D0015F710 /* AddFabButton.swift */; };
37+
96B57D4E1B90AF7D00DE7BBB /* MaterialTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96B57D4D1B90AF7D00DE7BBB /* MaterialTheme.swift */; };
38+
9A3A3B6A1B8E992F005F16BC /* ImageTextCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A3A3B691B8E992F005F16BC /* ImageTextCard.swift */; };
39+
9A3A3B6E1B8EA7A5005F16BC /* ImageTextButtonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A3A3B6D1B8EA7A5005F16BC /* ImageTextButtonCard.swift */; };
40+
9A3A3B701B8EB582005F16BC /* ImageRevealCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A3A3B6F1B8EB582005F16BC /* ImageRevealCard.swift */; };
4241
9A94D0F91B895C8C00F586A5 /* Roboto.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9AAC38531B89559900FE6B2D /* Roboto.swift */; settings = {ATTRIBUTES = (Public, ); }; };
4342
9A94D0FA1B895EA500F586A5 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 963832631B88E5BF0015F710 /* LICENSE */; };
4443
9A94D0FB1B895EA500F586A5 /* Roboto-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9AAC38591B8956E300FE6B2D /* Roboto-Regular.ttf */; };
4544
9A94D0FC1B895EA500F586A5 /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9AAC38571B8956CF00FE6B2D /* Roboto-Medium.ttf */; };
4645
9A94D0FD1B895EA500F586A5 /* Roboto-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9AAC38551B8956C500FE6B2D /* Roboto-Light.ttf */; };
47-
9A94D1091B8A3F5100F586A5 /* MaterialPulseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A94D1081B8A3F5100F586A5 /* MaterialPulseView.swift */; };
46+
9A94D1091B8A3F5100F586A5 /* MaterialCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A94D1081B8A3F5100F586A5 /* MaterialCard.swift */; };
4847
9A94D10B1B8A485C00F586A5 /* ImageCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A94D10A1B8A485C00F586A5 /* ImageCard.swift */; };
4948
9AAC384D1B89528900FE6B2D /* BasicCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAC384C1B89528900FE6B2D /* BasicCard.swift */; };
5049
9AAC38541B89559900FE6B2D /* Roboto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAC38531B89559900FE6B2D /* Roboto.swift */; };
@@ -62,8 +61,6 @@
6261
/* End PBXContainerItemProxy section */
6362

6463
/* Begin PBXFileReference section */
65-
65B965711B8A578D0055B139 /* MaterialViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialViewController.swift; sourceTree = "<group>"; };
66-
65B965741B8A60A00055B139 /* MaterialView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialView.swift; sourceTree = "<group>"; };
6764
65B9657D1B8A7C330055B139 /* MaterialButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialButton.swift; sourceTree = "<group>"; };
6865
65B965861B8BEEC60055B139 /* SideNavController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideNavController.swift; sourceTree = "<group>"; };
6966
963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -81,8 +78,11 @@
8178
963832671B88E5BF0015F710 /* TextStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextStorage.swift; sourceTree = "<group>"; };
8279
963832681B88E5BF0015F710 /* TextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = "<group>"; };
8380
963832871B8908180015F710 /* Layout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Layout.swift; sourceTree = "<group>"; };
84-
9638329D1B8EC34D0015F710 /* AddFabButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddFabButton.swift; sourceTree = "<group>"; };
85-
9A94D1081B8A3F5100F586A5 /* MaterialPulseView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialPulseView.swift; sourceTree = "<group>"; };
81+
96B57D4D1B90AF7D00DE7BBB /* MaterialTheme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialTheme.swift; sourceTree = "<group>"; };
82+
9A3A3B691B8E992F005F16BC /* ImageTextCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageTextCard.swift; sourceTree = "<group>"; };
83+
9A3A3B6D1B8EA7A5005F16BC /* ImageTextButtonCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageTextButtonCard.swift; sourceTree = "<group>"; };
84+
9A3A3B6F1B8EB582005F16BC /* ImageRevealCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageRevealCard.swift; sourceTree = "<group>"; };
85+
9A94D1081B8A3F5100F586A5 /* MaterialCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialCard.swift; sourceTree = "<group>"; };
8686
9A94D10A1B8A485C00F586A5 /* ImageCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCard.swift; sourceTree = "<group>"; };
8787
9AAC384C1B89528900FE6B2D /* BasicCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicCard.swift; sourceTree = "<group>"; };
8888
9AAC38531B89559900FE6B2D /* Roboto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Roboto.swift; sourceTree = "<group>"; };
@@ -113,9 +113,6 @@
113113
65B965731B8A58E60055B139 /* View */ = {
114114
isa = PBXGroup;
115115
children = (
116-
65B965741B8A60A00055B139 /* MaterialView.swift */,
117-
9A94D1081B8A3F5100F586A5 /* MaterialPulseView.swift */,
118-
65B965711B8A578D0055B139 /* MaterialViewController.swift */,
119116
);
120117
name = View;
121118
sourceTree = "<group>";
@@ -151,6 +148,7 @@
151148
children = (
152149
963832631B88E5BF0015F710 /* LICENSE */,
153150
9638325C1B88E3420015F710 /* Supporting Files */,
151+
96B57D4C1B90AF6A00DE7BBB /* Theme */,
154152
9AAC38521B89553800FE6B2D /* Font */,
155153
963832861B8907FE0015F710 /* Layout */,
156154
65B965731B8A58E60055B139 /* View */,
@@ -202,7 +200,6 @@
202200
children = (
203201
65B9657D1B8A7C330055B139 /* MaterialButton.swift */,
204202
963832601B88E5BF0015F710 /* FabButton.swift */,
205-
9638329D1B8EC34D0015F710 /* AddFabButton.swift */,
206203
963832611B88E5BF0015F710 /* FlatButton.swift */,
207204
963832651B88E5BF0015F710 /* RaisedButton.swift */,
208205
);
@@ -227,11 +224,23 @@
227224
name = Layout;
228225
sourceTree = "<group>";
229226
};
227+
96B57D4C1B90AF6A00DE7BBB /* Theme */ = {
228+
isa = PBXGroup;
229+
children = (
230+
96B57D4D1B90AF7D00DE7BBB /* MaterialTheme.swift */,
231+
);
232+
name = Theme;
233+
sourceTree = "<group>";
234+
};
230235
9AAC384B1B89524E00FE6B2D /* Card */ = {
231236
isa = PBXGroup;
232237
children = (
238+
9A94D1081B8A3F5100F586A5 /* MaterialCard.swift */,
233239
9AAC384C1B89528900FE6B2D /* BasicCard.swift */,
234240
9A94D10A1B8A485C00F586A5 /* ImageCard.swift */,
241+
9A3A3B691B8E992F005F16BC /* ImageTextCard.swift */,
242+
9A3A3B6D1B8EA7A5005F16BC /* ImageTextButtonCard.swift */,
243+
9A3A3B6F1B8EB582005F16BC /* ImageRevealCard.swift */,
235244
);
236245
name = Card;
237246
sourceTree = "<group>";
@@ -265,12 +274,10 @@
265274
9A94D0F91B895C8C00F586A5 /* Roboto.swift in Headers */,
266275
963832851B89070E0015F710 /* CapturePreview.swift in Headers */,
267276
963832891B89097D0015F710 /* Layout.swift in Headers */,
268-
657CD0291B8EE0D3008C0029 /* MaterialView.swift in Headers */,
269-
657CD02A1B8EE0D3008C0029 /* MaterialPulseView.swift in Headers */,
270-
657CD02B1B8EE0D3008C0029 /* MaterialViewController.swift in Headers */,
277+
657CD02A1B8EE0D3008C0029 /* MaterialCard.swift in Headers */,
271278
657CD02C1B8EE0D3008C0029 /* SideNavController.swift in Headers */,
272279
657CD02D1B8EE0D3008C0029 /* MaterialButton.swift in Headers */,
273-
657CD02E1B8EE0D3008C0029 /* AddFabButton.swift in Headers */,
280+
657CD02E1B8EE0D3008C0029 /* (null) in Headers */,
274281
657CD02F1B8EE0D3008C0029 /* ImageCard.swift in Headers */,
275282
);
276283
runOnlyForDeploymentPostprocessing = 0;
@@ -377,15 +384,16 @@
377384
files = (
378385
963832691B88E5BF0015F710 /* Capture.swift in Sources */,
379386
9A94D10B1B8A485C00F586A5 /* ImageCard.swift in Sources */,
387+
96B57D4E1B90AF7D00DE7BBB /* MaterialTheme.swift in Sources */,
380388
9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */,
381-
9A94D1091B8A3F5100F586A5 /* MaterialPulseView.swift in Sources */,
389+
9A94D1091B8A3F5100F586A5 /* MaterialCard.swift in Sources */,
390+
9A3A3B701B8EB582005F16BC /* ImageRevealCard.swift in Sources */,
391+
9A3A3B6A1B8E992F005F16BC /* ImageTextCard.swift in Sources */,
382392
65B965871B8BEEC60055B139 /* SideNavController.swift in Sources */,
383393
9638326C1B88E5BF0015F710 /* FlatButton.swift in Sources */,
384-
65B965751B8A60A00055B139 /* MaterialView.swift in Sources */,
385394
963832711B88E5BF0015F710 /* Text.swift in Sources */,
386395
9638326A1B88E5BF0015F710 /* CapturePreview.swift in Sources */,
387-
9638329E1B8EC34D0015F710 /* AddFabButton.swift in Sources */,
388-
65B965721B8A578D0055B139 /* MaterialViewController.swift in Sources */,
396+
9A3A3B6E1B8EA7A5005F16BC /* ImageTextButtonCard.swift in Sources */,
389397
9AAC38541B89559900FE6B2D /* Roboto.swift in Sources */,
390398
65B9657E1B8A7C330055B139 /* MaterialButton.swift in Sources */,
391399
963832881B8908180015F710 /* Layout.swift in Sources */,

README.md

+77-23
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,106 @@
1-
![MaterialKit](http://materialkit.io/MaterialKitLogo.png)
1+
# MaterialKit
22

3-
# Build Beautiful Software
3+
### Build Beautiful Software
44

55
* [CocoaPods (MK)](https://cocoapods.org/?q=MK)
66

77
### CocoaPods Support
88
MaterialKit is now on CocoaPods under the name [MK](https://cocoapods.org/?q=MK).
99

10+
### Floating Action Button
1011

11-
![MaterialKitPreview](http://www.materialkit.io/MaterialKitPreview.gif)
12-
12+
Make a call to action with a Floating Action Button.
1313

14-
### Floating Action Button
14+
![MaterialKitPreview](http://www.materialkit.io/fabbuttonpreview.gif)
1515

1616
```swift
1717
var button: FabButton = FabButton()
18+
button.setTitle("+", forState: .Normal)
19+
button.titleLabel!.font = UIFont(name: "Arial", size: 32)
20+
view.addSubview(button)
21+
22+
Layout.size(view, child: button, width: 60, height: 60)
1823
```
1924

20-
### Flat Button
25+
### Raised Button
26+
27+
Use a Raised Button to capture attention.
28+
29+
![MaterialKitPreview](http://www.materialkit.io/raisedbuttonpreview.gif)
2130

2231
```swift
23-
var button: FlatButton = FlatButton()
32+
var button: RaisedButton = RaisedButton()
33+
button.setTitle("Raised", forState: .Normal)
34+
view.addSubview(button)
35+
36+
Layout.size(view, child: button, width: 200, height: 60)
2437
```
2538

26-
### Raised Button
39+
### Flat Button
40+
41+
Keep it simple and elegant with a Flat Button.
42+
43+
![MaterialKitPreview](http://www.materialkit.io/flatbuttonpreview.gif)
2744

2845
```swift
2946
var button: RaisedButton = RaisedButton()
47+
button.setTitle("Flat", forState: .Normal)
48+
view.addSubview(button)
49+
50+
Layout.size(view, child: button, width: 200, height: 60)
51+
```
52+
53+
### Basic Card
54+
55+
Easily make cards with fully customizable components.
56+
57+
![MaterialKitPreview](http://www.materialkit.io/basiccardpreview.gif)
58+
59+
```swift
60+
var card: BasicCard = BasicCard()
61+
62+
// add a title
63+
card.titleLabel = UILabel()
64+
card.titleLabel!.text = "Card Title"
65+
66+
// add a body of text
67+
card.detailTextLabel = UILabel()
68+
card.detailTextLabel!.text = "I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively."
69+
70+
// add a divider for buttons
71+
card.divider = UIView()
72+
73+
// add a couple buttons
74+
var cancelButton: FlatButton = FlatButton()
75+
cancelButton.pulseColor = MaterialTheme.blueGrey.darken3
76+
cancelButton.setTitle("Cancel", forState: .Normal)
77+
cancelButton.setTitleColor(MaterialTheme.yellow.darken3, forState: .Normal)
78+
79+
var okButton: FlatButton = FlatButton()
80+
okButton.pulseColor = MaterialTheme.blueGrey.darken3
81+
okButton.setTitle("Okay", forState: .Normal)
82+
okButton.setTitleColor(MaterialTheme.yellow.darken3, forState: .Normal)
83+
84+
card.buttons = [cancelButton, okButton]
85+
86+
view.addSubview(card)
3087
```
3188

3289
### Side Navigation Controller
3390

91+
Add a sleek Side Navigation to give your users a wonderful experience.
92+
93+
![MaterialKitPreview](http://www.materialkit.io/sidenavpreview.gif)
94+
3495
```swift
35-
class AppDelegate: UIResponder, UIApplicationDelegate, SideNavDelegate {
36-
var window: UIWindow?
37-
var sideNav: SideNavController?
38-
private lazy var graph: Graph = Graph()
39-
40-
41-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
42-
sideNav = SideNavController(mainViewController: MainViewController(), leftViewController: LeftViewController(), rightViewController: RightViewController())
43-
sideNav!.delegate = self
44-
window = UIWindow(frame: UIScreen.mainScreen().bounds)
45-
window!.rootViewController = sideNav
46-
window!.makeKeyAndVisible()
47-
return true
48-
}
49-
...
96+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
97+
sideNav = SideNavController(mainViewController: MainViewController(), leftViewController: LeftViewController(), rightViewController: RightViewController())
98+
sideNav!.delegate = self
99+
window = UIWindow(frame: UIScreen.mainScreen().bounds)
100+
window!.rootViewController = sideNav
101+
window!.makeKeyAndVisible()
102+
return true
103+
}
50104
```
51105

52106
### License

Source/AddFabButton.swift

-65
This file was deleted.

0 commit comments

Comments
 (0)