Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/TeamSparker/Spark-iOS in…
Browse files Browse the repository at this point in the history
…to feature/TeamSparker#371
  • Loading branch information
L-j-h-c committed Mar 11, 2022
2 parents 519f333 + e0dc20c commit 931a626
Show file tree
Hide file tree
Showing 11 changed files with 546 additions and 44 deletions.
32 changes: 32 additions & 0 deletions Spark-iOS/Spark-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
2B13FB23279899C6004CCE46 /* UIScreen+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B13FB22279899C6004CCE46 /* UIScreen+.swift */; };
2B13FB252798B705004CCE46 /* CompleteAuthVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB9C50892792A86D00588155 /* CompleteAuthVC.swift */; };
2B13FB262798B70A004CCE46 /* MyRoomCerti.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBE90FCD2795C23A00157075 /* MyRoomCerti.swift */; };
2B2D31B827DA68EE000EDD28 /* ServiceNotice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2D31B727DA68EE000EDD28 /* ServiceNotice.swift */; };
2B50C1A227D7752C004BED9C /* NoticeActiveCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B50C1A127D7752C004BED9C /* NoticeActiveCVC.swift */; };
2B50C1A427D77CA9004BED9C /* NoticeServiceCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B50C1A327D77CA9004BED9C /* NoticeServiceCVC.swift */; };
2B54D01627D3B2810060DA06 /* FeedReportVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B54D01527D3B2810060DA06 /* FeedReportVC.swift */; };
Expand Down Expand Up @@ -62,6 +63,9 @@
2BE5D818279330A6007A544D /* TimerAuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE5D817279330A6007A544D /* TimerAuthView.swift */; };
2BE65F4F27C39595005D370D /* RoomStartVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE65F4E27C39595005D370D /* RoomStartVC.swift */; };
2BE65F5127C3E34B005D370D /* RoomStart.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2BE65F5027C3E34B005D370D /* RoomStart.storyboard */; };
2BE907DF27D9EE7D00B36002 /* NoticeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE907DE27D9EE7D00B36002 /* NoticeAPI.swift */; };
2BE907E127D9EE9700B36002 /* NoticeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE907E027D9EE9700B36002 /* NoticeService.swift */; };
2BE907E427D9F1BB00B36002 /* ActiveNotice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE907E327D9F1BB00B36002 /* ActiveNotice.swift */; };
2BEA121D27BA1CB400B67756 /* HabitRoomMemberCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BEA121C27BA1CB400B67756 /* HabitRoomMemberCVC.swift */; };
2BF3AB472794765F001A9042 /* RoomService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF3AB462794765F001A9042 /* RoomService.swift */; };
2BF3AB49279479B8001A9042 /* RoomAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF3AB48279479B8001A9042 /* RoomAPI.swift */; };
Expand Down Expand Up @@ -187,6 +191,7 @@
2B014FAE27AAA90E004B4559 /* FeedFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedFooterView.swift; sourceTree = "<group>"; };
2B0CF77327BFEDAC003C2E21 /* BottomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomButton.swift; sourceTree = "<group>"; };
2B13FB22279899C6004CCE46 /* UIScreen+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+.swift"; sourceTree = "<group>"; };
2B2D31B727DA68EE000EDD28 /* ServiceNotice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceNotice.swift; sourceTree = "<group>"; };
2B50C1A127D7752C004BED9C /* NoticeActiveCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeActiveCVC.swift; sourceTree = "<group>"; };
2B50C1A327D77CA9004BED9C /* NoticeServiceCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeServiceCVC.swift; sourceTree = "<group>"; };
2B54D01527D3B2810060DA06 /* FeedReportVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedReportVC.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -238,6 +243,9 @@
2BE5D817279330A6007A544D /* TimerAuthView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimerAuthView.swift; sourceTree = "<group>"; };
2BE65F4E27C39595005D370D /* RoomStartVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStartVC.swift; sourceTree = "<group>"; };
2BE65F5027C3E34B005D370D /* RoomStart.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = RoomStart.storyboard; sourceTree = "<group>"; };
2BE907DE27D9EE7D00B36002 /* NoticeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeAPI.swift; sourceTree = "<group>"; };
2BE907E027D9EE9700B36002 /* NoticeService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeService.swift; sourceTree = "<group>"; };
2BE907E327D9F1BB00B36002 /* ActiveNotice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveNotice.swift; sourceTree = "<group>"; };
2BEA121C27BA1CB400B67756 /* HabitRoomMemberCVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HabitRoomMemberCVC.swift; sourceTree = "<group>"; };
2BF3AB462794765F001A9042 /* RoomService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomService.swift; sourceTree = "<group>"; };
2BF3AB48279479B8001A9042 /* RoomAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomAPI.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -585,6 +593,24 @@
path = AuthUpload;
sourceTree = "<group>";
};
2BE907DD27D9EE6800B36002 /* Notice */ = {
isa = PBXGroup;
children = (
2BE907DE27D9EE7D00B36002 /* NoticeAPI.swift */,
2BE907E027D9EE9700B36002 /* NoticeService.swift */,
);
path = Notice;
sourceTree = "<group>";
};
2BE907E227D9F10E00B36002 /* Notice */ = {
isa = PBXGroup;
children = (
2BE907E327D9F1BB00B36002 /* ActiveNotice.swift */,
2B2D31B727DA68EE000EDD28 /* ServiceNotice.swift */,
);
path = Notice;
sourceTree = "<group>";
};
2BF3AB42279475B9001A9042 /* Room */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -965,6 +991,7 @@
isa = PBXGroup;
children = (
F82F58052792897B003E4174 /* Plugin */,
2BE907DD27D9EE6800B36002 /* Notice */,
F8E3496627969B4F001B67E7 /* Auth */,
F82F5806279289AC003E4174 /* Home */,
2BF3AB42279475B9001A9042 /* Room */,
Expand All @@ -980,6 +1007,7 @@
children = (
F82F57FA27928437003E4174 /* NetworkResult.swift */,
F82F57FC2792847D003E4174 /* GenericResponse.swift */,
2BE907E227D9F10E00B36002 /* Notice */,
F8E3496B2796B7DF001B67E7 /* Auth */,
F82F5800279287EC003E4174 /* Home */,
2BF3AB4A27947C3A001A9042 /* Room */,
Expand Down Expand Up @@ -1381,6 +1409,7 @@
EB26D93827CF74D700C88DCA /* SendSparkCVC.swift in Sources */,
F8D4497227BE46670091F297 /* LeftRightButtonsNavigationBar.swift in Sources */,
2B54D01627D3B2810060DA06 /* FeedReportVC.swift in Sources */,
2BE907E427D9F1BB00B36002 /* ActiveNotice.swift in Sources */,
F8F6D6F7279735BF00725537 /* HabitRoomVC.swift in Sources */,
EB01BC1027C8DFBA00041A35 /* SparkActionSheet.swift in Sources */,
2BAF156327D4A0CA00DE4190 /* NoticeUpdateHeaderView.swift in Sources */,
Expand All @@ -1394,6 +1423,7 @@
EBEA382F27947C9E00B5736A /* MyRoomService.swift in Sources */,
2B69E7E5278E22F4000F927F /* FeedHeaderView.swift in Sources */,
2BBED13527956EAB0052CA5C /* FeedAPI.swift in Sources */,
2BE907DF27D9EE7D00B36002 /* NoticeAPI.swift in Sources */,
F80A3E55278C1C1F00728E07 /* StorageVC.swift in Sources */,
F82F580C27929F74003E4174 /* Header.swift in Sources */,
EBA2D6D4279AB50D0022DFD6 /* ViewForRender.swift in Sources */,
Expand All @@ -1416,6 +1446,7 @@
EBEA38372794B34300B5736A /* CodeJoinCheck.swift in Sources */,
F8096F2B27841F4100B71D38 /* Storyboard.swift in Sources */,
2B57F38127971D1D002A677D /* ProfileSettingVC.swift in Sources */,
2B2D31B827DA68EE000EDD28 /* ServiceNotice.swift in Sources */,
F8250CFC27D483E70073FFCA /* Profile.swift in Sources */,
2BC17270278F54DB00BA3029 /* WaitingVC.swift in Sources */,
EB874AEB279706FC000DD20B /* DialogueVC.swift in Sources */,
Expand Down Expand Up @@ -1472,6 +1503,7 @@
F8E3496D2796B7F6001B67E7 /* Signup.swift in Sources */,
F8E3496A27969B67001B67E7 /* AuthService.swift in Sources */,
2BA98FB227CB44E800C53820 /* HabitRoomLeaveVC.swift in Sources */,
2BE907E127D9EE9700B36002 /* NoticeService.swift in Sources */,
F8096F3027841F9200B71D38 /* HomeVC.swift in Sources */,
F8250CFA27D25F2B0073FFCA /* UserService.swift in Sources */,
F82F5808279289B2003E4174 /* HomeAPI.swift in Sources */,
Expand Down
8 changes: 7 additions & 1 deletion Spark-iOS/Spark-iOS/Source/Cells/Feed/FeedCVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class FeedCVC: UICollectionViewCell {
}

// MARK: - Methods
func initCell(title: String, nickName: String, timeRecord: String?, likeCount: Int, sparkCount: Int, profileImg: String, certifyingImg: String, hasTime: Bool, isLiked: Bool, recordId: Int, indexPath: IndexPath) {
func initCell(title: String, nickName: String, timeRecord: String?, likeCount: Int, sparkCount: Int, profileImg: String, certifyingImg: String, hasTime: Bool, isLiked: Bool, recordId: Int, indexPath: IndexPath, isMyRecord: Bool) {
titleLabel.text = "\(title)"
nameLabel.text = "\(nickName)"
sparkCountLabel.text = "\(sparkCount)"
Expand All @@ -92,6 +92,12 @@ class FeedCVC: UICollectionViewCell {
likeCountLabel.textColor = .sparkGray
}

if isMyRecord {
moreButton.isHidden = true
} else {
moreButton.isHidden = false
}

self.indexPath = indexPath
}

Expand Down
17 changes: 13 additions & 4 deletions Spark-iOS/Spark-iOS/Source/Cells/Notice/NoticeActiveCVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class NoticeActiveCVC: UICollectionViewCell {

override func prepareForReuse() {
super.prepareForReuse()
self.backgroundColor = .clear
titleLabel.text = ""
contentLabel.text = ""
dateLabel.text = ""
Expand All @@ -54,20 +55,28 @@ class NoticeActiveCVC: UICollectionViewCell {
contentLabel.numberOfLines = 2

contentImageView.layer.borderWidth = 2
contentImageView.layer.borderColor = UIColor.sparkWhite.cgColor
contentImageView.layer.borderColor = UIColor.sparkLightGray.cgColor
contentImageView.layer.masksToBounds = true
contentImageView.contentMode = .scaleAspectFill
contentImageView.backgroundColor = .sparkDarkGray

bottomLineView.backgroundColor = .sparkGray.withAlphaComponent(0.3)
}

func initCell(title: String, content: String, date: String, image: String) {
// TODO: - 사진 종류에 따라 radius 적용
func initCell(title: String, content: String, date: String, image: String, isThumbProfile: Bool, isNew: Bool) {
titleLabel.text = title
contentLabel.text = content
dateLabel.text = date
contentImageView.updateImage(image, type: .small)

if isThumbProfile {
contentImageView.layer.cornerRadius = 20
} else {
contentImageView.layer.cornerRadius = 2
}

if isNew {
self.backgroundColor = .sparkMostLightPinkred.withAlphaComponent(0.3)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class NoticeServiceCVC: UICollectionViewCell {

override func prepareForReuse() {
super.prepareForReuse()
self.backgroundColor = .clear
titleLabel.text = ""
contentLabel.text = ""
dateLabel.text = ""
Expand All @@ -54,10 +55,14 @@ class NoticeServiceCVC: UICollectionViewCell {
bottomLineView.backgroundColor = .sparkGray.withAlphaComponent(0.3)
}

func initCell(title: String, content: String, date: String) {
func initCell(title: String, content: String, date: String, isNew: Bool) {
titleLabel.text = title
contentLabel.text = content
dateLabel.text = date

if isNew {
self.backgroundColor = .sparkMostLightPinkred.withAlphaComponent(0.3)
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion Spark-iOS/Spark-iOS/Source/NetworkModels/Feed/Feed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ struct Record: Codable {
let sparkCount: Int
var isLiked: Bool
let timerRecord: String?
let isMyRecord: Bool

enum CodingKeys: String, CodingKey {
case date, day
case userID = "userId"
case recordID = "recordId"
case nickname, profileImg, certifyingImg, likeNum, sparkCount, isLiked, timerRecord, roomName
case nickname, profileImg, certifyingImg, likeNum, sparkCount, isLiked, timerRecord, roomName, isMyRecord
}
}
29 changes: 29 additions & 0 deletions Spark-iOS/Spark-iOS/Source/NetworkModels/Notice/ActiveNotice.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// ActiveNotice.swift
// Spark-iOS
//
// Created by 양수빈 on 2022/03/10.
//

import Foundation

// MARK: - ActiveNotice
struct ActiveNotice: Codable {
let newService: Bool
let notices: [Active]
}

// MARK: - Active
struct Active: Codable {
let noticeID: Int
let noticeTitle, noticeContent: String
let noticeImg: String
let isThumbProfile: Bool
let day: String
let isNew: Bool

enum CodingKeys: String, CodingKey {
case noticeID = "noticeId"
case noticeTitle, noticeContent, noticeImg, isThumbProfile, day, isNew
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// ServiceNotice.swift
// Spark-iOS
//
// Created by 양수빈 on 2022/03/11.
//

import Foundation

// MARK: - DataClass
struct ServiceNotice: Codable {
let newActive: Bool
let notices: [Service]
}

// MARK: - Notice
struct Service: Codable {
let noticeID: Int
let noticeTitle: String
let noticeContent: String
let day: String
let isNew: Bool

enum CodingKeys: String, CodingKey {
case noticeID = "noticeId"
case noticeTitle, noticeContent, day, isNew
}
}
Loading

0 comments on commit 931a626

Please sign in to comment.