Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#6 #7

Merged
merged 9 commits into from
Oct 22, 2021
Merged

Feat/#6 #7

merged 9 commits into from
Oct 22, 2021

Conversation

heerucan
Copy link
Member

๐Ÿ“Œ ๊ด€๋ จ ์ด์Šˆ

close #6

๐Ÿ“Œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ ๋ฐ ์ด์œ 

2์ฐจ ์„ธ๋ฏธ๋‚˜ ๊ณผ์ œ ์™„๋ฃŒ์ž…๋‹ˆ๋‹ค~!


Simulator Screen Shot - iPhone 11 Pro - 2021-10-19 at 03 12 07 Simulator Screen Shot - iPhone 11 Pro - 2021-10-19 at 03 12 19 Simulator Screen Shot - iPhone 11 Pro - 2021-10-19 at 03 12 51 Simulator Screen Shot - iPhone 11 Pro - 2021-10-19 at 03 13 01

๐Ÿ“Œ PR Point

  • CustomButton์„ ์ปดํฌ๋„ŒํŠธ๋กœ ๋”ฐ๋กœ ๋นผ์„œ ๋งŒ๋“ค์–ด ์ค€ ๊ฑธ ๋งŽ์ด ๋ด์„œ ํ•œ ๋ฒˆ ๋”ฐ๋ผ์„œ ๊ตฌํ˜„ํ•˜๋ ค๊ณ  ํ•ด๋ดค๋Š”๋ฐ ์ƒ๊ฐ๋ณด๋‹ค ์œ ์šฉํ•˜๊ฒŒ ์“ด ๊ฒƒ ๊ฐ™์ง€ ์•Š์•„์„œ ๊ณ ๋ถ€๋ถ„ ์ค‘์ ์ ์œผ๋กœ ๋ด์ฃผ์‹œ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค!
    CustomButton ํด๋ž˜์Šค๋Š” ๋ฐฐ๊ฒฝ์ƒ‰์ด ์žˆ๋Š” ๋ฒ„ํŠผ์— ํ•ด๋‹นํ•˜๋Š” ๋†ˆ์ธ๋ฐ,, ๊ทธ๋ƒฅ ๊ธ€์ž๋งŒ ์žˆ๋Š” ๋ฒ„ํŠผํ•œํ…Œ ์ ์šฉ์„ ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋Š”...
    ๊ทธ๋ ‡๋‹ค๊ณ  ๊ฑ ๊ณ ๋†ˆ ํด๋ž˜์Šค์— ํ•ด๋‹นํ•˜๋Š” ์ธ์Šคํ„ด์Šค๋ฅผ ๋งน๊ทธ๋Ÿฌ์ฃผ์žํ•˜๋‹ˆ... ์ฝ”๋“œ ๊ธธ์ด๋Š” ๊ฑฐ๊ธฐ์„œ ๊ฑฐ๊ธฐ์ธ์ง€๋ผ...

  • ์ €๋ฒˆ์— private ๊ด€๋ จ ์งˆ๋ฌธ์— ๋Œ€ํ•œ ๋‹ต๋ณ€์„ ํ† ๋Œ€๋กœ ์ ‘๊ทผ์ œํ•œ์ž?๋ฅผ ์ž˜ ์จ์ฃผ๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ์–ด๋–ค์ง€...

  • ์ง€๊ธˆ ํ˜„์žฌ ์ด ์ฝ”๋“œ์—์„œ ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ๋” ์ž˜ํ–ˆ๋‹ค๊ณ  ์˜†๋™๋„ค ์•ˆ๋“ค์˜ค์ด๋“œ ์†๋ฐฐ๋“คํ•œํ…Œ๊นŒ์ง€ ์†Œ๋ฌธ์ด ๋‚  ์ˆ˜ ์žˆ์„๊นŒ??? ๋น„๋ฒ• ์ „์ˆ˜ ๋ถ€ํƒ ๋ฐ”๋žŒ..^^๐Ÿคž ๐ŸŒฌ

  • ์•„! ๋‚˜๋„ ์ฝ”๋“œ ๋” ์ž˜์งœ๊ณ  ์‹ถ๋‹ค!!!!!!!!


๐Ÿ“Œ ์ฐธ๊ณ  ์‚ฌํ•ญ

๐Ÿ˜Š๐Ÿ˜Š์งˆ๋ฌธ ๋ฐ ์ง€์  ๋Œ€ํ™˜์˜๐Ÿ˜Š๐Ÿ˜Š

  • ๋งˆ๋‹ค๊ฐ€์Šค์นด/์‡ผ๋ฏธ๋”์•„์š” ์Šคํ„ฐ๋”” ๊ณผ์ œ๋กœ ํŒŒ๋ฒ ๋กœ๊ทธ์ธ ์ฝ”๋“œ๊ฐ€ ์žˆ๋Š”๋ฐ ํ๋ฆฐ๋ˆˆํ•˜๊ณ  ๋ด์ฃผ์„ธ์š” / ์งˆ๋ฌธํ•ด์ฃผ์…”๋„ ์ข‹์Œ

Copy link
Member

@Taehyeon-Kim Taehyeon-Kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PERFECT
์ €๋Š” ์š”์ •๋„ ๋ฆฌ๋ทฐ ๋‚จ๊ฒจ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
๋‹ค๋ฅธ ๋ฉ‹์ง„ ๋ถ„๋“ค์ด ๋˜ ์ฝ”๋ฉ˜ํŠธ๋ฅผ ๋‚จ๊ธธํ…Œ๋‹ˆ๊นŒ์š”..
์—ญ์‹œ๋‚˜ ์ž˜ํ•˜์‹ญ๋‹ˆ๋‹ค โœจ

Comment on lines 11 to 21
func addLeftPadding() {
let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 15, height: self.frame.size.height))
let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 14, height: self.frame.size.height))
self.leftView = paddingView
self.leftViewMode = .always
}

