Skip to content

Commit

Permalink
[Merge] TeamSparker#146 - 프로젝트 최신화
Browse files Browse the repository at this point in the history
# Conflicts:
#	Spark-iOS/Spark-iOS/Source/ViewControllers/HabitRoom/HabitRoomVC.swift
  • Loading branch information
L-j-h-c committed Jan 21, 2022
2 parents 54cf6da + 77a2bbc commit c425414
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -56,10 +56,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XBD-NR-SRK">
<rect key="frame" x="20" y="646" width="335" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="KJJ-HB-Rs4"/>
</constraints>
<rect key="frame" x="20" y="664" width="335" height="39"/>
<fontDescription key="fontDescription" name="NotoSansKR-Medium" family="Noto Sans KR" pointSize="18"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
Expand All @@ -71,11 +68,8 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vtz-oV-XpG">
<rect key="frame" x="20" y="710" width="335" height="48"/>
<rect key="frame" x="20" y="719" width="335" height="39"/>
<color key="backgroundColor" name="sparkDarkPinkRed"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="HmT-gM-mxw"/>
</constraints>
<fontDescription key="fontDescription" name="NotoSansKR-Bold" family="Noto Sans KR" pointSize="18"/>
<color key="tintColor" name="sparkGray"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</attributedString>
</buttonConfiguration>
<connections>
<action selector="touchNoDismiss:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="Rgz-SM-G39"/>
<action selector="goToFeedVC:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="kqi-67-HSe"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jcm-Se-nlb">
Expand Down Expand Up @@ -145,9 +145,9 @@
</view>
<connections>
<outlet property="animationFrameView" destination="1bv-cF-dvo" id="Y3D-HB-tg1"/>
<outlet property="goToFeedButton" destination="uYS-yb-TR2" id="Dc9-cr-hij"/>
<outlet property="handImageVIew" destination="cm5-OK-aky" id="eCv-vH-ImC"/>
<outlet property="instaView" destination="Jcm-Se-nlb" id="jHd-vh-64a"/>
<outlet property="noButton" destination="uYS-yb-TR2" id="Dc9-cr-hij"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
Expand Down
4 changes: 3 additions & 1 deletion Spark-iOS/Spark-iOS/Source/Cells/Feed/FeedCVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class FeedCVC: UICollectionViewCell {
likeCountLabel.text = ""
timeLabel.text = ""
feedImageView.image = UIImage()
fadeImageView.image = UIImage()
profileImageView.image = UIImage()
}

