Skip to content

Commit

Permalink
[Release] v2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed Jun 11, 2024
2 parents 8ad7fe1 + e81d6b7 commit b9383ec
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 8 deletions.
10 changes: 7 additions & 3 deletions YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
C31315AD2A7B78EE00FB8B43 /* FriendSearchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31315AC2A7B78EE00FB8B43 /* FriendSearchTableViewCell.swift */; };
C31315B02A7B806D00FB8B43 /* UIViewController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31315AF2A7B806D00FB8B43 /* UIViewController+.swift */; };
C31315B22A7CBA6F00FB8B43 /* MyYelloButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31315B12A7CBA6F00FB8B43 /* MyYelloButton.swift */; };
C316C99F2C13156600982F21 /* WithdrawalNoFriendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C316C99E2C13156600982F21 /* WithdrawalNoFriendView.swift */; };
C32322F52A619E92006DA50B /* PaymentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32322F42A619E92006DA50B /* PaymentView.swift */; };
C32322F92A61ABF2006DA50B /* PaymentCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32322F82A61ABF2006DA50B /* PaymentCollectionViewCell.swift */; };
C3291A082A920D84007F2CF5 /* AppStoreCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3291A072A920D84007F2CF5 /* AppStoreCheck.swift */; };
Expand Down Expand Up @@ -604,6 +605,7 @@
C31315AC2A7B78EE00FB8B43 /* FriendSearchTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendSearchTableViewCell.swift; sourceTree = "<group>"; };
C31315AF2A7B806D00FB8B43 /* UIViewController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+.swift"; sourceTree = "<group>"; };
C31315B12A7CBA6F00FB8B43 /* MyYelloButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyYelloButton.swift; sourceTree = "<group>"; };
C316C99E2C13156600982F21 /* WithdrawalNoFriendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WithdrawalNoFriendView.swift; sourceTree = "<group>"; };
C32322F42A619E92006DA50B /* PaymentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentView.swift; sourceTree = "<group>"; };
C32322F82A61ABF2006DA50B /* PaymentCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentCollectionViewCell.swift; sourceTree = "<group>"; };
C3291A072A920D84007F2CF5 /* AppStoreCheck.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStoreCheck.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2389,6 +2391,7 @@
C3FF24702A5D47DD00A97D40 /* WithdrawalCheckView.swift */,
C303C8232B6005980077C423 /* WithdrawalReasonView.swift */,
C3FF24742A5D6E9500A97D40 /* WithdrawalAlertView.swift */,
C316C99E2C13156600982F21 /* WithdrawalNoFriendView.swift */,
C3C5D8222B628AC500C8D27C /* ReasonHeaderView.swift */,
);
path = View;
Expand Down Expand Up @@ -2833,6 +2836,7 @@
C3D2663D2A5C73360041C7C7 /* MyProfileView.swift in Sources */,
C3081E4B2A82B06B0088CA44 /* MyFriendSkeletonTableViewCell.swift in Sources */,
36B2349A2A61A20C007933E4 /* KakaoLoginViewController.swift in Sources */,
C316C99F2C13156600982F21 /* WithdrawalNoFriendView.swift in Sources */,
C37DFC462A8501E300D3B685 /* PaymentPlusViewController.swift in Sources */,
36E427722A5BCE860050B34E /* YelloSelectButton.swift in Sources */,
2A3705D42A62E33E001AAC93 /* RecommendingTarget.swift in Sources */,
Expand Down Expand Up @@ -3024,7 +3028,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.0;
MARKETING_VERSION = 2.2.1;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS.dev;
PRODUCT_NAME = "$(Yello_Bundle_Name)";
Expand Down Expand Up @@ -3188,7 +3192,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.0;
MARKETING_VERSION = 2.2.1;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -3230,7 +3234,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.0;
MARKETING_VERSION = 2.2.1;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
1 change: 1 addition & 0 deletions YELLO-iOS/YELLO-iOS/Global/Literals/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ enum ImageLiterals {
static var imgWithdrawalThird: UIImage { .load(named: "imgWithdrawalThird")}
static var imgWarning: UIImage { .load(named: "imgWarning")}
static var imgWithdrawalPoint: UIImage { .load(named: "imgWithdrawalPoint")}
static var imgWithdrawalNoFriend: UIImage { .load(named: "imgWithdrawalNoFriend")}
}