func addRightPadding() {
let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 15, height: self.frame.size.height))
let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 14, height: self.frame.size.height))
self.rightView = paddingView
self.rightViewMode = .always
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ง€๊ธˆ์€ width์— ๊ณ ์ •์ ์ธ ๊ฐ’์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ, ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ์ˆ˜์น˜๋ฅผ ๋„˜๊ฒจ์ค˜์„œ ์‚ฌ์šฉํ•˜๋ฉด ์กฐ๊ธˆ ๋” ์‚ฌ์šฉ์„ฑ์žˆ์–ด์ง€์ง€ ์•Š์„๊นŒ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค :-)

func addLeftPadding(_ padding: CGFloat) { ... }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์™€์˜ค ๊ทธ๊ฒƒ๋„ ์ ์šฉ!!ํ• ๊ฒŒ์š”๐Ÿ˜Š

import UIKit

extension UILabel {
func addSpacing(kernValue: Double, paragraphValue: CGFloat) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ์˜๋ฏธ๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ‘€
์•ˆ๊ทธ๋ž˜๋„ ๋ผ๋ฒจ์•ˆ์˜ ํ–‰ ๊ฐ„๊ฒฉ์„ ์–ด๋–ป๊ฒŒ ์กฐ์ •ํ• ์ง€ ๊ณ ๋ฏผํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ, ์š”๊ฒƒ์„ ์‚ฌ์šฉํ•˜๋ฉด ๋˜๊ฒ ๊ตฐ์š”!?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Taehyeon-Kim ์ž๊ฐ„, ํ–‰๊ฐ„ ๊ด€๋ จ ์ต์Šคํ…์…˜์ธ๋ฐ ์‚ฌ์‹ค.. ์ €๋„ ๊ณ ๊ฒƒ๊ณผ ๊ด€๋ จํ•ด์„œ ํ‚น์ด ๋ฐ›๋˜ ์ฐฐ๋‚˜์—.. ์บ์น˜๋ฏธ ์ต์Šคํ…์…˜์„.. ์ ์šฉํ•ด๋ฒ„๋ ธ์Šต๋‹ˆ๋‹ค...;;๐Ÿฅฒ

Copy link
Member

@i-colours-u i-colours-u Oct 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kernValue๋‚˜ ParagraphValue ๊ฐ™์€๊ฑด ์•„๋งˆ ์•ฑ๋‚ด์—์„œ ์Šคํƒ€์ผ์ด 2,3๊ฐœ๊ฑฐ๋‚˜ 1๊ฐœ๋กœ ํ†ต์ผ๋˜์–ด์žˆ์„ํ…๋ฐ - ํŒŒ๋ผ๋ฏธํ„ฐ ์ž์ฒด์— ๊ธฐ๋ณธ๊ฐ’์„ ์ค˜๋„ ๊ดœ์ฐฎ์„๊ฑฐ๊ฐ™์•„์š”!!

func addSpacing(kernValue : Double = -0.05, paragraphValue : CGFloat = (๊ธฐ๋ณธ๊ฐ’) { โ€ฆ}
sampleLabel.addSpacing()

์™œ๋ƒ๋ฉด ์šฐ๋ฆฌ๊ฐ€ Letter Spacing -0.5%, Line Spacing 1.1.. ๋ช‡์ด๋‹ค ๋ช‡์ด๋‹ค ์ผ์ผ์ด ํ™•์ธํ•˜๊ณ  ์™ธ์šฐ๊ธฐ๋Š” ๊ท€์ฐฎ์œผ๋‹ˆ๊นŒ์š”... (ํœด๋จผ์—๋Ÿฌ๋กœ ํ‹€๋ฆด์ˆ˜๋„ ์žˆ๊ณ !)

๋‚˜์ค‘์— ์‹ค์ œ ํ”„๋กœ์ ํŠธ ๊ฐ€์„œ๋Š” ๋ฌธ๋งฅ๋งˆ๋‹ค Headline / Subtitle/ Body/ ๋“ฑ๋“ฑ ํฌ๊ฒŒ ๋ช‡๊ฐ€์ง€๋กœ๋งŒ ๋‚˜๋‰ ํ…๋ฐ ๊ฑฐ๊ธฐ ๊ฐ’๋“ค์„ ๋ฏธ๋ฆฌ ์ €์žฅํ•ด์„œ ๋น ๋ฅด๊ฒŒ ๋ผ๋ฒจ ์„ธํŒ…ํ•˜๋Š”๊ฒƒ๋„ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@i-colours-u ์˜ค ๊ทธ๋Ÿฌ๋„ค์š” ! ๋ฐ”๋กœ ์ ์šฉํ• ๊ฒŒ์š”!!! ๐Ÿ˜Š๐Ÿ˜Š


import UIKit

class CustomButton: UIButton {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomButton ํด๋ž˜์Šค๋Š” ๋ฐฐ๊ฒฝ์ƒ‰์ด ์žˆ๋Š” ๋ฒ„ํŠผ์— ํ•ด๋‹นํ•˜๋Š” ๋†ˆ์ธ๋ฐ,, ๊ทธ๋ƒฅ ๊ธ€์ž๋งŒ ์žˆ๋Š” ๋ฒ„ํŠผํ•œํ…Œ ์ ์šฉ์„ ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋Š”...
๊ทธ๋ ‡๋‹ค๊ณ  ๊ฑ ๊ณ ๋†ˆ ํด๋ž˜์Šค์— ํ•ด๋‹นํ•˜๋Š” ์ธ์Šคํ„ด์Šค๋ฅผ ๋งน๊ทธ๋Ÿฌ์ฃผ์žํ•˜๋‹ˆ... ์ฝ”๋“œ ๊ธธ์ด๋Š” ๊ฑฐ๊ธฐ์„œ ๊ฑฐ๊ธฐ์ธ์ง€๋ผ...

์šฐ์„  ์ด๊ฒƒ์ด ์ •๋‹ต์€ ์•„๋‹ˆ๋‹ˆ ์ฐธ๊ณ ๋งŒ ํ•ด์ฃผ์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ์ข€ ๋” ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋†’์ด๊ณ  ์‹ถ๋‹ค๋ฉด, ์˜ˆ๋ฅผ ๋“ค์–ด ๋ฐฐ๊ฒฝ์ƒ‰์ด ์žˆ๊ณ  ์—†๊ณ ๋ฅผ ์กฐ์ •ํ•˜๊ณ  ๊ทธ ๋ฐ–์˜ ์„ค์ •์„ ์™ธ๋ถ€์—์„œ ์กฐ์ •ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์ด ์ปค์Šคํ…€ ํด๋ž˜์Šค(CustomButton)์— ํ”„๋กœํผํ‹ฐ๋ฅผ ๋‘˜ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

var backgroundColor: UIColor? = .clear {
    didSet {
        updateUI()
    }
}

private func updateUI() {
    self.backgroundColor = backgroundColor
}

์ด๋Ÿฐ ๋Š๋‚Œ์œผ๋กœ didSet ํ”„๋กœํผํ‹ฐ์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๋ฉด backgroundColor์˜ ๊ฐ’์„ ๋ณ€๊ฒฝํ–ˆ์„ ๋•Œ ์ƒ‰์ƒ์ด ์—…๋ฐ์ดํŠธ ๋˜๊ฒ ์ฃ ?

์ถ”๊ฐ€์ ์œผ๋กœ ์ด๋‹ˆ์…œ๋ผ์ด์ €๋ฅผ ์ด์šฉํ•ด์„œ ์™ธ๋ถ€์—์„œ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ์•„์˜ˆ background ์ƒ‰์ƒ์„ ์ง€์ •ํ•ด์ค„ ์ˆ˜๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

convenience init(backgroundColor: UIColor) {
    self.backgroundColor = backgroundColor
}

๋‹ค์Œ์˜ ๊ฒƒ๋“ค์„ ์ด์šฉํ•ด์„œ ์กฐ๊ธˆ ๋” ์ž์œ ๋„ ๋†’์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š” :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์„ ๋ฐฐ๋‹˜ ์•ž์œผ๋กœ ๋ฐ›๋“ค์–ด ๋ชจ์‹œ๊ฒ ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‹ˆ ์ž์ฃผ ์™€์„œ ์ฝ”๋ฆฌ๋ฅผ ๋‹ฌ์•„์ฃผ์‹œ๊ธธ.

Comment on lines +30 to 35
private let completeButton = CustomButton().then {
$0.setTitle("ํ™•์ธ", for: .normal)
$0.setTitleColor(.white, for: .normal)
$0.titleLabel?.font = .boldSystemFont(ofSize: 18)
$0.backgroundColor = .mainBlue
$0.layer.cornerRadius = 10
$0.isUserInteractionEnabled = true
$0.addTarget(self, action: #selector(touchupCompleteButton(_:)), for: .touchUpInside)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์•„ ์š”๋Ÿฐ ๋Š๋‚Œ ๋•Œ๋ฌธ์— ๊ทธ๋Ÿฐ๊ฑฐ๊ตฐ์š”..
ํ•œ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ๋” ์ƒ๊ฐ๋‚ฌ๋Š”๋ฐ, ๋ฒ„ํŠผ์„ ๋ฐฐ๊ฒฝ์ƒ‰ ์žˆ๋Š” ๋ฒ„ํŠผ๊ณผ ๋ฐฐ๊ฒฝ์ƒ‰ ์žˆ๋Š” ๋ฒ„ํŠผ์œผ๋กœ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ์น˜๋ฉด
์•„๋ž˜์™€ ๊ฐ™์ด ์—ด๊ฑฐํ˜•์„ ๋งŒ๋“ค์–ด์ฃผ๊ณ  ๋ถ„๊ธฐ ์ฒ˜๋ฆฌํ•ด์„œ ์„ค์ •์„ ๋‹ค๋ฅด๊ฒŒ setํ•ด์ค˜๋„ ๊ดœ์ฐฎ์•„ ๋ณด์ž…๋‹ˆ๋‹ค.

// CustomButton.swift
enum ButtonType {
  case Base
  case Google
}

...

private func setupUI(_ type: ButtonType) {
    if type == .Base {
       // write code
    } else if type == .Google {
       // write code
    }
}
// ์ด๋ ‡๊ฒŒ๋„ ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•˜์ง€ ์•Š์„๊นŒ ์‹ถ๋„ค์š”..?
private let completeButton = CustomButton().then {
    $0.setupUI(.Base)
}

Comment on lines +57 to +68
private func setNavigationController(title: String,
unselectedImage: UIImage,
selectedImage: UIImage,
rootViewController: UIViewController) -> UINavigationController {
let nav = UINavigationController(rootViewController: rootViewController)
nav.tabBarItem.title = title
nav.tabBarItem.image = unselectedImage
nav.tabBarItem.selectedImage = selectedImage
nav.navigationBar.isHidden = true
return nav
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์š”๋ ‡๊ฒŒ ํ•จ์ˆ˜๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ ์ข‹๋„ค์š” ๐Ÿ‘
๋ฐ˜๋ณต์ฝ”๋“œ ์ค„์ด๊ธฐ ํผํŽ™ํŠธโญ๏ธ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋„ ํ•œ ๋ฒˆ์— ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฒ• ์•Œ์•„๊ฐ€์š”! ์งฑ์งฑ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฝ”๋“œ ๊น”๋”ํ•˜๋„ค์š”๐Ÿ‘

import UIKit

extension UILabel {
func addSpacing(kernValue: Double, paragraphValue: CGFloat) {
Copy link
Member

@i-colours-u i-colours-u Oct 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kernValue๋‚˜ ParagraphValue ๊ฐ™์€๊ฑด ์•„๋งˆ ์•ฑ๋‚ด์—์„œ ์Šคํƒ€์ผ์ด 2,3๊ฐœ๊ฑฐ๋‚˜ 1๊ฐœ๋กœ ํ†ต์ผ๋˜์–ด์žˆ์„ํ…๋ฐ - ํŒŒ๋ผ๋ฏธํ„ฐ ์ž์ฒด์— ๊ธฐ๋ณธ๊ฐ’์„ ์ค˜๋„ ๊ดœ์ฐฎ์„๊ฑฐ๊ฐ™์•„์š”!!

func addSpacing(kernValue : Double = -0.05, paragraphValue : CGFloat = (๊ธฐ๋ณธ๊ฐ’) { โ€ฆ}
sampleLabel.addSpacing()

์™œ๋ƒ๋ฉด ์šฐ๋ฆฌ๊ฐ€ Letter Spacing -0.5%, Line Spacing 1.1.. ๋ช‡์ด๋‹ค ๋ช‡์ด๋‹ค ์ผ์ผ์ด ํ™•์ธํ•˜๊ณ  ์™ธ์šฐ๊ธฐ๋Š” ๊ท€์ฐฎ์œผ๋‹ˆ๊นŒ์š”... (ํœด๋จผ์—๋Ÿฌ๋กœ ํ‹€๋ฆด์ˆ˜๋„ ์žˆ๊ณ !)

๋‚˜์ค‘์— ์‹ค์ œ ํ”„๋กœ์ ํŠธ ๊ฐ€์„œ๋Š” ๋ฌธ๋งฅ๋งˆ๋‹ค Headline / Subtitle/ Body/ ๋“ฑ๋“ฑ ํฌ๊ฒŒ ๋ช‡๊ฐ€์ง€๋กœ๋งŒ ๋‚˜๋‰ ํ…๋ฐ ๊ฑฐ๊ธฐ ๊ฐ’๋“ค์„ ๋ฏธ๋ฆฌ ์ €์žฅํ•ด์„œ ๋น ๋ฅด๊ฒŒ ๋ผ๋ฒจ ์„ธํŒ…ํ•˜๋Š”๊ฒƒ๋„ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!

@@ -167,7 +159,7 @@ class SignUpVC: UIViewController {

FirebaseAuth.Auth.auth().createUser(withEmail: email, password: pw) { [self] (result, error) in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋„ ์š”๊ฑด ์ข…์ข… ๋นผ๋จน๋Š” ๋ถ€๋ถ„์ธ๋ฐ ใ…Žใ…Ž;;
strong reference cycle ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ ํด๋กœ์ €์—์„œ๋Š”
[self] ๋ง๊ณ  [weak self]๋กœ ๋ฐ”๊ฟ” ์“ฐ๋Š”๊ฑธ ์Šต๊ด€ํ™”ํ•˜๋Š”๊ฒŒ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!!
์•„๋‹ˆ๋ฉด ๋‚˜์ค‘์— SwiftLint๋กœ ๊ฐ•์ œ ์ฒ˜๋ฆฌํ•ด๋„ ์ข‹๊ตฌ์š”?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@i-colours-u ์งˆ๋ฌธ์ด ์žˆ๋Š”๋ฐ ๊ทธ๋Ÿฌ๋ฉด weak self๋ฅผ ์“ฐ๊ณ 
๋‚ด๋ถ€์—

guard let self = self else { return } ๋ฅผ ์จ์ค˜์•ผ ํ•˜๋‚˜์š”?
์™œ๋ƒํ•˜๋ฉด weak self๋ฅผ ์จ์ฃผ๋Š” ์ˆœ๊ฐ„ ์˜ต์…”๋„ ์ฒ˜๋ฆฌ๋ฅผ ํ•ด์ฃผ๋ผ๊ณ  ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๊ฐ€ ๋–ด๊ฑฐ๋“ ์š”.

Copy link
Member

@i-colours-u i-colours-u Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weak ์‚ฌ์šฉํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด guard let ์œผ๋กœ ์˜ต์…”๋„ ๋ฐ”์ธ๋”ฉ ์ฒ˜๋ฆฌํ•ด์„œ ์ง„ํ–‰ํ•˜๋Š” ํŽธ์ด ๊ถŒ์žฅ๋ ๊ฑฐ์—์š”!!

@@ -167,7 +159,7 @@ class SignUpVC: UIViewController {

FirebaseAuth.Auth.auth().createUser(withEmail: email, password: pw) { [self] (result, error) in
Copy link
Member

@i-colours-u i-colours-u Oct 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—ฌ๊ธฐ ์ฝ”๋“œ๋งŒ ์•„๋‹ˆ๋ผ ๋‚˜์ค‘์— ๋น„๋™๊ธฐ์ฒ˜๋ฆฌ,ํ†ต์‹ ์ž‘์—…ํ• ๋•Œ
(result,error) in ๊ณผ ๊ฐ™์€ ํ˜•ํƒœ๋กœ ๋งŽ์ด ์ž‘์„ฑํ•˜๊ฒŒ ๋ ํ…๋ฐ์—ฌ

  1. result error : true,false,
  2. result error : true, true
  3. result error : false, true
  4. result error : false , false

์š”๋ ‡๊ฒŒ ๋‚ด๋ ค์˜ค๋Š” result/error์— ๋Œ€ํ•ด ์ผ€์ด์Šค๊ฐ€ ์ด 4๊ฐœ๊ฐ€๋ฐœ์ƒ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค

์‚ฌ์‹ค ์šฐ๋ฆฌ๊ฐ€ ๋งค๋ฒˆ ๊ณ ๋ คํ•˜๋Š”๊ฑด ์„ฑ๊ณต์ด๋ƒ, ์‹คํŒจ๋ƒ๋ฅผ ๊ตฌ๋ถ„ํ•˜๊ธฐ ๋•Œ๋ฌธ์— 1,3๋ฒˆ ์ผ€์ด์Šค์ •๋„๋งŒ ๊ณ ๋ คํ•˜๊ฒ ์ง€๋งŒ -
2๋ฒˆ 4๋ฒˆ๊ณผ ๊ฐ™์ด ์• ๋งคํ•œ ์ƒํƒœ๊ฐ€ ๋˜๋Š” ๊ฒƒ(์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด์„œ ๋ฐ์ดํ„ฐ๊ฐ€ ๋„˜์–ด์˜ด, ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€๋„ ์•Š๊ณ , ๋ฐ์ดํ„ฐ๋„ ์—†๊ณ  )๋„ ์›๋ž˜๋Š” ๊ณ ๋ ค๋ฅผ ํ•ด์•ผํ•˜๋Š” ์ƒํ™ฉ์ด ์žˆ์„๊ฑฐ์—์š”

๊ทธ๋ž˜์„œ ์ผ์ผ์ด ๋‹ค ๋ถ„๊ธฐ์ฒ˜๋ฆฌ ํ•˜๊ธฐ๋ณด๋‹ค๋Š”

Swift5 ์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ œ๊ณตํ•˜๋Š”
Result<Value,Error>๋ฌธ๋ฒ•์„ ํ™œ์šฉํ•˜๋ฉด ๋” ๊น”๋”ํ•˜๊ฒŒ ์ž‘์„ฑ์ด ๊ฐ€๋Šฅํ• ๊ฒƒ ๊ฐ™์•„์š”!!

func auth(then handler: @escaping (Result<Data?,Error>) -> Void) {
    // ํ•„์š”ํ•œ ๋ถ€๋ถ„์„ handler ์— ๋‹ด์•„์„œ escaping์œผ๋กœ ๋„˜๊ฒจ์ฃผ๊ธฐ
  }

auth  { [weak self] result in
      result.success { data in
        // ์„ฑ๊ณตํ–ˆ์„ ๋•Œ ~~ ์ฒ˜๋ฆฌ
      }.catch { error in
        // ์—๋Ÿฌ ๋ฐœ์ƒํ–ˆ์„๋•Œ ~~ ์ฒ˜๋ฆฌ, ํ•„์š”์— ๋”ฐ๋ผ ์—๋Ÿฌ ๋ถ„๊ธฐ์ฒ˜๋ฆฌํ•˜๊ธฐ
      }
    }
extension Result {
  @discardableResult
  func success(_ successHandler: (Success) -> Void) -> Result<Success, Failure> {
    if case .success(let value) = self {
      successHandler(value)
    }
    return self
  }
  
  @discardableResult
  func `catch`(_ failureHandler: (Failure) -> Void) -> Result<Success, Failure> {
    if case .failure(let error) = self {
      failureHandler(error)
    }
    return self
  }
}

(์š”๊ฑฐ๋Š” ์œ„์— Result ๊ฒฐ๊ณผ๋ฅผ success, catch ํ˜•ํƒœ๋กœ ๊ฐ„๊ฒฐํ•˜๊ฒŒ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” Extension ์ž…๋‹ˆ๋‹ค!!)

์‚ฌ์‹ค ์ง€๊ธˆ๊ฐ™์ด ๊ฐ„๋‹จํ•œ ํ†ต์‹ ์ผ๋•Œ๋Š” ํฌ๊ฒŒ ์ƒ๊ด€์—†๊ฒ ์ง€๋งŒ, ์ดํ›„์— ๊ณ„์† ํ•ด๋‹น ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ• ๋•Œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด Result ๋ฌธ์„ ํ™œ์šฉํ•˜๋ฉด ์„ฑ๊ณต/์‹คํŒจ์— ๋Œ€ํ•ด์„œ๋งŒ ๊ณ ๋ คํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋” ์•ˆ์ „ํ•˜๊ฒŒ,์ง๊ด€์ ์œผ๋กœ ์ž‘์„ฑ์ด ๊ฐ€๋Šฅํ•  ๊ฒƒ ๊ฐ™์•„์š”!!!

@heerucan heerucan merged commit f9a1bab into main Oct 22, 2021
Copy link
Member

@hyesuuou hyesuuou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์Šจ๋ฐฐ์•ผ ๊ณ ์ƒํ–‡์„ค ์ฝ”๋“œ๊ตฌ์šฐ์šฐ์šฐ์›ƒ

Comment on lines -12 to +27
static let Description = "YouTube๋„ ์ด๋™ํ•˜๋ฉฐ ๊ณ„์†ํ•˜์„ธ์š”. ์•ฑ ๋ฐ Safari์—์„œ๋„ Google ์„œ๋น„์Šค์— ๋กœ๊ทธ์ธ๋ฉ๋‹ˆ๋‹ค."
static let Description = "YouTube๋„ ์ด๋™ํ•˜๋ฉฐ ๊ณ„์†ํ•˜์„ธ์š”.\n์•ฑ ๋ฐ Safari์—์„œ๋„ Google ์„œ๋น„์Šค์— ๋กœ๊ทธ์ธ๋ฉ๋‹ˆ๋‹ค."
}

struct Image {
static let check = UIImage(systemName: "checkmark.square.fill")
static let uncheck = UIImage(systemName: "square")
static let logo = UIImage(named: "logo")
static let homeFill = UIImage(named: "homeIconFill")
static let home = UIImage(named: "homeIcon")
static let shortsFill = UIImage(named: "shortsIconFill")
static let shorts = UIImage(named: "shortsIcon")
static let plueCircle = UIImage(named: "plueCircleIcon")
static let subscribeFill = UIImage(named: "subscriptionsIconFill")
static let subscribe = UIImage(named: "subscriptionsIcon")
static let libraryFill = UIImage(named: "LibraryIconFill")
static let library = UIImage(named: "LibraryIcon")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํผ๊ฐ€์š”~๐Ÿงก

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ทธ.... ์ •๋ง...๊ถ๊ธˆํ•ด์„œ ์งˆ๋ฌธํ•ฉ๋‹ˆ๋‹ค...!
์•„์ด์ฝ˜๋“ค์„ ๋”ฐ๋กœ ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์„œ ๊ตฌ์กฐ์ฒด์— ๋„ฃ์–ด์„œ ์“ฐ๋ฉด ์–ธ์ œ ์–ด๋–ป๊ฒŒ ์ข‹์€์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.....!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hellozo0 ์ € ๋ณต์žกํ•œ ์•„์ด์ฝ˜ ํŒŒ์ผ๋ช…์„ ๋งค๋ฒˆ ์“ฐ์ง€ ์•Š์•„๋„ ๋˜๊ณ  ๋ณต๋ถ™ํ•ด์„œ ๊ฐ€์ ธ๋‹ค ์“ฐ๋Š” ๊ฒฝ์šฐ ๊ฐ„ํ˜น๊ฐ€๋‹ค๊ฐ€ ์˜คํƒ€๊ฐ€ ๋‚˜๋Š” ๊ฒฝ์šฐ๋„ ์žˆ์–ด์š”.
๊ทธ๋Ÿด ๊ฒฝ์šฐ ์•ฑ์ด ํฌ๋ž˜์‹œ๊ฐ€ ๋‚˜๋Š”๋ฐ ์š”๋ก  ๋ฌธ์ œ๋“ค์„ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ์–ด์„œ ์”๋‹ˆ๋‹ค!

๋˜ ๋งŒ์•ฝ checkmark ์ด๋ฏธ์ง€ ์—์…‹์˜ ์ด๋ฆ„์ด ๋ฐ”๋€Œ์—ˆ๋‹ค๊ณ  ํ•˜๋ฉด ๋ชจ๋“  ํŒŒ์ผ์— ๋“ค์–ด๊ฐ€์„œ ํ•˜๋‚˜ํ•˜๋‚˜ ๋ฐ”๊ฟ”์•ผ ํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ๋Š”๋ฐ
Constants๋กœ ๋งŒ๋“ค์–ด๋‘๋ฉด ํ•œ ๋ฒˆ๋งŒ ๋ฐ”๊ฟˆ ๋˜๊ฒ ์ ธ? ๊ณ ๋Ÿฐ ์žฅ์ ...์“ฐ..?

์‚ฌ์‹ค ์ €๋„ ์ด์ œ ๋ง‰ ์“ฐ๊ธฐ ์‹œ์ž‘ํ–ˆ์–ด์š”!!

Comment on lines +34 to +41
func addColor(font: UIFont, range: String) {
if let labelText = text, labelText.count > 0 {
let attributedStr = NSMutableAttributedString(string: labelText)
attributedStr.addAttribute(.font,
value: font,
range: (labelText as NSString).range(of: range))
attributedText = attributedStr
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‡ฝ์ƒฅ..ํ•ด๊ฐ๋‹ˆ๋‹ค ><

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์š”๊ฒŒ ์–ด๋–ค ์—ญํ• ์„ ํ•˜๋Š” ํ•จ์ˆ˜์ธ์ง€ ์ดํ•ด๊ฐ€ ์•ˆ๊ฐ€์„œ,, ์„ค๋ช… ํ•œ๋ฒˆ๋งŒ ํ•ด์ฃผ์„ธ์—ฌ,,,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jane1choi ์ €๋„ ์ฝ”๋“œ ๋ณด๋‹ˆ๊นŒ ์ € ํ•จ์ˆ˜๋ฅผ ์“ฐ์ง„ ์•Š์•„์„œ ์™œ ๋„ฃ์–ด์คฌ๋Š”์ง€ ์ €๋„ ์˜๋ฌธ์ด์ง€๋งŒ..;;
๊ฒŒ๋‹ค๊ฐ€ ํ•จ์ˆ˜ ์ด๋ฆ„๋„ ์ž˜๋ชป ์จ๋†จ๋„ค์š”;; ์ง„์งœ ์™œ ์จ์คซ์ง€..??? ๋นผ์•ผ๊ฒŸ๋‹น...

NSMutableAttributedString ์€ ํ…์ŠคํŠธ์˜ ํŠน์ • ๋ถ€๋ถ„์˜ ์ƒ‰์ด๋‚˜ ๊ธ€์ž ํฌ๊ธฐ, ํฐํŠธ ๋“ฑ์˜ ํŠน์„ฑ์„ ๋ฐ”๊ฟ”์ค„ ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๋ฉ”์†Œ๋“œ์—์š”.

//๋‚ด๊ฐ€ ์ ์šฉํ•˜๊ณ ์‹ถ์€ ํฐํŠธ ์‚ฌ์ด์ฆˆ
let fontSize = UIFont.boldSystemFont(ofSize: 30)

//label์— ์žˆ๋Š” Text๋ฅผ NSMutableAttributedString์œผ๋กœ ๋งŒ๋“ค์–ด์ค€๋‹ค.
let attributedStr = NSMutableAttributedString(string: myLabel.text)

//์œ„์—์„œ ๋งŒ๋“  attributedStr์— addAttribute๋ฉ”์†Œ๋“œ๋ฅผ ํ†ตํ•ด Attribute๋ฅผ ์ ์šฉ. kCTFontAttributeName์€ value๋กœ ํฐํŠธํฌ๊ธฐ์™€ ํฐํŠธ๋ฅผ ๋ฐ›์„ ์ˆ˜ ์žˆ์Œ.
attributedStr.addAttribute(.foregroundColor, value: UIColor.blue, range: (text as NSString).range(of: "Zedd"))

//์ตœ์ข…์ ์œผ๋กœ ๋‚ด label์— ์†์„ฑ์„ ์ ์šฉ
myLabel.attributedText = attributedStr

์•„๋ž˜ ์‚ฌ์ง„์ฒ˜๋Ÿผ ๋‚˜์˜ค๊ฒŒ ๋ฉ๋‹ˆ๋‹น.!
์Šคํฌ๋ฆฐ์ƒท 2021-10-26 ์˜คํ›„ 11 10 59

์ถœ์ฒ˜: https://zeddios.tistory.com/300 [ZeddiOS]

Copy link
Member

@hellozo0 hellozo0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ›„๋ฆ์Šจ๋ฐฐ ๋ฉ‹์ž‡์ž๋‚˜...?

Comment on lines -12 to +27
static let Description = "YouTube๋„ ์ด๋™ํ•˜๋ฉฐ ๊ณ„์†ํ•˜์„ธ์š”. ์•ฑ ๋ฐ Safari์—์„œ๋„ Google ์„œ๋น„์Šค์— ๋กœ๊ทธ์ธ๋ฉ๋‹ˆ๋‹ค."
static let Description = "YouTube๋„ ์ด๋™ํ•˜๋ฉฐ ๊ณ„์†ํ•˜์„ธ์š”.\n์•ฑ ๋ฐ Safari์—์„œ๋„ Google ์„œ๋น„์Šค์— ๋กœ๊ทธ์ธ๋ฉ๋‹ˆ๋‹ค."
}

struct Image {
static let check = UIImage(systemName: "checkmark.square.fill")
static let uncheck = UIImage(systemName: "square")
static let logo = UIImage(named: "logo")
static let homeFill = UIImage(named: "homeIconFill")
static let home = UIImage(named: "homeIcon")
static let shortsFill = UIImage(named: "shortsIconFill")
static let shorts = UIImage(named: "shortsIcon")
static let plueCircle = UIImage(named: "plueCircleIcon")
static let subscribeFill = UIImage(named: "subscriptionsIconFill")
static let subscribe = UIImage(named: "subscriptionsIcon")
static let libraryFill = UIImage(named: "LibraryIconFill")
static let library = UIImage(named: "LibraryIcon")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ทธ.... ์ •๋ง...๊ถ๊ธˆํ•ด์„œ ์งˆ๋ฌธํ•ฉ๋‹ˆ๋‹ค...!
์•„์ด์ฝ˜๋“ค์„ ๋”ฐ๋กœ ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์„œ ๊ตฌ์กฐ์ฒด์— ๋„ฃ์–ด์„œ ์“ฐ๋ฉด ์–ธ์ œ ์–ด๋–ป๊ฒŒ ์ข‹์€์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.....!

Copy link
Member

@jane1choi jane1choi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฝ”๋“œ๋ฆฌ๋ทฐ ๋„˜ ๋Šฆ๊ฒŒ ๋‚จ๊ฒจ์„œ ์ฃ„์†กํ•ด์—ฌ..
์ด๋ฒˆ ์ฃผ๋„ ์†๋ฐฐ ์ฝ”๋“œ๋ณด๊ณ  ๋ฐ˜๋ณต๋˜๋Š” ์ฝ”๋“œ ์ค„์ด๋Š” ๋ฐฉ๋ฒ•๊ณผ ์ข‹์€ ๋„ค์ด๋ฐ์— ๋Œ€ํ•ด ๋”๋” ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹คโ˜บ๏ธ๐Ÿ˜†
๊ณ ์ƒ๋งŽ์œผ์…จ์–ด์š”๐Ÿ‘๐Ÿ‘

Comment on lines +34 to +41
func addColor(font: UIFont, range: String) {
if let labelText = text, labelText.count > 0 {
let attributedStr = NSMutableAttributedString(string: labelText)
attributedStr.addAttribute(.font,
value: font,
range: (labelText as NSString).range(of: range))
attributedText = attributedStr
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์š”๊ฒŒ ์–ด๋–ค ์—ญํ• ์„ ํ•˜๋Š” ํ•จ์ˆ˜์ธ์ง€ ์ดํ•ด๊ฐ€ ์•ˆ๊ฐ€์„œ,, ์„ค๋ช… ํ•œ๋ฒˆ๋งŒ ํ•ด์ฃผ์„ธ์—ฌ,,,

}

@objc func touchupLogoutButton(_ sender: UIButton) {
do { // ๋กœ๊ทธ์•„์›ƒ
@objc func touchupAnotherAccountButton(_ sender: UIButton) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ค์ด๋ฐ ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค..๐Ÿ‘๐Ÿป

Comment on lines +57 to +68
private func setNavigationController(title: String,
unselectedImage: UIImage,
selectedImage: UIImage,
rootViewController: UIViewController) -> UINavigationController {
let nav = UINavigationController(rootViewController: rootViewController)
nav.tabBarItem.title = title
nav.tabBarItem.image = unselectedImage
nav.tabBarItem.selectedImage = selectedImage
nav.navigationBar.isHidden = true
return nav
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋„ ํ•œ ๋ฒˆ์— ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฒ• ์•Œ์•„๊ฐ€์š”! ์งฑ์งฑ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป

@@ -46,7 +44,7 @@ class SignUpVC: UIViewController {
$0.setTextField(placeholder: "๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ", secure: true)
}

lazy var showButton = UIButton().then {
private lazy var showButton = UIButton().then {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy ํ‚ค์›Œ๋“œ๋Š” ์–ธ์ œ ์“ฐ๋Š” ๊ฒƒ์ธ์ง€..๐Ÿค” ์„ค๋ช…ํ•ด์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ์Šจ๋ฐฐ..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‚ฌ์‹ค ์ €๋‘ lazy var์™€ ์•„์ฃผ ์‚ฌ์ด๊ฐ€ ์นœํ•œ ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ์—ฌ๊ธฐ์ €๊ธฐ์— ๊ฐˆ๊ฒจ๋ณด๋ฉฐ ํ˜ผ์ž ์นœํ•œ ์ฒ™ ์ข€ ํ•˜๋Š” ์ค‘์ด๊ธด ํ•œ๋ฐ...
๊ทธ๋ž˜๋‘ ๊ฐˆ๊ฒจ๋ณด์ž๋ฉด...

lazy var๋Š” ๋ชจ๋“  ๋ทฐ๊ฐ€ ๋‹ค ์ƒ์„ฑ(์ดˆ๊ธฐํ™”)๋˜๊ณ  ๋‚˜์„œ ๋ถˆ๋ฆฌ๋Š” ๋ณ€์ˆ˜์—ฌ์š”.
๊ทธ๋Ÿฌ๋‹ˆ๊นŒ ๋‹น์žฅ ํ•„์š”ํ•˜์ง€ ์•Š์œผ๋ฉด ์ƒ์„ฑ๋˜์ง€ ์•Š๊ณ  ํ˜ธ์ถœ์„ ํ•ด์ค˜์•ผ๋งŒ ์ƒ์„ฑ์ด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ์ฃผ๋กœ ๊ฐ€์žฅ
์ €๊ธฐ showButton, fieldStackView ์—๋Š” ๊ตณ์ด ์“ธ ํ•„์š” ์—†๋Š”๋ฐ ์จ ๋ณธ ๊ฒƒ์ด๊ตฌ

์–ธ์ œ ์‚ฌ์šฉํ•˜๋ƒ๋ฉด
https://www.notion.so/huree-can-do-it/1-4697482733f246c98b2b7711d2e71859#7af5fe5b971d4bc5b46e054b35e42e5c
์š”๊ธฐ ์ฐธ๊ณ ํ•ด๋ณด์‡ผ๋ผ~^^

Copy link
Member

@jumining jumining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extension์˜ ์—ฌ์™• ๋ฃจํฌ์–ธ๋‹ˆ ์ฝ”๋“œ ์ž˜ ๋ณด๊ณ ๊ฐ€์šฅ๐Ÿ˜€ ๋‚˜๋„ ์–ธ์  ๊ฐ„ ์ต์Šคํ…์…˜ ์ž˜ ์“ฐ๊ฒŒ๋˜๋Š” ๋‚ ์ด ์˜ค๊ธธใ…œใ……ใ…œ

Comment on lines 11 to +17
@nonobjc class var mainBlue: UIColor {
return UIColor(red: 66/255.0, green: 133/255.0, blue: 244/255.0, alpha: 1.0)
}

@nonobjc class var lineGray: UIColor {
return UIColor(white: 234.0 / 255.0, alpha: 1.0)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non์„ ๋ถ™์—ฌ์•ผํ•˜๋‚˜์šฉ,.? objc๋Š” ์•ˆ๋˜๋Š”๊ฑด๊ฐ€์š” ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋„ ๊ถ๊ธˆํ•ด์„œ ์ฐพ์•„๋ดค๋Š”๋ฐ
@nonobjc๋Š” ๋ช…์‹œ์ ์œผ๋กœ ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ํ•ด๋‹น ์ฝ”๋“œ๋ฅผ Objective-C๋กœ ๋ณ€ํ™˜ํ•˜๋Š”๊ฑธ ๋ง‰๊ณ ,
@objc๋Š” ๋ช…์‹œ์ ์œผ๋กœ ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ํ•ด๋‹น ์ฝ”๋“œ๋ฅผ Objective-C๋กœ ๋ณ€ํ™˜ํ•˜๋„๋ก ํ•ด์ค€๋Œ€์š”.

๋ณดํ†ต ์ „์ž๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ด์œ ๋Š” swift์—์„œ๋งŒ ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•  ๋•Œ ๋ผ๋Š”๋ฐ
๊ตณ์ด @nonobjc๋ž‘ @objc๋ฅผ ์•ˆ ๋ถ™์—ฌ๋„ ๋  ๊ฑฐ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“œ๋„ค์š”... ๋Œ€์‹ ์— public์„ ๋ถ™์—ฌ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”.

๊ทธ๋Ÿฌ๋ฉด ์™œ ๋ถ™์˜€๋ƒ?!!!
๊ทธ๊ฑด...๊ทธ๋™์•ˆ ์ œํ”Œ๋ฆฐ์—์„œ ์‡ฝ์ƒฅ ์ƒ‰์„ ์ถ”์ถœํ•˜๋ฉด ์ €๋ ‡๊ฒŒ ๋ณดํ†ต ์ฝ”๋“œ๊ฐ’์ด ๋‚˜์™€์„œ ๊ธ์–ด์™”๋˜ ๋ฒ„๋ฆ‡์ด ์žˆ์–ด์„œ..

@objc func touchupLogoutButton(_ sender: UIButton) {
do { // ๋กœ๊ทธ์•„์›ƒ
@objc func touchupAnotherAccountButton(_ sender: UIButton) {
do {
try FirebaseAuth.Auth.auth().signOut()
guard let pvc = presentingViewController as? UINavigationController else { return }
self.dismiss(animated: true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋กœ๊ทธ์•„์›ƒ ํ•จ์ˆ˜ ๋ณด๊ณ  ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹น..!

@@ -18,31 +18,28 @@ class LoginVC: UIViewController {
// MARK: - Properties
fileprivate var currentNonce: String?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๊ฑด ์–ด๋–ค๊ฑด๊ฐ€์šฉ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์•„ ์š”๊ฑฐ๋Š” ๋”ฐ๋กœ ์Šคํ„ฐ๋””ํ•˜๋ฉด์„œ ํŒŒ์ด์–ด๋ฒ ์ด์Šค๋กœ ์• ํ”Œ๋กœ๊ทธ์ธ์„ ๊ตฌํ˜„ํ•ด์ฃผ๋ ค๊ณ  ์„ ์–ธํ•ด์ค€ ๊ฑด๋ฐ

nonce ๋ผ๋Š” ๊ฒŒ ์ž„์˜๋กœ ์ƒ์„ฑ๋˜๋Š” ์•”ํ˜ธํ™” ํ† ํฐ์œผ๋กœ ์žฌ์ƒ ๊ณต๊ฒฉ์„ ๋ฐฉ์ง€ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉํ•˜๋Š”๋ฐ
๋งค๋ฒˆ ์• ํ”Œ๋กœ๊ทธ์ธ ์š”์ฒญ ์‹œ์— nonce๋ฅผ ์ƒ์„ฑํ•ด์„œ ๋ณด์•ˆ์„ ํ•ด์ค€๋‹ค๊ณ  ํ•ด์š”.

์ด currentNonce๋ฅผ ๊ทธ ์—ญํ• ์„ ํ•˜๊ฒŒ ํ•ด์ฃผ๋ ค๊ณ  ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์‹ค ํŒŒ๋ฒ  ๋„ํ๋จผํŠธ์—์„œ ๊ทธ๋ ‡๊ฒŒ ํ•˜๋ผ๊ณ  ํ•˜๊ธธ๋ž˜ ๊ธ์–ด์™”์–ด์—ฌ..ใ…‹ใ…‹

Comment on lines +57 to +68
private func setNavigationController(title: String,
unselectedImage: UIImage,
selectedImage: UIImage,
rootViewController: UIViewController) -> UINavigationController {
let nav = UINavigationController(rootViewController: rootViewController)
nav.tabBarItem.title = title
nav.tabBarItem.image = unselectedImage
nav.tabBarItem.selectedImage = selectedImage
nav.navigationBar.isHidden = true
return nav
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฝ”๋“œ ๊น”๋”ํ•˜๋„ค์š”๐Ÿ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] iOS 2์ฐจ ๊ณผ์ œ
7 participants