Skip to content

Commit 787786d

Browse files
committed
Add .magic preset
1 parent 8f82bd5 commit 787786d

File tree

8 files changed

+213
-1
lines changed

8 files changed

+213
-1
lines changed

Assets/Readme/Miniature - Magic.svg

Lines changed: 10 additions & 0 deletions
Loading

Assets/Sketch/Presets.sketch

6.66 KB
Binary file not shown.

Example/Controllers/ViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ViewController: UITableViewController {
1515
Alert(key: "Question", preset: .question, title: "Oops", subtitle: "Form not complete"),
1616
Alert(key: "Message", preset: .message, title: "Message sended", subtitle: "You can check history"),
1717
Alert(key: "Bolt", preset: .bolt, title: "Power", subtitle: "Now turned on"),
18+
Alert(key: "Magic", preset: .magic, title: "Magic here! You see", subtitle: "Strange text, true?"),
1819
Alert(key: "Add", preset: .add, title: "Added to Folder", subtitle: nil),
1920
Alert(key: "Error", preset: .error, title: "Oops", subtitle: "Please try again later"),
2021
Alert(key: "Shuffle", preset: .shuffle, title: "Songs Shuffled", subtitle: nil),

Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ And other
2020
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Question.svg" width="55">
2121
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Message.svg" width="55">
2222
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Bolt.svg" width="55">
23+
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Magic.svg" width="55">
2324
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Add.svg" width="55">
2425
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Error.svg" width="55">
2526
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Assets/Readme/Miniature%20-%20Shuffle.svg" width="55">

SPAlert.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SPAlert"
4-
s.version = "2.0.16"
4+
s.version = "2.0.18"
55
s.summary = "Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets."
66
s.homepage = "https://github.com/IvanVorobei/SPAlert"
77
s.source = { :git => "https://github.com/IvanVorobei/SPAlert.git", :tag => s.version }

SPAlert.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
F4A5A92C2388792F00B0DFE0 /* SPAlertIconBookmarkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4A5A92B2388792F00B0DFE0 /* SPAlertIconBookmarkView.swift */; };
3333
F4A8361A2385588300EB32E0 /* SPAlertIconDocView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4A836192385588300EB32E0 /* SPAlertIconDocView.swift */; };
3434
F4CA67B5238ABD0100E72F79 /* SPAlertIconAddView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4CA67B4238ABD0100E72F79 /* SPAlertIconAddView.swift */; };
35+
F4CD29F423A037D00051EA23 /* SPAlertIconMagicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4CD29F323A037D00051EA23 /* SPAlertIconMagicView.swift */; };
3536
F4D3CD58238DA9FE006C3DE2 /* SPAlertIconMoonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D3CD57238DA9FE006C3DE2 /* SPAlertIconMoonView.swift */; };
3637
F4D3CD5A238DAA49006C3DE2 /* SPAlertIconStarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D3CD59238DAA49006C3DE2 /* SPAlertIconStarView.swift */; };
3738
F4E4459D2390524A0067FF5C /* SPAlertIconExclamationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E4459C2390524A0067FF5C /* SPAlertIconExclamationView.swift */; };
@@ -95,6 +96,7 @@
9596
F4A5A92B2388792F00B0DFE0 /* SPAlertIconBookmarkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconBookmarkView.swift; sourceTree = "<group>"; };
9697
F4A836192385588300EB32E0 /* SPAlertIconDocView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconDocView.swift; sourceTree = "<group>"; };
9798
F4CA67B4238ABD0100E72F79 /* SPAlertIconAddView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconAddView.swift; sourceTree = "<group>"; };
99+
F4CD29F323A037D00051EA23 /* SPAlertIconMagicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconMagicView.swift; sourceTree = "<group>"; };
98100
F4D3CD57238DA9FE006C3DE2 /* SPAlertIconMoonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconMoonView.swift; sourceTree = "<group>"; };
99101
F4D3CD59238DAA49006C3DE2 /* SPAlertIconStarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconStarView.swift; sourceTree = "<group>"; };
100102
F4E4459C2390524A0067FF5C /* SPAlertIconExclamationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPAlertIconExclamationView.swift; sourceTree = "<group>"; };
@@ -190,6 +192,7 @@
190192
F421EFF02398684E000A566D /* SPAlertIconFlagView.swift */,
191193
F40FB629239ADF940090BA57 /* SPAlertIconQuestionView.swift */,
192194
F47D2FA5239D718400A346A5 /* SPAlertIconBoltView.swift */,
195+
F4CD29F323A037D00051EA23 /* SPAlertIconMagicView.swift */,
193196
);
194197
path = Icons;
195198
sourceTree = "<group>";
@@ -406,6 +409,7 @@
406409
F41204EB2382AC9B009C2AC7 /* SPAlertIconHeartView.swift in Sources */,
407410
F4A8361A2385588300EB32E0 /* SPAlertIconDocView.swift in Sources */,
408411
F412052B2382AF64009C2AC7 /* SPAlertLayout.swift in Sources */,
412+
F4CD29F423A037D00051EA23 /* SPAlertIconMagicView.swift in Sources */,
409413
);
410414
runOnlyForDeploymentPostprocessing = 0;
411415
};

Source/SPAlert/Models/SPAlertPreset.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public enum SPAlertPreset {
4141
case error
4242
case shuffle
4343
case `repeat`
44+
case magic
4445

4546
/**
4647
View for preset.
@@ -77,6 +78,8 @@ public enum SPAlertPreset {
7778
return SPAlertIconQuestionView()
7879
case .bolt:
7980
return SPAlertIconBoltView()
81+
case .magic:
82+
return SPAlertIconMagicView()
8083
}
8184
}
8285

@@ -157,6 +160,14 @@ public enum SPAlertPreset {
157160
layout.iconHeight = 116
158161
layout.bottomIconSpace = 34
159162
return layout
163+
case .magic:
164+
var layout = SPAlertLayout()
165+
layout.topSpace = 41
166+
layout.bottomSpace = 27
167+
layout.iconWidth = 112
168+
layout.iconHeight = 112
169+
layout.bottomIconSpace = 35
170+
return layout
160171
case .moon:
161172
var layout = SPAlertLayout()
162173
layout.topSpace = 49
@@ -233,6 +244,8 @@ public enum SPAlertPreset {
233244
return .warning
234245
case .question:
235246
return .warning
247+
case .magic:
248+
return .success
236249
case .error:
237250
return .error
238251
case .shuffle:

0 commit comments

Comments
 (0)