enum SubscriptionExtension {
Expand Down
8 changes: 7 additions & 1 deletion YELLO-iOS/YELLO-iOS/Global/Literals/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,15 @@ enum StringLiterals {
static let yes = "네, 탈퇴합니다"
}

enum WithdrawalNoFriend {
static let title = "친구가 없다면\n친구를 초대할 수도 있어요."
static let nextLabel = "다음에 할게요"
static let wowLabel = "오, 그런 방법이!"
}

enum WithdrawalReason {
static let title = "탈퇴 사유를 적어주세요."
static let nobody = "앱에 아는 사람들이 없어서"
static let nobody = "앱에 아는 친구들이 없어서"
static let expensive = "구독권과 열람권의 가격이 비싸서"
static let error = "오류가 많아서"
static let notFunny = "재밌는 콘텐츠 또는 질문이 없어서"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "noFriend.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
//
// WithdrawalNoFriendView.swift
// YELLO-iOS
//
// Created by 정채은 on 6/7/24.
//

import UIKit

import SnapKit
import Then

final class WithdrawalNoFriendView: BaseView {
// MARK: - Variables
// MARK: Property
let contentsView = UIView()
private let titleLabel = UILabel()
private let noFriendImageView = UIImageView()
let nextButton = UIButton()
let wowButton = UIButton()

var nextButtonAction: (() -> Void) = {}
var wowButtonAction: (() -> Void) = {}

override func setStyle() {
// MARK: - Function
// MARK: Layout Helpers
self.backgroundColor = .black.withAlphaComponent(0.5)

let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(closeView))
self.addGestureRecognizer(tapGestureRecognizer)

contentsView.do {
$0.makeCornerRound(radius: 12.adjustedHeight)
$0.backgroundColor = .grayscales900
}

titleLabel.do {
$0.setTextWithLineHeight(text: StringLiterals.Profile.WithdrawalNoFriend.title, lineHeight: 24.adjustedHeight)
$0.font = .uiSubtitle01
$0.textAlignment = .center
$0.textColor = .white
}

noFriendImageView.do {
$0.image = ImageLiterals.Withdrawal.imgWithdrawalNoFriend
}

nextButton.do {
$0.setTitle(StringLiterals.Profile.WithdrawalNoFriend.nextLabel, for: .normal)
$0.setTitleColor(.grayscales600, for: .normal)
$0.titleLabel?.font = .uiButton
$0.addTarget(self, action: #selector(nextButtonTapped), for: .touchUpInside)
}

wowButton.do {
$0.setTitle(StringLiterals.Profile.WithdrawalNoFriend.wowLabel, for: .normal)
$0.setTitleColor(.yelloMain500, for: .normal)
$0.titleLabel?.font = .uiButton
$0.addTarget(self, action: #selector(wowButtonTapped), for: .touchUpInside)
}
}

override func setLayout() {
self.addSubview(contentsView)

contentsView.addSubviews(titleLabel,
noFriendImageView,
nextButton,
wowButton)

contentsView.snp.makeConstraints {
$0.center.equalToSuperview()
$0.width.equalTo(280.adjustedWidth)
$0.height.equalTo(317.adjustedHeight)
}

titleLabel.snp.makeConstraints {
$0.top.equalToSuperview().offset(44.adjustedHeight)
$0.centerX.equalToSuperview()
}

noFriendImageView.snp.makeConstraints {
$0.top.equalTo(titleLabel.snp.bottom).offset(16.adjustedHeight)
$0.centerX.equalToSuperview()
$0.size.equalTo(100.adjusted)
}

nextButton.snp.makeConstraints {
$0.top.equalTo(noFriendImageView.snp.bottom).offset(49.adjustedHeight)
$0.leading.equalToSuperview().inset(38.adjustedWidth)
$0.width.equalTo(80.adjustedWidth)
$0.height.equalTo(40.adjustedHeight)
$0.bottom.equalToSuperview().inset(20)
}

wowButton.snp.makeConstraints {
$0.top.bottom.equalTo(nextButton)
$0.trailing.equalToSuperview().inset(38.adjustedWidth)
$0.width.equalTo(81.adjustedWidth)
$0.height.equalTo(40.adjustedHeight)
}
}
}

extension WithdrawalNoFriendView {
@objc private func closeView() {
self.isHidden = true
self.removeFromSuperview()
}

@objc private func nextButtonTapped() {
closeView()
nextButtonAction()
}

@objc private func wowButtonTapped() {
closeView()
wowButtonAction()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ final class WithdrawalReasonView: BaseView {
self.setCompleteButton(isEnabled: isCompleteEnabled)
}
}
var isNoFriendSelected = false
var etcReason: String = ""
var tap = UITapGestureRecognizer()
var withdrawalReason: String = ""
Expand Down Expand Up @@ -174,6 +175,7 @@ extension WithdrawalReasonView: UICollectionViewDataSource {
withdrawalReason = etcReason
} else {
withdrawalReason = reasonList[indexPath.row]
isNoFriendSelected = indexPath.row == 0 ? true : false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ final class WithdrawalReasonViewController: BaseViewController {
}

private func setAddTarget() {
withdrawalReasonView.completeButton.addTarget(self, action: #selector(showAlert), for: .touchUpInside)
withdrawalReasonView.completeButton.addTarget(self, action: #selector(completeButtonTapped), for: .touchUpInside)
}
}

extension WithdrawalReasonViewController {
// MARK: Objc Function
@objc func showAlert() {
Amplitude.instance().logEvent("click_profile_withdrawal", withEventProperties: ["withdrawal_button":"withdrawal3"])

let withdrawalAlertView = WithdrawalAlertView()
withdrawalAlertView.withdrawalReason = withdrawalReasonView.withdrawalReason
print(withdrawalAlertView.withdrawalReason)
Expand All @@ -52,6 +50,27 @@ extension WithdrawalReasonViewController {
$0.edges.equalToSuperview()
}
}

@objc func completeButtonTapped() {
Amplitude.instance().logEvent("click_profile_withdrawal",
withEventProperties: ["withdrawal_button":"withdrawal3"])
if withdrawalReasonView.isNoFriendSelected {
let withdrawalNoFriendView = WithdrawalNoFriendView()
self.view.addSubview(withdrawalNoFriendView)
withdrawalNoFriendView.snp.makeConstraints {
$0.edges.equalToSuperview()
}
withdrawalNoFriendView.nextButtonAction = {
self.showAlert()
}
withdrawalNoFriendView.wowButtonAction = {
Amplitude.instance().logEvent("click_withdrawal_recommend")
NotificationCenter.default.post(name: Notification.Name("moveToRecommend"), object: nil)
}
} else {
showAlert()
}
}
}

// MARK: HandleBackButtonDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class KakaoFriendView: UIView {
var recommendingKakaoFriendTableViewDummy: [FriendModel] = []

// MARK: Component
private let inviteBannerView = InviteBannerView()
let inviteBannerView = InviteBannerView()
lazy var kakaoFriendTableView = UITableView()
let refreshControl = UIRefreshControl()
let emptyView = EmptyFriendView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ final class YELLOTabBarController: UITabBarController {
NotificationCenter.default.addObserver(self, selector: #selector(showMessage(_:)), name: NSNotification.Name("showMessage"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(showPage(_:)), name: NSNotification.Name("showPage"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goToShop(_:)), name: NSNotification.Name("goToShop"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(moveToRecommend(_:)), name: NSNotification.Name("moveToRecommend"), object: nil)
}

override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -384,6 +385,15 @@ extension YELLOTabBarController {
self.navigationController?.pushViewController(paymentPlusViewController, animated: true)
}

@objc
func moveToRecommend(_ notification: Notification) {
if let navigationController = self.viewControllers?[4] as? UINavigationController {
navigationController.popToRootViewController(animated: false)
}
self.selectedIndex = 0
self.recommendingViewController.kakaoFriendViewController.kakaoFriendView.inviteBannerView.showAlert()
}

@objc
func imageViewTapped() {
let notiView: SFSafariViewController
Expand Down

0 comments on commit b9383ec

Please sign in to comment.