Skip to content

Commit

Permalink
Merge pull request #137 from mash-up-kr/qa/1.1.0/main
Browse files Browse the repository at this point in the history
1.1.0 release
  • Loading branch information
gunoooo authored Feb 2, 2024
2 parents 75086c7 + 5042503 commit f9d1fa2
Show file tree
Hide file tree
Showing 83 changed files with 1,912 additions and 582 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "popup_ground.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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.
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
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "icon_send_card.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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.
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
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "img_send_card_tooltip.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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.
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
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "icon_bubble_tail_exit.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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.
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
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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.
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 @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.094",
"green" : "0.188",
"red" : "0.267"
"blue" : "0x17",
"green" : "0x2F",
"red" : "0x44"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ public enum Assets: String {
case icon_bubble_not_mate
case icon_mypage_brown
case icon_info
case popup_ground
case home_ground
case home_background
case icon_airplane
case icon_push_bee
case icon_send_card
case icon_certificated
case icon_failed
case icon_flower_seed
Expand Down Expand Up @@ -139,6 +141,8 @@ public enum Assets: String {
case flowerPopup_background
case icon_challenge_progress
case icon_title_arrow
case update_icon
case img_send_card_tooltip

public var image: UIImage {
return .init(named: self.rawValue, in: Bundle.module, with: nil)!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import UIKit

public final class SelfSizingScrollView: UIScrollView {
private var maxHeight: CGFloat = UIScreen.main.bounds.height * 0.67
private var maxHeight: CGFloat = UIScreen.main.bounds.height

public override var intrinsicContentSize: CGSize {
CGSize(width: contentSize.width,
Expand All @@ -20,9 +20,9 @@ public final class SelfSizingScrollView: UIScrollView {
invalidateIntrinsicContentSize()
}

public convenience init(maxHeight: CGFloat) {
public convenience init(maxHeightRatio: CGFloat = 0.67) {
self.init()
self.maxHeight = maxHeight
self.maxHeight *= maxHeightRatio
}

public override init(frame: CGRect) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@ public final class TTNavigationBar: UIView {
/// TTNavigationBar(title: "마이페이지", rightButtonImage: .asset(.icon_info))
/// ```
public convenience init(title: String?,
rightButtonImage: UIImage?) {
rightButtonImage: UIImage?,
rightButtonText: String? = nil) {
self.init()
if let _title = title, _title == "TwoToo" {
self.logoImageView.isHidden = false
} else {
self.titleLabel.text = title
}
self.rightButton.setImage(rightButtonImage, for: .normal)
if let text = rightButtonText {
self.rightButton.setTitle(text, for: .normal)
self.rightButton.titleLabel?.font = .h4
self.rightButton.setTitleColor(.primary, for: .normal)
}
}

required init?(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,28 @@
//

import UIKit
import DesignSystem

/// 말풍선 뷰
///
/// Parameter
/// - title : 말풍선 텍스트
/// - tailPosition : 말풍선 꼬리 위치 (좌 / 우)
final class SpeechBubbleView: UIView {
final public class SpeechBubbleView: UIView {

private var _backgroundColor: UIColor = .white
private var tailCoordinate: CGFloat = 0.5
private var tailPosition: TailPosition = .my

enum TailPosition{
public enum TailPosition{
/// 홈 - 파트너 말풍선
case partner
/// 홈 - 내 말풍선
case my
/// 챌린지 대기중 - 나가기 말풍선
case exit
}

let titleLabel: UILabel = {
public let titleLabel: UILabel = {
let v = UILabel()
v.font = .body1
v.textAlignment = .center
Expand All @@ -38,8 +42,9 @@ final class SpeechBubbleView: UIView {
return v
}()

init(tailPosition: TailPosition) {
public init(tailPosition: TailPosition) {
super.init(frame: .zero)
self.tailPosition = tailPosition
switch tailPosition {
case .partner:
self._backgroundColor = UIColor.mainLightPink
Expand All @@ -49,6 +54,10 @@ final class SpeechBubbleView: UIView {
self._backgroundColor = UIColor.second01
self.tailCoordinate = 1.5
self.tailImageView.image = UIImage.asset(.icon_bubble_tail_my)
case .exit:
self._backgroundColor = UIColor.second01
// self.tailImageView.image = UIImage(resource: .iconBubbleTailExit)
self.tailCoordinate = 1.7
}
self.layout()
self.attribute()
Expand All @@ -65,18 +74,27 @@ final class SpeechBubbleView: UIView {
self.titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview().inset(10)
}
self.tailImageView.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(10)
make.centerX.equalToSuperview().multipliedBy(self.tailCoordinate)
switch tailPosition {
case .partner, .my:
self.tailImageView.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(10)
make.centerX.equalToSuperview().multipliedBy(self.tailCoordinate)
}
case .exit:
self.tailImageView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(-10)
make.centerX.equalToSuperview().multipliedBy(self.tailCoordinate)
}
}

}

func attribute() {
self.layer.cornerRadius = 8
self.backgroundColor = _backgroundColor
}

func configure(title: String) {
public func configure(title: String) {
if title.count > 10 {
let index = title.index(title.startIndex, offsetBy: 10)
let firstPart = title[..<index]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,22 @@

import UIKit

final class TTProgressBar: UIView {
public protocol TTProgressViewModelProtocol {
/// 상대방 이름 텍스트
var partnerNameText: String { get set }
/// 내 이름 텍스트
var myNameText: String { get set }
/// 상대방 퍼센테이지 텍스트
var partnerPercentageText: String { get set }
/// 내 퍼센테이지 텍스트
var myPercentageText: String { get set }
/// 상대방 퍼센테이지 넘버
var partnerPercentageNumber: Double { get set }
/// 내 퍼센테이지 넘버
var myPercentageNumber: Double { get set }
}

public final class TTProgressBar: UIView {

// MARK: - My UI
private lazy var partnerNicknameLabel: UILabel = {
Expand Down Expand Up @@ -137,7 +152,7 @@ final class TTProgressBar: UIView {
self.layer.cornerRadius = 15
}

func configureInProgress(viewModel: Home.ViewModel.ChallengeInProgressViewModel.ProgressViewModel) {
public func configure(viewModel: TTProgressViewModelProtocol) {
self.myNicknameLabel.text = viewModel.myNameText
self.myPercentLabel.text = viewModel.myPercentageText
self.partnerNicknameLabel.text = viewModel.partnerNameText
Expand All @@ -146,16 +161,6 @@ final class TTProgressBar: UIView {
partner: viewModel.partnerPercentageNumber)
}

func configureCompleted(viewModel: Home.ViewModel.ChallengeCompletedViewModel.ProgressViewModel) {
self.myNicknameLabel.text = viewModel.myNameText
self.myPercentLabel.text = viewModel.myPercentageText
self.partnerNicknameLabel.text = viewModel.partnerNameText
self.partnerPercentLabel.text = viewModel.partnerPercentageText
self.configurePercent(my: viewModel.myPercentageNumber,
partner: viewModel.partnerPercentageNumber)
}


private func configurePercent(my: Double, partner: Double) {
if my == 0 {
self.myPercentView.snp.remakeConstraints { make in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,31 @@ import UIKit

extension UIFont {

/// fontSize : 28
public static var h1: UIFont {
return .omyupretty(size: ._28)
}

/// fontSize : 24
public static var h2: UIFont {
return .omyupretty(size: ._24)
}

/// fontSize : 20
public static var h3: UIFont {
return .omyupretty(size: ._20)
}

/// fontSize : 18
public static var h4: UIFont {
return .omyupretty(size: ._18)
}

/// fontSize : 16
public static var body1: UIFont {
return .omyupretty(size: ._16)
}

/// fontSize : 15
public static var body2: UIFont {
return .omyupretty(size: ._15)
}

/// fontSize : 12
public static var body3: UIFont {
return .omyupretty(size: ._12)
}
Expand Down
6 changes: 5 additions & 1 deletion Core/Local/Sources/Local/LocalDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ public protocol LocalDataSourceProtocol {
func remove(key: String)
}

public final class LocalDataSource: LocalDataSourceProtocol {
public protocol ResetLocalDataSourceProtocol {
func removeAll()
}

public final class LocalDataSource: LocalDataSourceProtocol, ResetLocalDataSourceProtocol {

public init() {}

Expand Down
Loading

0 comments on commit f9d1fa2

Please sign in to comment.