Skip to content

Commit c65aee9

Browse files
committed
Add question alert to example storyboard
1 parent 2105218 commit c65aee9

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

SCLAlertViewExample/Base.lproj/Storyboard.storyboard

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ohq-jH-G4R">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ohq-jH-G4R">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
66
</dependencies>
77
<scenes>
88
<!--View Controller-->
@@ -140,6 +140,13 @@
140140
<action selector="showTimer:" destination="Ohq-jH-G4R" eventType="touchUpInside" id="TB1-ia-8d6"/>
141141
</connections>
142142
</button>
143+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="D2w-Gh-y6B">
144+
<rect key="frame" x="248" y="484" width="104" height="30"/>
145+
<state key="normal" title="Show Question"/>
146+
<connections>
147+
<action selector="showQuestion:" destination="Ohq-jH-G4R" eventType="touchUpInside" id="Uxe-EB-NJt"/>
148+
</connections>
149+
</button>
143150
</subviews>
144151
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
145152
<constraints>
@@ -152,8 +159,10 @@
152159
<constraint firstItem="QYK-Po-EUn" firstAttribute="top" secondItem="4U1-31-wBg" secondAttribute="bottom" constant="8" symbolic="YES" id="Cm3-q7-Uqz"/>
153160
<constraint firstItem="DRS-IB-vIQ" firstAttribute="leading" secondItem="XBG-LD-1eZ" secondAttribute="leading" constant="-1" id="CzL-it-lGU"/>
154161
<constraint firstItem="w0L-ki-asc" firstAttribute="centerX" secondItem="8ID-0w-GrU" secondAttribute="centerX" id="Gac-d5-i1h"/>
162+
<constraint firstItem="D2w-Gh-y6B" firstAttribute="centerX" secondItem="zXb-fx-bXk" secondAttribute="centerX" id="Mij-hB-dtT"/>
155163
<constraint firstItem="7sB-cQ-cdn" firstAttribute="leading" secondItem="c2J-Bd-hKP" secondAttribute="leading" constant="-3" id="Q9X-fN-DDv"/>
156164
<constraint firstItem="7sB-cQ-cdn" firstAttribute="top" secondItem="69l-rS-Rjt" secondAttribute="bottom" constant="16" id="Scu-UY-8Dq"/>
165+
<constraint firstItem="D2w-Gh-y6B" firstAttribute="top" secondItem="Leu-lo-T4a" secondAttribute="bottom" id="TuZ-uf-osj"/>
157166
<constraint firstItem="cKc-Im-7MS" firstAttribute="centerX" secondItem="DRS-IB-vIQ" secondAttribute="centerX" id="UKo-qY-kHe"/>
158167
<constraint firstItem="mww-Jw-0ao" firstAttribute="leading" secondItem="cKc-Im-7MS" secondAttribute="leading" constant="-1" id="Wzq-tH-GyX"/>
159168
<constraint firstItem="cKc-Im-7MS" firstAttribute="top" secondItem="c2J-Bd-hKP" secondAttribute="bottom" constant="8" symbolic="YES" id="XWK-92-ETT"/>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
"idiom" : "ipad",
114114
"filename" : "icon_152x152.png",
115115
"scale" : "2x"
116+
},
117+
{
118+
"idiom" : "ipad",
119+
"size" : "83.5x83.5",
120+
"scale" : "2x"
116121
}
117122
],
118123
"info" : {

SCLAlertViewExample/ViewController.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ - (IBAction)showTimer:(id)sender
255255
closeButtonTitle:@"Dismiss" duration:10.0f];
256256
}
257257

258+
- (IBAction)showQuestion:(id)sender
259+
{
260+
SCLAlertView *alert = [[SCLAlertView alloc] init];
261+
262+
[alert showQuestion:self title:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f];
263+
}
264+
258265
- (void)firstButton
259266
{
260267
NSLog(@"First button tapped");

0 commit comments

Comments
 (0)