Skip to content

Commit 94247f6

Browse files
author
Daniel Dahan
committed
fixed issue when setting shadow to .None
1 parent 77ab304 commit 94247f6

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

MK.podspec

Lines changed: 1 addition & 1 deletion
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.16.0'
3+
s.version = '1.17.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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
6585D21A1BBCDFBF00426D22 /* BasicCardView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 964B17D81BBB3911002A9CA0 /* BasicCardView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
1011
65BDD1471BB5B916006F7F2B /* MaterialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD1461BB5B916006F7F2B /* MaterialView.swift */; settings = {ASSET_TAGS = (); }; };
1112
65BDD1491BB5DC98006F7F2B /* MaterialColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD1481BB5DC98006F7F2B /* MaterialColor.swift */; settings = {ASSET_TAGS = (); }; };
1213
65BDD14B1BB5DD02006F7F2B /* MaterialFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD14A1BB5DD02006F7F2B /* MaterialFont.swift */; settings = {ASSET_TAGS = (); }; };
@@ -312,6 +313,7 @@
312313
964B17D41BBB31C2002A9CA0 /* FabButton.swift in Headers */,
313314
964B17D51BBB31C2002A9CA0 /* MaterialAnimation.swift in Headers */,
314315
964B17D61BBB31C2002A9CA0 /* MaterialLayout.swift in Headers */,
316+
6585D21A1BBCDFBF00426D22 /* BasicCardView.swift in Headers */,
315317
);
316318
runOnlyForDeploymentPostprocessing = 0;
317319
};

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,10 @@ let v: BasicCardView = BasicCardView(titleLabel: UILabel(), detailLabel: UILabel
138138
v.backgroundColor = MaterialColor.blueGrey.darken1
139139
v.dividerColor = MaterialColor.blueGrey.base
140140

141-
v.titleLabel!.lineBreakMode = .ByWordWrapping
142-
v.titleLabel!.numberOfLines = 0
143141
v.titleLabel!.textColor = MaterialColor.white
144142
v.titleLabel!.font = RobotoFont.regularWithSize(18)
145143
v.titleLabel!.text = "Card Title"
146144

147-
v.detailLabel!.lineBreakMode = .ByWordWrapping
148-
v.detailLabel!.numberOfLines = 0
149145
v.detailLabel!.textColor = MaterialColor.white
150146
v.detailLabel!.font = RobotoFont.regularWithSize(14)
151147
v.detailLabel!.text = "I am a very simple card. I am good at containing small bits of information. I am convenient because I require little code to use effectively."
@@ -181,14 +177,10 @@ let v: BasicCardView = BasicCardView(titleLabel: UILabel(), detailLabel: UILabel
181177

182178
v.image = UIImage(named: "forest")
183179

184-
v.titleLabel!.lineBreakMode = .ByWordWrapping
185-
v.titleLabel!.numberOfLines = 0
186180
v.titleLabel!.textColor = MaterialColor.white
187181
v.titleLabel!.font = RobotoFont.regularWithSize(18)
188182
v.titleLabel!.text = "Card Title"
189183

190-
v.detailLabel!.lineBreakMode = .ByWordWrapping
191-
v.detailLabel!.numberOfLines = 0
192184
v.detailLabel!.textColor = MaterialColor.white
193185
v.detailLabel!.font = RobotoFont.regularWithSize(14)
194186
v.detailLabel!.text = "I am a very simple card. I am good at containing small bits of information. I am convenient because I require little code to use effectively."

Source/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.16.0</string>
18+
<string>1.17.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Source/MaterialButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public class MaterialButton : UIButton {
215215
*/
216216
public var shadowDepth: MaterialDepth! {
217217
didSet {
218-
let value: MaterialDepthType = MaterialDepthToValue(shadowDepth!)
218+
let value: MaterialDepthType = MaterialDepthToValue(nil == shadowDepth ? .None : shadowDepth!)
219219
shadowOffset = value.offset
220220
shadowOpacity = value.opacity
221221
shadowRadius = value.radius

Source/MaterialView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public class MaterialView: UIView {
231231
*/
232232
public var shadowDepth: MaterialDepth! {
233233
didSet {
234-
let value: MaterialDepthType = MaterialDepthToValue(shadowDepth!)
234+
let value: MaterialDepthType = MaterialDepthToValue(nil == shadowDepth ? .None : shadowDepth!)
235235
shadowOffset = value.offset
236236
shadowOpacity = value.opacity
237237
shadowRadius = value.radius

0 commit comments

Comments
 (0)