Skip to content

Commit 1d07c9a

Browse files
Sachin KesirajuSachin Kesiraju
authored andcommitted
Initial commit.
0 parents  commit 1d07c9a

File tree

16 files changed

+1012
-0
lines changed

16 files changed

+1012
-0
lines changed

SwiftExample.xcodeproj/project.pbxproj

Lines changed: 420 additions & 0 deletions
Large diffs are not rendered by default.

SwiftExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "1"
4+
version = "2.0">
5+
</Bucket>
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0600"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "031A8D70193DB57D00F4A6D2"
18+
BuildableName = "SwiftExample.app"
19+
BlueprintName = "SwiftExample"
20+
ReferencedContainer = "container:SwiftExample.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
buildConfiguration = "Debug">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "031A8D82193DB57D00F4A6D2"
36+
BuildableName = "SwiftExampleTests.xctest"
37+
BlueprintName = "SwiftExampleTests"
38+
ReferencedContainer = "container:SwiftExample.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "031A8D70193DB57D00F4A6D2"
46+
BuildableName = "SwiftExample.app"
47+
BlueprintName = "SwiftExample"
48+
ReferencedContainer = "container:SwiftExample.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
</TestAction>
52+
<LaunchAction
53+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
54+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
55+
launchStyle = "0"
56+
useCustomWorkingDirectory = "NO"
57+
buildConfiguration = "Debug"
58+
ignoresPersistentStateOnLaunch = "NO"
59+
debugDocumentVersioning = "YES"
60+
allowLocationSimulation = "YES">
61+
<BuildableProductRunnable>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "031A8D70193DB57D00F4A6D2"
65+
BuildableName = "SwiftExample.app"
66+
BlueprintName = "SwiftExample"
67+
ReferencedContainer = "container:SwiftExample.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
<AdditionalOptions>
71+
</AdditionalOptions>
72+
</LaunchAction>
73+
<ProfileAction
74+
shouldUseLaunchSchemeArgsEnv = "YES"
75+
savedToolIdentifier = ""
76+
useCustomWorkingDirectory = "NO"
77+
buildConfiguration = "Release"
78+
debugDocumentVersioning = "YES">
79+
<BuildableProductRunnable>
80+
<BuildableReference
81+
BuildableIdentifier = "primary"
82+
BlueprintIdentifier = "031A8D70193DB57D00F4A6D2"
83+
BuildableName = "SwiftExample.app"
84+
BlueprintName = "SwiftExample"
85+
ReferencedContainer = "container:SwiftExample.xcodeproj">
86+
</BuildableReference>
87+
</BuildableProductRunnable>
88+
</ProfileAction>
89+
<AnalyzeAction
90+
buildConfiguration = "Debug">
91+
</AnalyzeAction>
92+
<ArchiveAction
93+
buildConfiguration = "Release"
94+
revealArchiveInOrganizer = "YES">
95+
</ArchiveAction>
96+
</Scheme>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>SwiftExample.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>031A8D70193DB57D00F4A6D2</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
<key>031A8D82193DB57D00F4A6D2</key>
21+
<dict>
22+
<key>primary</key>
23+
<true/>
24+
</dict>
25+
</dict>
26+
</dict>
27+
</plist>

