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#175
  • Loading branch information
L-j-h-c committed Jan 21, 2022
2 parents 44954be + be150e6 commit 843541a
Show file tree
Hide file tree
Showing 32 changed files with 81 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "property1BgHabitroom.png",
"scale" : "1x"
},
{
"scale" : "2x",
"idiom" : "universal",
"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
Expand Up @@ -2,18 +2,18 @@
"images" : [
{
"scale" : "1x",
"filename" : "property1BgHabitroomSparkflake1.png",
"idiom" : "universal"
"idiom" : "universal",
"filename" : "property1BgHabitroomSparkflake1.png"
},
{
"filename" : "[email protected]",
"scale" : "2x",
"idiom" : "universal",
"filename" : "[email protected]"
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake1.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake1.imageset/[email protected]
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
@@ -1,19 +1,19 @@
{
"images" : [
{
"filename" : "property1BgHabitroomSparkflake2.png",
"idiom" : "universal",
"scale" : "1x",
"idiom" : "universal"
"filename" : "property1BgHabitroomSparkflake2.png"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"scale" : "3x",
"idiom" : "universal",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake2.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake2.imageset/[email protected]
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
@@ -1,19 +1,19 @@
{
"images" : [
{
"filename" : "property1BgHabitroomSparkflake3.png",
"scale" : "1x",
"filename" : "property1BgHabitroomSparkflake3.png",
"idiom" : "universal"
},
{
"scale" : "2x",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
"filename" : "[email protected]"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x",
"idiom" : "universal"
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake3.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake3.imageset/[email protected]
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
@@ -1,13 +1,13 @@
{
"images" : [
{
"filename" : "property1BgHabitroomSparkflake4.png",
"scale" : "1x",
"idiom" : "universal"
"idiom" : "universal",
"filename" : "property1BgHabitroomSparkflake4.png"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake4.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake4.imageset/[email protected]
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
Expand Up @@ -7,13 +7,13 @@
},
{
"scale" : "2x",
"idiom" : "universal",
"filename" : "[email protected]"
"filename" : "[email protected]",
"idiom" : "universal"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x",
"idiom" : "universal"
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake5.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake5.imageset/[email protected]
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
@@ -1,19 +1,19 @@
{
"images" : [
{
"scale" : "1x",
"filename" : "property1BgHabitroomSparkflake6.png",
"idiom" : "universal"
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"scale" : "2x",
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake6.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...property1BgHabitroomSparkflake6.imageset/[email protected]
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
Expand Up @@ -25,7 +25,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="suy-dQ-y1I">
<rect key="frame" x="0.0" y="343" width="414" height="553"/>
<rect key="frame" x="0.0" y="315" width="414" height="581"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="nGt-Lp-835">
<size key="itemSize" width="128" height="128"/>
Expand All @@ -44,11 +44,8 @@
</collectionViewCell>
</cells>
</collectionView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="INP-rS-JPk">
<rect key="frame" x="0.0" y="0.0" width="414" height="348"/>
<constraints>
<constraint firstAttribute="width" secondItem="INP-rS-JPk" secondAttribute="height" multiplier="375:315" id="m59-v9-3SR"/>
</constraints>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="property1BgHabitroom" translatesAutoresizingMaskIntoConstraints="NO" id="INP-rS-JPk">
<rect key="frame" x="0.0" y="0.0" width="414" height="320"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mzm-65-lz0">
<rect key="frame" x="20" y="64" width="24" height="24"/>
Expand Down Expand Up @@ -224,6 +221,7 @@
<resources>
<image name="icBackWhite" width="24" height="24"/>
<image name="icMoreVerticalWhite" width="24" height="24"/>
<image name="property1BgHabitroom" width="375" height="320"/>
<namedColor name="sparkBlack">
<color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ extension HabitRoomVC {
bgView.layer.cornerRadius = 2

timeLabel.font = .p2Subtitle
timeLabel.text = ""
goalLabel.font = .p2Subtitle
goalLabel.text = ""

moreButton.isHidden = true

Expand Down
39 changes: 25 additions & 14 deletions Spark-iOS/Spark-iOS/Source/ViewControllers/TabBar/FeedVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,34 @@ class FeedVC: UIViewController {

setLayout()
setCollectionView()

// FIXME: - getFeedListFetchWithAPI 위치 변경
DispatchQueue.main.async {
self.getFeedListFetchWithAPI(lastID: self.feedLastID) {
// self.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .bottom, animated: false)
}
}
}

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

NotificationCenter.default.post(name: .disappearFloatingButton, object: nil)
tabBarController?.tabBar.isHidden = false
// FIXME: - getFeedListFetchWithAPI를 여기서 호출하는거로 변경
// DispatchQueue.main.async {
// self.getFeedListFetchWithAPI(lastID: self.feedLastID) {
// self.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .bottom, animated: false)
// }
// }

feedLastID = -1

feedList.removeAll()
firstList.removeAll()
secondList.removeAll()
thirdList.removeAll()
fourthList.removeAll()
fifthList.removeAll()
sixthList.removeAll()
seventhList.removeAll()

DispatchQueue.main.async {
self.setLoading()
}

DispatchQueue.main.async {
self.getFeedListFetchWithAPI(lastID: self.feedLastID) {
self.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .bottom, animated: false)
}
}
}

// MARK: - Methods
Expand Down Expand Up @@ -169,6 +177,9 @@ extension FeedVC {
switch response {
case .success(let data):
if let feed = data as? Feed {
self.loadingView.stop()
self.loadingBgView.removeFromSuperview()

self.feedList.append(contentsOf: feed.records)
self.setData(datalist: feed.records)
self.collectionView.reloadData()
Expand All @@ -186,7 +197,7 @@ extension FeedVC {
}
}

func postFeedLikeWithAPI(recordID: Int) {
private func postFeedLikeWithAPI(recordID: Int) {
FeedAPI.shared.feedLike(recordID: recordID) { response in
switch response {
case .success(let message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class WaitingVC: UIViewController {

@objc
func touchToMore() {
// 더보기 버튼
// 더보기 버튼
}

@objc
Expand Down

0 comments on commit 843541a

Please sign in to comment.