Skip to content

Commit 01eff21

Browse files
committed
IOS8SwiftTabBarControllerTutorial added
1 parent 985c06b commit 01eff21

File tree

18 files changed

+943
-1
lines changed

18 files changed

+943
-1
lines changed

IOS8SwiftTabBarControllerTutorial/IOS8SwiftTabBarControllerTutorial.xcodeproj/project.pbxproj

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

IOS8SwiftTabBarControllerTutorial/IOS8SwiftTabBarControllerTutorial.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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0700"
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 = "E2124C971B4DAD4000F1D047"
18+
BuildableName = "IOS8SwiftTabBarControllerTutorial.app"
19+
BlueprintName = "IOS8SwiftTabBarControllerTutorial"
20+
ReferencedContainer = "container:IOS8SwiftTabBarControllerTutorial.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "E2124CAC1B4DAD4000F1D047"
32+
BuildableName = "IOS8SwiftTabBarControllerTutorialTests.xctest"
33+
BlueprintName = "IOS8SwiftTabBarControllerTutorialTests"
34+
ReferencedContainer = "container:IOS8SwiftTabBarControllerTutorial.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "E2124CAC1B4DAD4000F1D047"
50+
BuildableName = "IOS8SwiftTabBarControllerTutorialTests.xctest"
51+
BlueprintName = "IOS8SwiftTabBarControllerTutorialTests"
52+
ReferencedContainer = "container:IOS8SwiftTabBarControllerTutorial.xcodeproj">
53+
</BuildableReference>
54+
</TestableReference>
55+
</Testables>
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "E2124C971B4DAD4000F1D047"
60+
BuildableName = "IOS8SwiftTabBarControllerTutorial.app"
61+
BlueprintName = "IOS8SwiftTabBarControllerTutorial"
62+
ReferencedContainer = "container:IOS8SwiftTabBarControllerTutorial.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
67+
</TestAction>
68+
<LaunchAction
69+
buildConfiguration = "Debug"
70+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
71+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
72+
launchStyle = "0"
73+
useCustomWorkingDirectory = "NO"
74+
ignoresPersistentStateOnLaunch = "NO"
75+
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
77+
allowLocationSimulation = "YES">
78+
<BuildableProductRunnable
79+
runnableDebuggingMode = "0">
80+
<BuildableReference
81+
BuildableIdentifier = "primary"
82+
BlueprintIdentifier = "E2124C971B4DAD4000F1D047"
83+
BuildableName = "IOS8SwiftTabBarControllerTutorial.app"
84+
BlueprintName = "IOS8SwiftTabBarControllerTutorial"
85+
ReferencedContainer = "container:IOS8SwiftTabBarControllerTutorial.xcodeproj">
86+
</BuildableReference>
87+
</BuildableProductRunnable>
88+
<AdditionalOptions>
89+
</AdditionalOptions>
90+
</LaunchAction>
91+
<ProfileAction
92+
buildConfiguration = "Release"
93+
shouldUseLaunchSchemeArgsEnv = "YES"
94+
savedToolIdentifier = ""
95+
useCustomWorkingDirectory = "NO"
96+
debugDocumentVersioning = "YES">
97+
<BuildableProductRunnable
98+
runnableDebuggingMode = "0">
99+
<BuildableReference
100+
BuildableIdentifier = "primary"
101+
BlueprintIdentifier = "E2124C971B4DAD4000F1D047"
102+
BuildableName = "IOS8SwiftTabBarControllerTutorial.app"
103+
BlueprintName = "IOS8SwiftTabBarControllerTutorial"
104+
ReferencedContainer = "container:IOS8SwiftTabBarControllerTutorial.xcodeproj">
105+
</BuildableReference>
106+
</BuildableProductRunnable>
107+
</ProfileAction>
108+
<AnalyzeAction
109+
buildConfiguration = "Debug">
110+
</AnalyzeAction>
111+
<ArchiveAction
112+
buildConfiguration = "Release"
113+
revealArchiveInOrganizer = "YES">
114+
</ArchiveAction>
115+
</Scheme>
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>IOS8SwiftTabBarControllerTutorial.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>E2124C971B4DAD4000F1D047</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
<key>E2124CAC1B4DAD4000F1D047</key>
21+
<dict>
22+
<key>primary</key>
23+
<true/>
24+
</dict>
25+
</dict>
26+
</dict>
27+
</plist>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// AppDelegate.swift
3+
// IOS8SwiftTabBarControllerTutorial
4+
//
5+
// Created by Arthur Knopper on 08/07/15.
6+
// Copyright (c) 2015 Arthur Knopper. 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: [NSObject: AnyObject]?) -> 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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
5+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6+
</dependencies>
7+
<objects>
8+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
9+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
10+
<view contentMode="scaleToFill" id="iN0-l3-epB">
11+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
12+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13+
<subviews>
14+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Arthur Knopper. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
15+
<rect key="frame" x="20" y="439" width="441" height="21"/>
16+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
17+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18+
<nil key="highlightedColor"/>
19+
</label>
20+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="IOS8SwiftTabBarControllerTutorial" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21+
<rect key="frame" x="20" y="140" width="441" height="43"/>
22+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24+
<nil key="highlightedColor"/>
25+
</label>
26+
</subviews>
27+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
28+
<constraints>
29+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
30+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
31+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
32+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
33+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
34+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
35+
</constraints>
36+
<nil key="simulatedStatusBarMetrics"/>
37+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
38+
<point key="canvasLocation" x="548" y="455"/>
39+
</view>
40+
</objects>
41+
</document>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8152.3" systemVersion="15A215h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="5ek-KP-de2">
3+
<dependencies>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8124.4"/>
6+
</dependencies>
7+
<scenes>
8+
<!--Blue-->
9+
<scene sceneID="6df-mc-XB1">
10+
<objects>
11+
<viewController id="3x1-ud-kfc" sceneMemberID="viewController">
12+
<layoutGuides>
13+
<viewControllerLayoutGuide type="top" id="jVI-AN-UMi"/>
14+
<viewControllerLayoutGuide type="bottom" id="yQQ-UN-aGk"/>
15+
</layoutGuides>
16+
<view key="view" contentMode="scaleToFill" id="mRE-ef-Yxu">
17+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19+
<animations/>
20+
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
21+
</view>
22+
<tabBarItem key="tabBarItem" title="Blue" image="clock.png" id="oNg-Re-Vr5"/>
23+
</viewController>
24+
<placeholder placeholderIdentifier="IBFirstResponder" id="3EE-pB-4WI" userLabel="First Responder" sceneMemberID="firstResponder"/>
25+
</objects>
26+
<point key="canvasLocation" x="463" y="658"/>
27+
</scene>
28+
<!--Green-->
29+
<scene sceneID="oht-fa-di8">
30+
<objects>
31+
<viewController id="J0d-me-oJk" sceneMemberID="viewController">
32+
<layoutGuides>
33+
<viewControllerLayoutGuide type="top" id="Hs6-pM-jm6"/>
34+
<viewControllerLayoutGuide type="bottom" id="XvZ-c8-X4E"/>
35+
</layoutGuides>
36+
<view key="view" contentMode="scaleToFill" id="tcz-h8-DiT">
37+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
38+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
39+
<animations/>
40+
<color key="backgroundColor" red="0.0" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
41+
</view>
42+
<tabBarItem key="tabBarItem" title="Green" image="crown.png" id="sPW-De-cyd"/>
43+
</viewController>
44+
<placeholder placeholderIdentifier="IBFirstResponder" id="4aa-Fl-7RO" userLabel="First Responder" sceneMemberID="firstResponder"/>
45+
</objects>
46+
<point key="canvasLocation" x="-169" y="1022"/>
47+
</scene>
48+
<!--Red-->
49+
<scene sceneID="t64-iK-BUF">
50+
<objects>
51+
<viewController id="9YZ-g1-yuS" sceneMemberID="viewController">
52+
<layoutGuides>
53+
<viewControllerLayoutGuide type="top" id="fAo-5z-dwN"/>
54+
<viewControllerLayoutGuide type="bottom" id="XvB-yI-cmV"/>
55+
</layoutGuides>
56+
<view key="view" contentMode="scaleToFill" id="9nb-nZ-K2Z">
57+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
58+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
59+
<animations/>
60+
<color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
61+
</view>
62+
<tabBarItem key="tabBarItem" title="Red" image="book.png" id="VIy-e5-YrR"/>
63+
</viewController>
64+
<placeholder placeholderIdentifier="IBFirstResponder" id="Bhk-eh-R0x" userLabel="First Responder" sceneMemberID="firstResponder"/>
65+
</objects>
66+
<point key="canvasLocation" x="463" y="18"/>
67+
</scene>
68+
<!--Color Controller-->
69+
<scene sceneID="IzV-oh-qkJ">
70+
<objects>
71+
<tabBarController id="5ek-KP-de2" customClass="ColorController" customModule="IOS8SwiftTabBarControllerTutorial" customModuleProvider="target" sceneMemberID="viewController">
72+
<nil key="simulatedBottomBarMetrics"/>
73+
<tabBar key="tabBar" contentMode="scaleToFill" id="puu-AW-CiL">
74+
<rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
75+
<autoresizingMask key="autoresizingMask"/>
76+
<animations/>
77+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
78+
</tabBar>
79+
<connections>
80+
<segue destination="9YZ-g1-yuS" kind="relationship" relationship="viewControllers" id="Hti-c5-b9G"/>
81+
<segue destination="3x1-ud-kfc" kind="relationship" relationship="viewControllers" id="c5t-En-ONa"/>
82+
<segue destination="J0d-me-oJk" kind="relationship" relationship="viewControllers" id="WgA-lB-xHb"/>
83+
</connections>
84+
</tabBarController>
85+
<placeholder placeholderIdentifier="IBFirstResponder" id="en5-SW-5d9" userLabel="First Responder" sceneMemberID="firstResponder"/>
86+
</objects>
87+
<point key="canvasLocation" x="-254" y="246"/>
88+
</scene>
89+
</scenes>
90+
<resources>
91+
<image name="book.png" width="24" height="24"/>
92+
<image name="clock.png" width="24" height="24"/>
93+
<image name="crown.png" width="24" height="24"/>
94+
</resources>
95+
</document>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// ColorController.swift
3+
// IOS8SwiftTabBarControllerTutorial
4+
//
5+
// Created by Arthur Knopper on 08/07/15.
6+
// Copyright (c) 2015 Arthur Knopper. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
class ColorController: UITabBarController {
12+
13+
override func viewDidLoad() {
14+
super.viewDidLoad()
15+
16+
// Do any additional setup after loading the view.
17+
}
18+
19+
20+
override func didReceiveMemoryWarning() {
21+
super.didReceiveMemoryWarning()
22+
// Dispose of any resources that can be recreated.
23+
}
24+
}

0 commit comments

Comments
 (0)