Skip to content

Commit

Permalink
Add Tab Bar Controller
Browse files Browse the repository at this point in the history
Add Tab Bar Controller
  • Loading branch information
JakeLin committed Sep 2, 2014
1 parent 34f58eb commit 56a1c60
Show file tree
Hide file tree
Showing 20 changed files with 188 additions and 10 deletions.
10 changes: 6 additions & 4 deletions BeautyGallery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
236CE13419B0B0FA00B1E85A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236CE13319B0B0FA00B1E85A /* AppDelegate.swift */; };
236CE13619B0B0FA00B1E85A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236CE13519B0B0FA00B1E85A /* ViewController.swift */; };
236CE13919B0B0FA00B1E85A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 236CE13719B0B0FA00B1E85A /* Main.storyboard */; };
236CE13B19B0B0FA00B1E85A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 236CE13A19B0B0FA00B1E85A /* Images.xcassets */; };
236CE14719B0B0FA00B1E85A /* BeautyGalleryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236CE14619B0B0FA00B1E85A /* BeautyGalleryTests.swift */; };
236CE15119B0B31900B1E85A /* GalleryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236CE15019B0B31900B1E85A /* GalleryViewController.swift */; };
236CE15319B0B50900B1E85A /* ViewControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236CE15219B0B50900B1E85A /* ViewControllerExtension.swift */; };
236E400619B5B15A00A4233B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 236E400519B5B15A00A4233B /* Images.xcassets */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -32,12 +32,12 @@
236CE13319B0B0FA00B1E85A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
236CE13519B0B0FA00B1E85A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
236CE13819B0B0FA00B1E85A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
236CE13A19B0B0FA00B1E85A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
236CE14019B0B0FA00B1E85A /* BeautyGalleryTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BeautyGalleryTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
236CE14519B0B0FA00B1E85A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
236CE14619B0B0FA00B1E85A /* BeautyGalleryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeautyGalleryTests.swift; sourceTree = "<group>"; };
236CE15019B0B31900B1E85A /* GalleryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GalleryViewController.swift; sourceTree = "<group>"; };
236CE15219B0B50900B1E85A /* ViewControllerExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewControllerExtension.swift; sourceTree = "<group>"; };
236E400519B5B15A00A4233B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -84,7 +84,7 @@
236CE15219B0B50900B1E85A /* ViewControllerExtension.swift */,
236CE15019B0B31900B1E85A /* GalleryViewController.swift */,
236CE13719B0B0FA00B1E85A /* Main.storyboard */,
236CE13A19B0B0FA00B1E85A /* Images.xcassets */,
236E400519B5B15A00A4233B /* Images.xcassets */,
236CE13119B0B0FA00B1E85A /* Supporting Files */,
);
path = BeautyGallery;
Expand Down Expand Up @@ -196,7 +196,7 @@
buildActionMask = 2147483647;
files = (
236CE13919B0B0FA00B1E85A /* Main.storyboard in Resources */,
236CE13B19B0B0FA00B1E85A /* Images.xcassets in Resources */,
236E400619B5B15A00A4233B /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -403,6 +403,7 @@
236CE14C19B0B0FA00B1E85A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
236CE14D19B0B0FA00B1E85A /* Build configuration list for PBXNativeTarget "BeautyGalleryTests" */ = {
isa = XCConfigurationList;
Expand All @@ -411,6 +412,7 @@
236CE14F19B0B0FA00B1E85A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
80 changes: 74 additions & 6 deletions BeautyGallery/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6206.8" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="dlX-tk-2ph">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6206.8" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="NVx-FT-lzc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7026.1"/>
</dependencies>
Expand Down Expand Up @@ -43,7 +43,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="734" y="313"/>
<point key="canvasLocation" x="1266" y="313"/>
</scene>
<!--女神画廊-->
<scene sceneID="CZL-Jb-UxH">
Expand Down Expand Up @@ -84,29 +84,97 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="Znh-gc-5pd" userLabel="First Responder" sceneMemberID="firstResponder"/>
<exit id="JVn-La-ckh" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="1220" y="313"/>
<point key="canvasLocation" x="1752" y="313"/>
</scene>
<!--Navigation Controller-->
<!--中国-->
<scene sceneID="lh3-IN-vcM">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="dlX-tk-2ph" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="中国" image="great_wall" id="bAw-fD-h6N"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="aPL-u9-38e">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="GJV-Hq-JAl"/>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="Tm2-EQ-v5b"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="KA0-aE-wRG" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="202" y="313"/>
<point key="canvasLocation" x="734" y="313"/>
</scene>
<!--日本-->
<scene sceneID="d2Z-5R-Ic7">
<objects>
<viewController id="Lyr-X8-gg9" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="ZSa-m8-jqc">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="japanese" id="kIO-50-rAw">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<tabBarItem key="tabBarItem" title="日本" image="geisha" id="kue-DW-wRU"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="MQh-BN-ODR" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="734" y="975"/>
</scene>
<!--韩国-->
<scene sceneID="5O5-PW-zJl">
<objects>
<viewController id="xEE-FS-SXt" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="l0U-Np-zwF">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="korean" id="hbp-U5-i94">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<tabBarItem key="tabBarItem" title="韩国" image="torii" id="FlL-Sz-tlu"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Sav-MC-zlk" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="734" y="1692"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="bgZ-g9-Y8e">
<objects>
<tabBarController automaticallyAdjustsScrollViewInsets="NO" id="NVx-FT-lzc" sceneMemberID="viewController">
<toolbarItems/>
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="fAv-EP-4Pk">
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="dlX-tk-2ph" kind="relationship" relationship="viewControllers" id="gXp-Kh-Rfp"/>
<segue destination="Lyr-X8-gg9" kind="relationship" relationship="viewControllers" id="hkf-zQ-6IQ"/>
<segue destination="xEE-FS-SXt" kind="relationship" relationship="viewControllers" id="XUb-Ym-nyf"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="CEA-Wp-cr9" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="122" y="975"/>
</scene>
</scenes>
<resources>
<image name="geisha" width="25" height="25"/>
<image name="great_wall" width="25" height="25"/>
<image name="japanese" width="320" height="568"/>
<image name="korean" width="320" height="568"/>
<image name="libingbing" width="320" height="568"/>
<image name="torii" width="25" height="25"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
Expand Down
18 changes: 18 additions & 0 deletions BeautyGallery/Images.xcassets/geisha.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "geisha.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions BeautyGallery/Images.xcassets/great_wall.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "great_wall.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions BeautyGallery/Images.xcassets/japanese.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "japanese.jpg"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions BeautyGallery/Images.xcassets/korean.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "korean.jpg"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions BeautyGallery/Images.xcassets/origami.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "origami.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions BeautyGallery/Images.xcassets/torii.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "torii.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 56a1c60

Please sign in to comment.