Skip to content

Commit

Permalink
Merge pull request #198 from teamterning/Setting/#181
Browse files Browse the repository at this point in the history
[Setting] #181 - UI/UX QA μˆ˜μ • ν›„ 1.0.0 버전 Release ν•˜μ˜€μŠ΅λ‹ˆλ‹€.
  • Loading branch information
thingineeer authored Oct 3, 2024
2 parents b8c7d23 + ab15a3a commit 0d67d9e
Show file tree
Hide file tree
Showing 19 changed files with 98 additions and 115 deletions.
8 changes: 6 additions & 2 deletions Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
2DF257252C8F691300B85843 /* ProfileFixViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DF257242C8F691300B85843 /* ProfileFixViewModel.swift */; };
2DF257272C8F692B00B85843 /* ProfileViewModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DF257262C8F692B00B85843 /* ProfileViewModelType.swift */; };
2DF257292C8F6A7D00B85843 /* ProfileImageUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DF257282C8F6A7D00B85843 /* ProfileImageUtils.swift */; };
7119B8112CA72FBD00E94E62 /* UIColor+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7119B8102CA72FBD00E94E62 /* UIColor+.swift */; };
7121A1332C396FB40056DB8B /* CustomButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7121A1322C396FB40056DB8B /* CustomButton.swift */; };
7121A1352C39CCF60056DB8B /* UIButton+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7121A1342C39CCF60056DB8B /* UIButton+.swift */; };
7121A13A2C3A6CEB0056DB8B /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 7121A1392C3A6CEB0056DB8B /* RxCocoa */; };
Expand Down Expand Up @@ -247,6 +248,7 @@
2DF257242C8F691300B85843 /* ProfileFixViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileFixViewModel.swift; sourceTree = "<group>"; };
2DF257262C8F692B00B85843 /* ProfileViewModelType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewModelType.swift; sourceTree = "<group>"; };
2DF257282C8F6A7D00B85843 /* ProfileImageUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileImageUtils.swift; sourceTree = "<group>"; };
7119B8102CA72FBD00E94E62 /* UIColor+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+.swift"; sourceTree = "<group>"; };
7121A1322C396FB40056DB8B /* CustomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomButton.swift; sourceTree = "<group>"; };
7121A1342C39CCF60056DB8B /* UIButton+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+.swift"; sourceTree = "<group>"; };
7121A13D2C3A98E10056DB8B /* LabelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelFactory.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -835,6 +837,7 @@
71461ED32C3811E8002A6999 /* ViewController+.swift */,
71461ED52C38150C002A6999 /* UILabel+.swift */,
7121A1342C39CCF60056DB8B /* UIButton+.swift */,
7119B8102CA72FBD00E94E62 /* UIColor+.swift */,
);
path = "UIKit+";
sourceTree = "<group>";
Expand Down Expand Up @@ -1511,6 +1514,7 @@
71780C3A2C4577FF0073B731 /* CalendarTargetType.swift in Sources */,
71780C462C4589400073B731 /* NewTokenModel.swift in Sources */,
B871D7372C3EF87B008D78C2 /* NonJobCardCell.swift in Sources */,
7119B8112CA72FBD00E94E62 /* UIColor+.swift in Sources */,
71780C482C458FF80073B731 /* HomeTargetType.swift in Sources */,
71780C3E2C45849A0073B731 /* UserDefaultWrapper.swift in Sources */,
7121A14B2C3B09800056DB8B /* setImage.swift in Sources */,
Expand Down Expand Up @@ -1720,7 +1724,7 @@
CODE_SIGN_ENTITLEMENTS = "Terning-iOS/Terning-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2024.0924.0212;
CURRENT_PROJECT_VERSION = 2024.1002.0940;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -1760,7 +1764,7 @@
CODE_SIGN_ENTITLEMENTS = "Terning-iOS/Terning-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2024.0924.0212;
CURRENT_PROJECT_VERSION = 2024.1002.0940;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,6 @@
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFE"
}
},
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF3",
"green" : "0xF3",
"red" : "0xF3"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,6 @@
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE9",
"green" : "0xF1",
"red" : "0xE2"
}
},
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public extension CALayer {
alpha: Float = 0.05, // ν”Όκ·Έλ§ˆ λ””μžμΈ μ‹œμŠ€ν…œμ— μžˆλŠ” κΈ°λ³Έ alpha κ°’ μž…λ‹ˆλ‹€.
x: CGFloat = 0,
y: CGFloat = 2,
blur: CGFloat = 5, // 흐림 정도
blur: CGFloat = 4, // 흐림 정도
spread: CGFloat = 0) { // 그림자의 λ²”μœ„

masksToBounds = false
shadowColor = color.cgColor
shadowOpacity = alpha
shadowOffset = CGSize(width: x, height: y)
shadowRadius = blur
shadowRadius = blur / 2
if spread == 0 {
shadowPath = nil
} else {
Expand Down
26 changes: 26 additions & 0 deletions Terning-iOS/Terning-iOS/Resource/Extension/UIKit+/UIColor+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// UIColor+.swift
// Terning-iOS
//
// Created by 이λͺ…진 on 9/28/24.
//

import UIKit

extension UIColor {
convenience init(hex: String, alpha: CGFloat = 1.0) {
var hexFormatted: String = hex.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased()

if hexFormatted.hasPrefix("#") {
hexFormatted = String(hexFormatted.dropFirst())
}

assert(hexFormatted.count == 6, "Invalid hex code used.")
var rgbValue: UInt64 = 0
Scanner(string: hexFormatted).scanHexInt64(&rgbValue)

self.init(red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(rgbValue & 0x0000FF) / 255.0, alpha: alpha)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,6 @@ extension UIViewController {
@objc private func dismissKeyboard() {
view.endEditing(true)
}

func scrapAnnouncement(internshipAnnouncementId: Int, color: String) {
Providers.scrapsProvider.request(.addScrap(internshipAnnouncementId: internshipAnnouncementId, color: color)) { [weak self] result in
LoadingIndicator.hideLoading()
guard let self = self else { return }
switch result {
case .success(let response):
let status = response.statusCode
if 200..<300 ~= status {
print("슀크랩 성곡")
} else {
print("400 error")
self.showToast(message: "λ„€νŠΈμ›Œν¬ 였λ₯˜")
}
case .failure(let error):
print(error.localizedDescription)
self.showToast(message: "λ„€νŠΈμ›Œν¬ 였λ₯˜")
}
}
}
}

extension UIViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extension CustomNavigationBar {
}

if isShadow {
self.layer.applyShadow(color: .terningBlack, alpha: 0.15, y: 3, blur: 4, spread: 0)
self.layer.applyShadow(color: .terningBlack, alpha: 0.15, y: 3)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import UIKit

enum ValidationMessage: String {
case valid = "μ‚¬μš© κ°€λŠ₯ν•œ μ΄λ¦„μ΄μ—μš”"
case tooLong = "이름은 12자리 μ΄λ‚΄λ‘œ μ„€μ •ν•΄ μ£Όμ„Έμš”"
case containsSpecialCharacters = "이름에 νŠΉμˆ˜λ¬ΈμžλŠ” μž…λ ₯ν•  수 μ—†μ–΄μš”"
case containsSymbols = "이름에 κΈ°ν˜ΈλŠ” μž…λ ₯ν•  수 μ—†μ–΄μš”"
case valid = "μ‚¬μš© κ°€λŠ₯ν•œ λ‹‰λ„€μž„μ΄μ—μš”"
case tooLong = "λ‹‰λ„€μž„μ€ 12자리 μ΄λ‚΄λ‘œ μ„€μ •ν•΄ μ£Όμ„Έμš”"
case containsSpecialCharacters = "λ‹‰λ„€μž„μ— νŠΉμˆ˜λ¬ΈμžλŠ” μž…λ ₯ν•  수 μ—†μ–΄μš”"
case containsSymbols = "λ‹‰λ„€μž„μ— κΈ°ν˜ΈλŠ” μž…λ ₯ν•  수 μ—†μ–΄μš”"
case defaultMessage = "12자리 이내, 문자/숫자 κ°€λŠ₯, 특수문자/기호 μž…λ ₯λΆˆκ°€"
case nullMessage = ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ extension CalendarDateHeaderView {
func bind(title: String) {
self.titleLabel.text = convertToDayOfWeek(from: title)
}

func setListViewLayout() {
titleLabel.snp.updateConstraints {
$0.centerY.equalToSuperview()
$0.leading.equalToSuperview()
}
}
}

// MARK: - Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ extension JobListingCell {

func bind(model: AnnouncementModel, indexPath: IndexPath? = nil, in collectionView: UICollectionView? = nil) {

if model.dDay == "μ§€μ›λ§ˆκ°" {
self.dDayLabel.textColor = .grey300
} else {
self.dDayLabel.textColor = .terningMain
}

self.indexPath = indexPath
self.collectionView = collectionView

Expand Down Expand Up @@ -199,21 +205,3 @@ extension JobListingCell {
delegate?.scrapButtonDidTapInCalendar(in: collectionView, isScrap: sender.isSelected, indexPath: indexPath)
}
}

extension UIColor {
convenience init(hex: String, alpha: CGFloat = 1.0) {
var hexFormatted: String = hex.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased()

if hexFormatted.hasPrefix("#") {
hexFormatted = String(hexFormatted.dropFirst())
}

assert(hexFormatted.count == 6, "Invalid hex code used.")
var rgbValue: UInt64 = 0
Scanner(string: hexFormatted).scanHexInt64(&rgbValue)

self.init(red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(rgbValue & 0x0000FF) / 255.0, alpha: alpha)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ extension TNCalendarViewController: FSCalendarDelegate {
if isWeekView {
rootView.calenderBottomCollectionView.backgroundColor = .back
rootView.roundCalendarViewCorners(radius: 20) // λΌμš΄λ“œ 처리 ν•΄μ£ΌκΈ°
rootView.calendarViewContainer.layer.applyShadow(alpha: 0.1, y: 4, blur: 1)
rootView.calendarViewContainer.layer.applyShadow(color: .black, alpha: 0.1, y: 4, blur: 4)

rootView.calendarView.snp.updateConstraints { make in
make.height.equalTo(90.adjustedH) // μ£Όκ°„ λ·° 높이 μ„€μ •
Expand Down Expand Up @@ -573,7 +573,7 @@ extension TNCalendarViewController: UICollectionViewDataSource {

cell.bind(model: self.viewModel.calendarDaily[indexPath.row], indexPath: indexPath, in: collectionView)
cell.delegate = self
cell.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0, blur: 4)
cell.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0)
return cell
} else {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: JobListingCell.className, for: indexPath) as? JobListingCell else {
Expand All @@ -585,7 +585,7 @@ extension TNCalendarViewController: UICollectionViewDataSource {
let scrapItem = scrapSection[indexPath.row]

cell.bind(model: scrapItem, indexPath: indexPath, in: collectionView)
cell.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0, blur: 4)
cell.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0)
cell.delegate = self
return cell
}
Expand All @@ -606,6 +606,7 @@ extension TNCalendarViewController: UICollectionViewDataSource {
let sortedKeys = self.viewModel.scrapLists.keys.sorted()
let scrapSection = sortedKeys[indexPath.section]
let formattedDate = isoDateFormatter.string(from: scrapSection)
headerView.setListViewLayout()
headerView.bind(title: formattedDate)

return headerView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class CheckDeadlineCell: UICollectionViewCell {
private let checkDeadlineCard = UIView().then {
$0.layer.cornerRadius = 5
$0.backgroundColor = .white
$0.layer.applyShadow(color: .greyShadow, alpha: 1.0, x: 0, y: 0, blur: 4, spread: 0)
$0.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0)
}

private let checkDeadlineCardLabel = LabelFactory.build(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ final class IsScrapInfoViewCell: UICollectionViewCell {
private let scrapAndDeadlineCard = UIView().then {
$0.layer.cornerRadius = 5
$0.backgroundColor = .white
$0.layer.applyShadow(color: .greyShadow, alpha: 1.0, x: 0, y: 0, blur: 3, spread: 0)
$0.layer.applyShadow(color: .greyShadow, alpha: 1.0, y: 0, blur: 4)
$0.isUserInteractionEnabled = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class JobCardCell: UICollectionViewCell {
private let jobCard = UIView().then {
$0.backgroundColor = UIColor.white
$0.layer.cornerRadius = 10
$0.layer.applyShadow(color: .greyShadow, alpha: 1, x: 0, y: 0, blur: 3, spread: 0)
$0.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0)
}

private let jobCardCoverImage = UIImageView().then {
Expand Down Expand Up @@ -107,40 +107,40 @@ extension JobCardCell {
func setLayout() {
jobCard.snp.makeConstraints {
$0.top.equalToSuperview()
$0.horizontalEdges.equalToSuperview().inset(20)
$0.horizontalEdges.equalToSuperview().inset(20.adjusted)
$0.height.equalTo(100.adjustedH)
}

jobCardCoverImage.snp.makeConstraints {
$0.top.equalTo(jobCard.snp.top).offset(12)
$0.leading.equalTo(jobCard.snp.leading).offset(12)
$0.top.equalTo(jobCard.snp.top).offset(12.adjustedH)
$0.leading.equalTo(jobCard.snp.leading).offset(12.adjusted)
$0.width.height.equalTo(72.adjusted)
}

daysRemaining.snp.makeConstraints {
$0.top.equalTo(jobCard.snp.top).offset(12)
$0.leading.equalTo(jobCardCoverImage.snp.trailing).offset(8)
$0.top.equalTo(jobCard.snp.top).offset(12.adjustedH)
$0.leading.equalTo(jobCardCoverImage.snp.trailing).offset(8.adjusted)
}

jobLabel.snp.makeConstraints {
$0.top.equalTo(jobCard.snp.top).offset(30)
$0.leading.equalTo(jobCardCoverImage.snp.trailing).offset(8)
$0.trailing.equalTo(jobCard.snp.trailing).inset(50)
$0.top.equalTo(jobCard.snp.top).offset(30.adjustedH)
$0.leading.equalTo(jobCardCoverImage.snp.trailing).offset(8.adjusted)
$0.trailing.equalTo(jobCard.snp.trailing).inset(12.adjusted)
}

periodTitle.snp.makeConstraints {
$0.bottom.equalTo(jobCard.snp.bottom).inset(12)
$0.leading.equalTo(jobCardCoverImage.snp.trailing).offset(8)
$0.bottom.equalTo(jobCard.snp.bottom).inset(12.adjustedH)
$0.leading.equalTo(jobCardCoverImage.snp.trailing).offset(8.adjusted)
}

period.snp.makeConstraints {
$0.bottom.equalTo(jobCard.snp.bottom).inset(12)
$0.bottom.equalTo(jobCard.snp.bottom).inset(12.adjustedH)
$0.leading.equalTo(periodTitle.snp.trailing).offset(4)
}

scrapButton.snp.makeConstraints {
$0.top.equalTo(jobCard.snp.top).offset(62)
$0.trailing.equalTo(jobCard.snp.trailing).inset(12)
$0.top.equalTo(jobCard.snp.top).offset(62.adjustedH)
$0.trailing.equalTo(jobCard.snp.trailing).inset(12.adjusted)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class NonScrapInfoCell: UICollectionViewCell {
private let internshipScrapedStatus = UIView().then {
$0.layer.cornerRadius = 5
$0.backgroundColor = .white
$0.layer.applyShadow(color: .greyShadow, alpha: 0.25, x: 0, y: 0, blur: 4, spread: 0)
$0.layer.applyShadow(color: .greyShadow, alpha: 1, y: 0)
}

private let internshipScrapedStatusLabel = LabelFactory.build(
Expand Down
Loading

0 comments on commit 0d67d9e

Please sign in to comment.