Skip to content

Commit 04679ef

Browse files
committed
Xcode8 関連 Warning削除
1 parent 2a4bd2e commit 04679ef

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

Example/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
313
{
414
"idiom" : "iphone",
515
"size" : "29x29",

Example/SCLAlertViewExample/Images.xcassets/custom_icon.imageset/Contents.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"images" : [
33
{
44
"idiom" : "universal",
5+
"filename" : "custom_icon.png",
56
"scale" : "1x"
67
},
78
{
@@ -11,12 +12,6 @@
1112
{
1213
"idiom" : "universal",
1314
"scale" : "3x"
14-
},
15-
{
16-
"idiom" : "universal",
17-
"filename" : "custom_icon.png",
18-
"unassigned" : true,
19-
"scale" : "1x"
2015
}
2116
],
2217
"info" : {

Example/SCLAlertViewExample/ViewController.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,38 @@ class ViewController: UIViewController {
3434

3535
@IBAction func showSuccess(_ sender: AnyObject) {
3636
let alert = SCLAlertView()
37-
alert.addButton("First Button", target:self, selector:#selector(ViewController.firstButton))
38-
alert.addButton("Second Button") {
37+
_ = alert.addButton("First Button", target:self, selector:#selector(ViewController.firstButton))
38+
_ = alert.addButton("Second Button") {
3939
print("Second button tapped")
4040
}
41-
alert.showSuccess(kSuccessTitle, subTitle: kSubtitle)
41+
_ = alert.showSuccess(kSuccessTitle, subTitle: kSubtitle)
4242
}
4343

4444
@IBAction func showError(_ sender: AnyObject) {
45-
SCLAlertView().showError("Hold On...", subTitle:"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.", closeButtonTitle:"OK")
45+
_ = SCLAlertView().showError("Hold On...", subTitle:"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.", closeButtonTitle:"OK")
4646
// SCLAlertView().showError(self, title: kErrorTitle, subTitle: kSubtitle)
4747
}
4848

4949
@IBAction func showNotice(_ sender: AnyObject) {
50-
SCLAlertView().showNotice(kNoticeTitle, subTitle: kSubtitle)
50+
_ = SCLAlertView().showNotice(kNoticeTitle, subTitle: kSubtitle)
5151
}
5252

5353
@IBAction func showWarning(_ sender: AnyObject) {
54-
SCLAlertView().showWarning(kWarningTitle, subTitle: kSubtitle)
54+
_ = SCLAlertView().showWarning(kWarningTitle, subTitle: kSubtitle)
5555
}
5656

5757
@IBAction func showInfo(_ sender: AnyObject) {
58-
SCLAlertView().showInfo(kInfoTitle, subTitle: kSubtitle)
58+
_ = SCLAlertView().showInfo(kInfoTitle, subTitle: kSubtitle)
5959
}
6060

6161
@IBAction func showEdit(_ sender: AnyObject) {
6262
let appearance = SCLAlertView.SCLAppearance(showCloseButton: true)
6363
let alert = SCLAlertView(appearance: appearance)
6464
let txt = alert.addTextField("Enter your name")
65-
alert.addButton("Show Name") {
65+
_ = alert.addButton("Show Name") {
6666
print("Text value: \(txt.text)")
6767
}
68-
alert.showEdit(kInfoTitle, subTitle:kSubtitle)
68+
_ = alert.showEdit(kInfoTitle, subTitle:kSubtitle)
6969
}
7070

7171

@@ -107,30 +107,30 @@ class ViewController: UIViewController {
107107

108108
// Add the subview to the alert's UI property
109109
alert.customSubview = subview
110-
alert.addButton("Login") {
110+
_ = alert.addButton("Login") {
111111
print("Logged in")
112112
}
113113

114114
// Add Button with Duration Status and custom Colors
115-
alert.addButton("Duration Button", backgroundColor: UIColor.brown, textColor: UIColor.yellow, showDurationStatus: true) {
115+
_ = alert.addButton("Duration Button", backgroundColor: UIColor.brown, textColor: UIColor.yellow, showDurationStatus: true) {
116116
print("Duration Button tapped")
117117
}
118118

119-
alert.showInfo("Login", subTitle: "", duration: 10)
119+
_ = alert.showInfo("Login", subTitle: "", duration: 10)
120120
}
121121

122122
@IBAction func showCustomAlert(_ sender: AnyObject) {
123123

124124
let alert = SCLAlertView()
125-
alert.addButton("First Button", target:self, selector:#selector(ViewController.firstButton))
126-
alert.addButton("Second Button") {
125+
_ = alert.addButton("First Button", target:self, selector:#selector(ViewController.firstButton))
126+
_ = alert.addButton("Second Button") {
127127
print("Second button tapped")
128128
}
129129

130130
let icon = UIImage(named:"custom_icon.png")
131131
let color = UIColor.orange
132132

133-
alert.showCustom("Custom Color", subTitle: "Custom color", color: color, icon: icon!)
133+
_ = alert.showCustom("Custom Color", subTitle: "Custom color", color: color, icon: icon!)
134134
}
135135

136136
func firstButton() {

SCLAlertView/SCLAlertView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ open class SCLAlertView: UIViewController {
666666

667667
// Done button
668668
if appearance.showCloseButton {
669-
addButton(completeText ?? "Done", target:self, selector:#selector(SCLAlertView.hideView))
669+
_ = addButton(completeText ?? "Done", target:self, selector:#selector(SCLAlertView.hideView))
670670
}
671671

672672
//hidden/show circular view based on the ui option

0 commit comments

Comments
 (0)