Skip to content

Commit

Permalink
[Chore] Keyneez#46 - 탭바 캐릭터, 설정 disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kpk0616 committed Jan 13, 2023
1 parent d90ee11 commit 301590a
Show file tree
Hide file tree
Showing 25 changed files with 133 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "card_blue_contentDetail.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : "card_green_contentDetail.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : "card_orange_contentDetail.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : "card_pink_contentDetail.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : "card_purple_contentDetail.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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.
2 changes: 1 addition & 1 deletion Keyneez/Keyneez/Global/Auth/UserSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ final class UserSession {
private init() { }

var profile: Profile?
var accessToken: String? = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2tleSI6Mjc3LCJpYXQiOjE2NzM2MzU3ODIsImV4cCI6MTY3MzY0Mjk4Mn0.XlA3A1w72I3OIF3h_nBxk4WtDjl_-gDV97xzw_fllCQ"
var accessToken: String? = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2tleSI6Mjk5LCJpYXQiOjE2NzM2Mzk3MDIsImV4cCI6MTY3MzY0NjkwMn0.aL2yxuMvSaCuTEiDZPnexm2c3tpRUZrxZeXU5_5djH4"

}
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ extension ContentDetailViewController {
setLikeButton(isLiked: model.liked)
guard let url = model.contentImg else { return }
contentImageView.setImage(url: url)
categoryView.setCategory(with: model.category[0])
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ extension HomeContentViewController: UICollectionViewDataSource {
withReuseIdentifier: HomeContentCollectionViewCell.identifier, for: indexPath)
as? HomeContentCollectionViewCell else { return UICollectionViewCell() }
homeContentCell.bindHomeData(model: contentList[indexPath.item])
// 여기서 setCategory
homeContentCell.setHomeCategoryCard(category: contentList[indexPath.item].category[0])
homeContentCell.setHomeCategoryView(category: contentList[indexPath.item].category[0])
return homeContentCell
}
}
18 changes: 11 additions & 7 deletions Keyneez/Keyneez/Tab/Home/Views/HomeContentCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class HomeContentCollectionViewCell: UICollectionViewCell {
$0.font = UIFont.font(.pretendardSemiBold, ofSize: 12)
$0.textColor = UIColor.gray900
}
private let categoryView = CategoryView()
private var homeContentCategoryView = CategoryView()
private lazy var likeButton = UIButton().then {
$0.setImage(UIImage(named: "ic_favorite_home_line"), for: .normal)
$0.setImage(UIImage(named: "ic_favorite_home_filled"), for: .selected)
Expand Down Expand Up @@ -82,7 +82,7 @@ extension HomeContentCollectionViewCell {
contentImageView,
dateView,
likeButton,
categoryView,
homeContentCategoryView,
contentTitle,
contentIntroduction,
cardImageView
Expand Down Expand Up @@ -113,14 +113,14 @@ extension HomeContentCollectionViewCell {
$0.trailing.equalToSuperview().inset(24)
$0.width.height.equalTo(32)
}
categoryView.snp.makeConstraints {
homeContentCategoryView.snp.makeConstraints {
$0.top.equalTo(contentImageView.snp.bottom).offset(27)
$0.leading.equalTo(dateView)
$0.width.equalTo(49)
$0.height.equalTo(33)
}
contentTitle.snp.makeConstraints {
$0.top.equalTo(categoryView.snp.bottom).offset(12)
$0.top.equalTo(homeContentCategoryView.snp.bottom).offset(12)
$0.leading.trailing.equalToSuperview().inset(21)
}
contentIntroduction.snp.makeConstraints {
Expand All @@ -144,8 +144,8 @@ extension HomeContentCollectionViewCell {
contentIntroduction.text = model.introduction
likeButton.isSelected = model.liked
contentImageView.setImage(url: model.contentImg)
setCategoryCard(category: model.category[0])
categoryView.setCategory(with: model.category[0])
// setCategoryCard(category: model.category[0]) // 여기야
// homeContentCategoryView.setCategory(with: model.category[0])
}
private func setTitle(fullTitle: String) -> String {
guard let title = fullTitle as? String else {return ""}
Expand All @@ -163,7 +163,7 @@ extension HomeContentCollectionViewCell {
if model.startAt!.isEmpty || model.endAt!.isEmpty { dateView.isHidden = true; return "" }
return getDate(fullDate: model.startAt!) + " ~ " + getDate(fullDate: model.endAt!)
}
private func setCategoryCard(category: String) {
func setHomeCategoryCard(category: String) {
switch(category) {
case "진로" :
cardImageView.image = UIImage(named: "card_green_home")
Expand All @@ -180,6 +180,10 @@ extension HomeContentCollectionViewCell {
}
}

func setHomeCategoryView(category: String) {
homeContentCategoryView.setCategory(with: category)
}

@objc
private func touchUpLikeButton() {
likeButton.isSelected = !likeButton.isSelected
Expand Down
2 changes: 2 additions & 0 deletions Keyneez/Keyneez/Tab/KeyneezTabbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ extension KeyneezTabbarController {
var navigations = tabInfos.map {
makeViewController(viewController: $0.viewController!, title: $0.title, imageName: $0.imageName)
}
navigations[3].tabBarItem.isEnabled = false
navigations[4].tabBarItem.isEnabled = false
// navigations.insert(homeViewNavigationController, at: 0)
self.viewControllers = navigations
}
Expand Down

0 comments on commit 301590a

Please sign in to comment.