Expand Down Expand Up @@ -136,6 +137,7 @@ extension FeedCVC {
profileImageView.layer.masksToBounds = true
profileImageView.contentMode = .scaleAspectFill
feedImageView.contentMode = .scaleAspectFill
feedImageView.layer.masksToBounds = true

sparkLabel.text = "받은 스파크"

Expand Down Expand Up @@ -192,7 +194,7 @@ extension FeedCVC {

feedImageView.snp.makeConstraints { make in
make.top.leading.trailing.equalToSuperview()
make.height.equalTo(feedImageView.snp.width).multipliedBy(1.0 / 1.0)
make.height.equalTo(self.snp.width).multipliedBy(1.0 / 1.0)
}

fadeImageView.snp.makeConstraints { make in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class AuthTimerVC: UIViewController {
super.viewWillAppear(animated)

navigationController?.isNavigationBarHidden = true
navigationController?.interactivePopGestureRecognizer?.delegate = nil
}

// MARK: - Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ extension AuthUploadVC {
if let authUpload = data as? AuthUpload {
guard let popupVC = UIStoryboard(name: Const.Storyboard.Name.completeAuth, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.completeAuth) as? CompleteAuthVC else {return}

popupVC.vcType = self.vcType
popupVC.modalTransitionStyle = .crossDissolve
popupVC.modalPresentationStyle = .overFullScreen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class JoinCheckVC: UIViewController {
super.viewDidLoad()
setUI()
setAnimation()
setLayout()
}

// MARK: - @IBAction Properties
Expand Down Expand Up @@ -80,6 +81,16 @@ extension JoinCheckVC {
ticketView.play()
}
}

private func setLayout() {
reInputButton.snp.makeConstraints { make in
make.height.equalTo(self.view.frame.width*48/335)
}

enterButton.snp.makeConstraints { make in
make.height.equalTo(self.view.frame.width*48/335)
}
}
}

// MARK: Network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,22 @@ class CreateRoomVC: UIViewController {

// MARK: - View Life Cycles

override func viewWillAppear(_ animated: Bool) {
navigationController?.isNavigationBarHidden = true
}

override func viewDidLoad() {
super.viewDidLoad()

setUI()
setLayout()
setNotification()
setAddTarget()
}

override func viewWillAppear(_ animated: Bool) {
navigationController?.isNavigationBarHidden = true
navigationController?.interactivePopGestureRecognizer?.delegate = nil
}

// MARK: - Methods

private func setUI() {
// navigationController?.initWithLeftButtonTitle(title: "aa",
// tintColor: .sparkBlack,
// backgroundColor: .white,
// image: UIImage(named: "icQuit"),
// selector: #selector(touchCloseButton))

closeButton.setImage(UIImage(named: "icQuit"), for: .normal)

titleLabel.text = "어떤 습관방을 만들건가요?"
Expand Down Expand Up @@ -213,5 +207,4 @@ extension CreateRoomVC: UITextFieldDelegate {
disableButton()
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
//

import UIKit

import Lottie
import SwiftUI

class CompleteAuthVC: UIViewController {

// MARK: Properties
// MARK: - Properties
lazy var confettiView: AnimationView = {
let animationView = AnimationView(name: Const.Lottie.Name.confetti)
animationView.frame = animationFrameView.bounds
Expand All @@ -19,33 +21,40 @@ class CompleteAuthVC: UIViewController {
return animationView
}()

// MARK: IBoutlet properties
var vcType: VCCase?

// MARK: - IBoutlet properties

@IBOutlet weak var handImageVIew: UIImageView!
@IBOutlet weak var animationFrameView: UIView!
@IBOutlet weak var noButton: UIButton!
@IBOutlet weak var goToFeedButton: UIButton!
@IBOutlet weak var instaView: UIView!

// MARK: Life Cycles
// MARK: - View Life Cycles

override func viewDidLoad() {
super.viewDidLoad()
setUI()
setGesture()
setAnimation()
}

// MARK: IBActions
@IBAction func touchNoDismiss(_ sender: Any) {
self.dismiss(animated: true) {
// let presentingVC = self.presentingViewController
// presentingVC?.navigationController?.popToRootViewController(animated: false)
@IBAction func goToFeedVC(_ sender: Any) {
guard let presentingVC = self.presentingViewController?.presentingViewController as? UITabBarController else { return }
guard let naviVC = presentingVC.viewControllers?[1] as? UINavigationController else { return }

presentingVC.dismiss(animated: false) {
naviVC.popViewController(animated: false)
presentingVC.selectedIndex = 0
}
}
}

// MARK: Methods
extension CompleteAuthVC {

// MARK: - Methods

private func setUI() {
view.backgroundColor = .sparkBlack.withAlphaComponent(0.8)
tabBarController?.tabBar.isHidden = true
Expand All @@ -58,15 +67,16 @@ extension CompleteAuthVC {
instaView.addGestureRecognizer(instaTapGesture)
}

@objc
func tapped(_ gesture: UITapGestureRecognizer) {
// 인스타 공유 기능
}

private func setAnimation() {
animationFrameView.addSubview(confettiView)
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.3) { [self] in
confettiView.play()
}
}

// MARK: - @objc
@objc
func tapped(_ gesture: UITapGestureRecognizer) {
// 인스타 공유 기능
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class HabitAuthVC: UIViewController {
super.viewDidLoad()
setUI()
setAddTargets()
setLayout()
}

@IBAction func touchOutsideDismiss(_ sender: Any) {
Expand Down Expand Up @@ -100,6 +101,12 @@ extension HabitAuthVC {
}
}

private func setLayout() {
okButton.snp.makeConstraints { make in
make.height.equalTo(self.view.frame.width*48/335)
}
}

private func setAddTargets() {
okButton.addTarget(self, action: #selector(touchOkayButton), for: .touchUpInside)
considerButton.addTarget(self, action: #selector(touchConsiderButton), for: .touchUpInside)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class HabitRoomVC: UIViewController {
extension HabitRoomVC {
private func setUI() {
navigationController?.isNavigationBarHidden = true
navigationController?.interactivePopGestureRecognizer?.delegate = nil

tabBarController?.tabBar.isHidden = true
NotificationCenter.default.post(name: .disappearFloatingButton, object: nil)
Expand Down Expand Up @@ -252,6 +253,14 @@ extension HabitRoomVC: UIImagePickerControllerDelegate, UINavigationControllerDe
nextVC.roomId = self.roomID
nextVC.roomName = self.roomName
nextVC.uploadImageView.image = self.imageContainer.resize(newWidth: UIScreen.main.bounds.width*nextVC.resizeRatio)
if let fromStart = habitRoomDetail?.fromStart {
if fromStart {
nextVC.vcType = .photoTimer
} else {
nextVC.vcType = .photoOnly
}
}
nextVC.uploadImageView.image = self.imageContainer
nextVC.modalPresentationStyle = .fullScreen

self.present(nextVC, animated: true, completion: nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ class FeedVC: UIViewController {
super.viewWillAppear(animated)

NotificationCenter.default.post(name: .disappearFloatingButton, object: nil)

tabBarController?.tabBar.isHidden = false
// FIXME: - getFeedListFetchWithAPI를 여기서 호출하는거로 변경
// collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .bottom, animated: false)
// 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

0 comments on commit c425414

Please sign in to comment.