SwiftExample/AppDelegate.swift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// AppDelegate.swift
3+
// SwiftExample
4+
//
5+
// Created by Sachin Kesiraju on 6/3/14.
6+
// Copyright (c) 2014 Sachin Kesiraju. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
@UIApplicationMain
12+
class AppDelegate: UIResponder, UIApplicationDelegate {
13+
14+
var window: UIWindow?
15+
16+
17+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
18+
// Override point for customization after application launch.
19+
return true
20+
}
21+
22+
func applicationWillResignActive(application: UIApplication) {
23+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25+
}
26+
27+
func applicationDidEnterBackground(application: UIApplication) {
28+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30+
}
31+
32+
func applicationWillEnterForeground(application: UIApplication) {
33+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34+
}
35+
36+
func applicationDidBecomeActive(application: UIApplication) {
37+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38+
}
39+
40+
func applicationWillTerminate(application: UIApplication) {
41+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42+
}
43+
44+
45+
}
46+
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6154.17" systemVersion="14A238x" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="P0K-fG-x68">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6153.11"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller - Swift Example-->
8+
<scene sceneID="ufC-wZ-h7g">
9+
<objects>
10+
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="SwiftExample" customModuleProvider="target" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
13+
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
16+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
17+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18+
<subviews>
19+
<button appearanceType="aqua" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pRd-1W-njR">
20+
<rect key="frame" x="187" y="158" width="106" height="30"/>
21+
<state key="normal" title="View table view">
22+
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
23+
</state>
24+
<connections>
25+
<segue destination="b2E-rT-I2x" kind="show" id="hah-qh-vTj"/>
26+
</connections>
27+
</button>
28+
<button appearanceType="aqua" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vam-Mi-Rqo">
29+
<rect key="frame" x="207" y="317" width="66" height="30"/>
30+
<state key="normal" title="View web">
31+
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
32+
</state>
33+
<connections>
34+
<segue destination="wf8-3g-qWu" kind="show" id="WfQ-Sr-6bb"/>
35+
</connections>
36+
</button>
37+
</subviews>
38+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
39+
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
40+
</view>
41+
<navigationItem key="navigationItem" title="Swift Example" id="deA-8j-SSQ"/>
42+
</viewController>
43+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
44+
</objects>
45+
<point key="canvasLocation" x="1044" y="303"/>
46+
</scene>
47+
<!--Web View Controller-->
48+
<scene sceneID="VOw-Q8-ULY">
49+
<objects>
50+
<viewController id="wf8-3g-qWu" customClass="WebViewController" customModule="SwiftExample" customModuleProvider="target" sceneMemberID="viewController">
51+
<layoutGuides>
52+
<viewControllerLayoutGuide type="top" id="3O0-E3-k1G"/>
53+
<viewControllerLayoutGuide type="bottom" id="NIx-Kj-uFu"/>
54+
</layoutGuides>
55+
<view key="view" contentMode="scaleToFill" id="B6u-0k-lLM">
56+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
57+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
58+
<subviews>
59+
<webView appearanceType="aqua" contentMode="scaleToFill" fixedFrame="YES" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="K28-0f-qxu">
60+
<rect key="frame" x="0.0" y="64" width="480" height="416"/>
61+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
62+
<dataDetectorType key="dataDetectorTypes" link="YES"/>
63+
</webView>
64+
</subviews>
65+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
66+
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
67+
</view>
68+
<connections>
69+
<outlet property="webView" destination="K28-0f-qxu" id="Rc9-3z-qZb"/>
70+
</connections>
71+
</viewController>
72+
<placeholder placeholderIdentifier="IBFirstResponder" id="U1o-2E-873" userLabel="First Responder" sceneMemberID="firstResponder"/>
73+
</objects>
74+
<point key="canvasLocation" x="1044" y="835"/>
75+
</scene>
76+
<!--Table View Controller-->
77+
<scene sceneID="NnP-1b-wea">
78+
<objects>
79+
<tableViewController id="b2E-rT-I2x" customClass="TableViewController" customModule="SwiftExample" customModuleProvider="target" sceneMemberID="viewController">
80+
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="sBK-2t-OEb">
81+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
82+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
83+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
84+
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
85+
<prototypes>
86+
<tableViewCell contentMode="scaleToFill" ambiguous="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" id="JiL-7a-MXQ">
87+
<autoresizingMask key="autoresizingMask"/>
88+
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JiL-7a-MXQ" id="paO-fp-k2N">
89+
<autoresizingMask key="autoresizingMask"/>
90+
</tableViewCellContentView>
91+
</tableViewCell>
92+
</prototypes>
93+
<connections>
94+
<outlet property="dataSource" destination="b2E-rT-I2x" id="Xg6-cS-p7G"/>
95+
<outlet property="delegate" destination="b2E-rT-I2x" id="bSw-U0-Jsh"/>
96+
</connections>
97+
</tableView>
98+
</tableViewController>
99+
<placeholder placeholderIdentifier="IBFirstResponder" id="XpV-KF-eus" userLabel="First Responder" sceneMemberID="firstResponder"/>
100+
</objects>
101+
<point key="canvasLocation" x="1600" y="303"/>
102+
</scene>
103+
<!--Navigation Controller-->
104+
<scene sceneID="50b-LK-qIY">
105+
<objects>
106+
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="P0K-fG-x68" sceneMemberID="viewController">
107+
<toolbarItems/>
108+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="vVO-bz-bIa">
109+
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
110+
<autoresizingMask key="autoresizingMask"/>
111+
</navigationBar>
112+
<nil name="viewControllers"/>
113+
<connections>
114+
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="s9q-qo-Z0T"/>
115+
</connections>
116+
</navigationController>
117+
<placeholder placeholderIdentifier="IBFirstResponder" id="dJ9-qX-U4t" userLabel="First Responder" sceneMemberID="firstResponder"/>
118+
</objects>
119+
<point key="canvasLocation" x="352" y="303"/>
120+
</scene>
121+
</scenes>
122+
</document>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "29x29",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "40x40",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"size" : "60x60",
16+
"scale" : "2x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"orientation" : "portrait",
5+
"idiom" : "iphone",
6+
"extent" : "full-screen",
7+
"minimum-system-version" : "7.0",
8+
"scale" : "2x"
9+
},
10+
{
11+
"orientation" : "portrait",
12+
"idiom" : "iphone",
13+
"subtype" : "retina4",
14+
"extent" : "full-screen",
15+
"minimum-system-version" : "7.0",
16+
"scale" : "2x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}

SwiftExample/Info.plist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>${EXECUTABLE_NAME}</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>Sachin.Kesiraju.${PRODUCT_NAME:rfc1034identifier}</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>${PRODUCT_NAME}</string>
15+
<key>CFBundlePackageType</key>
16+
<string>APPL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
<key>LSRequiresIPhoneOS</key>
24+
<true/>
25+
<key>UIMainStoryboardFile</key>
26+
<string>Main</string>
27+
<key>UIRequiredDeviceCapabilities</key>
28+
<array>
29+
<string>armv7</string>
30+
</array>
31+
</dict>
32+
</plist>

0 commit comments

Comments
 (0)