Skip to content

Commit

Permalink
🎨 tabbar 에셋 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
hansolnoh95 committed Sep 29, 2021
1 parent 8e3b5f6 commit 8b175d3
Show file tree
Hide file tree
Showing 43 changed files with 255 additions and 3 deletions.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "45.png",
"scale" : "1x",
"idiom" : "universal"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x",
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"scale" : "1x",
"idiom" : "universal",
"filename" : "37.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"scale" : "1x",
"idiom" : "universal",
"filename" : "48.png"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"scale" : "3x",
"filename" : "[email protected]",
"idiom" : "universal"
}
],
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"scale" : "1x",
"filename" : "34.png",
"idiom" : "universal"
},
{
"scale" : "2x",
"filename" : "[email protected]",
"idiom" : "universal"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "44.png",
"scale" : "1x",
"idiom" : "universal"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x",
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "36.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"scale" : "3x",
"filename" : "[email protected]",
"idiom" : "universal"
}
],
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "46.png"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"scale" : "3x",
"filename" : "[email protected]",
"idiom" : "universal"
}
],
"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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "38.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"scale" : "2x",
"idiom" : "universal"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "47.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"scale" : "2x",
"idiom" : "universal",
"filename" : "[email protected]"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "35.png",
"scale" : "1x"
},
{
"scale" : "2x",
"filename" : "[email protected]",
"idiom" : "universal"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ final class PayCardCollectionViewCell: ASCellNode {
super.init()
self.automaticallyManagesSubnodes = true
self.automaticallyRelayoutOnSafeAreaChanges = true
self.layer.applyCardShadow()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ extension PayNodeController {
let layout = ASStackLayoutSpec(
direction: .vertical,
spacing: 0,
justifyContent: .spaceBetween,
justifyContent: .spaceAround,
alignItems: .center,
children: [navigationView, titleLabel, cardCollectionNode, menuView, bannerButton])
return layout
Expand Down Expand Up @@ -139,6 +139,7 @@ extension PayNodeController: ASCollectionDataSource {
return {
guard self.cardList.count > indexPath.row else { return ASCellNode() }
let payCell = PayCardCollectionViewCell()
// payCell.layer.applyCardShadow()
payCell.dataBind(
cardImage: self.cardList[indexPath.item].cardImageName,
title: self.cardList[indexPath.item].title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ final class StarbucksTabBarController: ASTabBarController {
override func viewDidLoad() {
super.viewDidLoad()
self.selectedIndex = defaultIndex
config()
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
setupTabBar()
config()
}
}

Expand Down Expand Up @@ -62,7 +62,29 @@ extension StarbucksTabBarController {
}

private func config() {

let icons = ["homeIcon", "payIcon", "orderIcon", "giftIcon", "otherIcon"]
let selectedIcons = [
"homeSelectedIcon",
"paySelectedIcon",
"orderSelectedIcon",
"giftSelectedIcon",
"otherSelectedIcon"
]

tabBar.isTranslucent = false
tabBar.tintColor = .systemGreen
tabBar.backgroundColor = .systemGray6
tabBar.barStyle = .default

for (index, value) in (tabBar.items?.enumerated())! {
let tabBarItem: UITabBarItem = value as UITabBarItem
tabBarItem.title = nil
tabBarItem.image = UIImage(named: icons[index])?.withRenderingMode(.alwaysOriginal)
tabBarItem.selectedImage = UIImage(named: selectedIcons[index])?.withRenderingMode(.alwaysOriginal)
tabBarItem.accessibilityIdentifier = icons[index]
tabBarItem.imageInsets.top = 15
tabBarItem.imageInsets.bottom = -15
}
}
}

0 comments on commit 8b175d3

Please sign in to comment.