Skip to content

Commit

Permalink
feat: ✨tabBar item 추가(#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lia316 committed Jun 3, 2021
1 parent 092813b commit e79a82f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
Binary file not shown.
34 changes: 34 additions & 0 deletions iOS/Airbnb/Airbnb/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,46 @@
</tabBar>
<connections>
<segue destination="0xw-oS-Z30" kind="relationship" relationship="viewControllers" id="Vtc-Iq-3iq"/>
<segue destination="or4-ry-Yuf" kind="relationship" relationship="viewControllers" id="0hK-EA-aMX"/>
<segue destination="ZjF-NV-XnN" kind="relationship" relationship="viewControllers" id="wKe-GC-ggQ"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="IBz-cE-9Qr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="130.76923076923077" y="114.45497630331754"/>
</scene>
<!--Item-->
<scene sceneID="X6C-If-Bft">
<objects>
<viewController id="or4-ry-Yuf" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="lMN-jS-0gS">
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="g1K-OR-vbS"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<tabBarItem key="tabBarItem" title="Item" id="4q1-qP-ZMH"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fCy-Fd-rBi" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-225" y="832"/>
</scene>
<!--Item-->
<scene sceneID="2aJ-zk-KiV">
<objects>
<viewController id="ZjF-NV-XnN" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="VZZ-Ei-YIb">
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="jbd-Hq-YOS"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<tabBarItem key="tabBarItem" title="Item" id="s9g-rH-9dX"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Xlt-aL-d3d" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="511" y="832"/>
</scene>
<!--Recommended Destination View Controller-->
<scene sceneID="nOJ-MM-ZZV">
<objects>
Expand Down
19 changes: 19 additions & 0 deletions iOS/Airbnb/Airbnb/SupportingFiles/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,26 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
configureTabBar()
}

func configureTabBar() {
guard let tabBarController = self.window?.rootViewController as? UITabBarController else { return }

tabBarController.tabBar.tintColor = .black
tabBarController.tabBar.barTintColor = .systemGray6

if let barItems = tabBarController.tabBar.items {
barItems[0].image = UIImage(systemName: "magnifyingglass")
barItems[1].image = UIImage(systemName: "heart")
barItems[2].image = UIImage(systemName: "person")

barItems[0].title = "검색"
barItems[1].title = "위시리스트"
barItems[2].title = "로그인"

}
}

}

0 comments on commit e79a82f

Please sign in to comment.