Skip to content

Commit

Permalink
Modify clear button title and make it exit the app
Browse files Browse the repository at this point in the history
  • Loading branch information
BalestraPatrick committed Nov 12, 2017
1 parent 0a0f0c9 commit f2bd52b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Example/WhatsNew/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -22,8 +22,8 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mfy-zO-GJW">
<rect key="frame" x="169" y="562" width="36" height="30"/>
<state key="normal" title="Clear"/>
<rect key="frame" x="80.5" y="562" width="213" height="30"/>
<state key="normal" title="Clear UserDefaults and Restart"/>
<connections>
<action selector="clear:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="dVB-Vc-RSY"/>
</connections>
Expand Down
1 change: 1 addition & 0 deletions Example/WhatsNew/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ class ViewController: UIViewController {

@IBAction func clear(_ sender: Any) {
UserDefaults.standard.removeObject(forKey: "LatestAppVersionPresented")
exit(0)
}
}

0 comments on commit f2bd52b

Please sign in to comment.