Skip to content

Commit 36750d5

Browse files
committed
Merge pull request #27 from 9nix00/master
Support cocapods and fix print issue
2 parents aa5f8ca + 9a39854 commit 36750d5

File tree

5 files changed

+108
-2
lines changed

5 files changed

+108
-2
lines changed

.gitignore

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
### Swift template
2+
# Xcode
3+
#
4+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
5+
6+
## Build generated
7+
build/
8+
DerivedData
9+
10+
## Various settings
11+
*.pbxuser
12+
!default.pbxuser
13+
*.mode1v3
14+
!default.mode1v3
15+
*.mode2v3
16+
!default.mode2v3
17+
*.perspectivev3
18+
!default.perspectivev3
19+
xcuserdata
20+
21+
## Other
22+
*.xccheckout
23+
*.moved-aside
24+
*.xcuserstate
25+
*.xcscmblueprint
26+
27+
## Obj-C/Swift specific
28+
*.hmap
29+
*.ipa
30+
31+
# CocoaPods
32+
#
33+
# We recommend against adding the Pods directory to your .gitignore. However
34+
# you should judge for yourself, the pros and cons are mentioned at:
35+
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
36+
#
37+
# Pods/
38+
39+
# Carthage
40+
#
41+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
42+
# Carthage/Checkouts
43+
44+
Carthage/Build
45+
### Objective-C template
46+
# Xcode
47+
#
48+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
49+
50+
## Build generated
51+
build/
52+
DerivedData
53+
54+
## Various settings
55+
*.pbxuser
56+
!default.pbxuser
57+
*.mode1v3
58+
!default.mode1v3
59+
*.mode2v3
60+
!default.mode2v3
61+
*.perspectivev3
62+
!default.perspectivev3
63+
xcuserdata
64+
65+
## Other
66+
*.xccheckout
67+
*.moved-aside
68+
*.xcuserstate
69+
*.xcscmblueprint
70+
71+
## Obj-C/Swift specific
72+
*.hmap
73+
*.ipa
74+
75+
# CocoaPods
76+
#
77+
# We recommend against adding the Pods directory to your .gitignore. However
78+
# you should judge for yourself, the pros and cons are mentioned at:
79+
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
80+
#
81+
#Pods/
82+
83+
# Carthage
84+
#
85+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
86+
# Carthage/Checkouts
87+
88+
Carthage/Build
89+
90+
# Created by .ignore support plugin (hsz.mobi)

SweetAlert.podspec

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Pod::Spec.new do |s|
2+
s.name = "SweetAlert"
3+
s.version = "0.1.0"
4+
s.summary = "Thin wrapper around NSURLSession in Swift. Simplifies HTTP requests."
5+
s.homepage = "https://github.com/codestergit/SweetAlert-iOS"
6+
s.license = 'MIT'
7+
s.author = {'codestergit' => 'https://github.com/codestergit/SweetAlert-iOS'}
8+
s.source = { :git => 'https://github.com/codestergit/SweetAlert-iOS.git', :tag => "#{s.version}"}
9+
s.ios.deployment_target = '8.0'
10+
s.source_files = 'SweetAlert/*.swift'
11+
s.requires_arc = 'true'
12+
end

SweetAlert.xcodeproj/project.pbxproj

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

99
/* Begin PBXBuildFile section */
10+
784864ED6A0B7AF68C8DE1D8 /* SweetAlert.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 784869A188ADBAB6A90C84DF /* SweetAlert.podspec */; };
1011
9B4286E81A0D2F5C00E9913B /* SweetAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4286E71A0D2F5C00E9913B /* SweetAlert.swift */; };
1112
9B4286EB1A0D2F7700E9913B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4286E91A0D2F7700E9913B /* AppDelegate.swift */; };
1213
9B4286EC1A0D2F7700E9913B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4286EA1A0D2F7700E9913B /* ViewController.swift */; };
@@ -20,6 +21,7 @@
2021
/* End PBXBuildFile section */
2122

2223
/* Begin PBXFileReference section */
24+
784869A188ADBAB6A90C84DF /* SweetAlert.podspec */ = {isa = PBXFileReference; lastKnownFileType = file.podspec; path = SweetAlert.podspec; sourceTree = "<group>"; };
2325
9B4286E71A0D2F5C00E9913B /* SweetAlert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SweetAlert.swift; path = SweetAlert/SweetAlert.swift; sourceTree = SOURCE_ROOT; };
2426
9B4286E91A0D2F7700E9913B /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = SweetAlert/AppDelegate.swift; sourceTree = SOURCE_ROOT; };
2527
9B4286EA1A0D2F7700E9913B /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = SweetAlert/ViewController.swift; sourceTree = SOURCE_ROOT; };
@@ -59,6 +61,7 @@
5961
children = (
6062
9B4CD10A1A06E55200B65DE0 /* SweetAlert */,
6163
9B4CD1091A06E55200B65DE0 /* Products */,
64+
784869A188ADBAB6A90C84DF /* SweetAlert.podspec */,
6265
);
6366
sourceTree = "<group>";
6467
};
@@ -168,6 +171,7 @@
168171
9B4286F41A0D2FAF00E9913B /* Main.storyboard in Resources */,
169172
9B4286F91A0D2FC500E9913B /* logo_big.png in Resources */,
170173
9BCAC7A51A0E0B3600282753 /* thumb.jpg in Resources */,
174+
784864ED6A0B7AF68C8DE1D8 /* SweetAlert.podspec in Resources */,
171175
);
172176
runOnlyForDeploymentPostprocessing = 0;
173177
};

SweetAlert/SweetAlert.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public class SweetAlert: UIViewController {
341341

342342
class AnimatableView: UIView {
343343
func animate(){
344-
print("Should overide by subclasss", appendNewline: false)
344+
print("Should overide by subclasss", terminator: "")
345345
}
346346
}
347347

SweetAlert/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ViewController: UIViewController {
4646
SweetAlert().showAlert("Are you sure?", subTitle: "You file will permanently delete!", style: AlertStyle.Warning, buttonTitle:"Cancel", buttonColor:UIColor.colorFromRGB(0xD0D0D0) , otherButtonTitle: "Yes, delete it!", otherButtonColor: UIColor.colorFromRGB(0xDD6B55)) { (isOtherButton) -> Void in
4747
if isOtherButton == true {
4848

49-
print("Cancel Button Pressed", appendNewline: false)
49+
print("Cancel Button Pressed", terminator: "")
5050
}
5151
else {
5252
SweetAlert().showAlert("Deleted!", subTitle: "Your imaginary file has been deleted!", style: AlertStyle.Success)

0 commit comments

Comments
 (0)