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] #34 - KeyPathFindable Protocol ๋ฐ withUnretained Operator #37

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

L-j-h-c
Copy link
Contributor

@L-j-h-c L-j-h-c commented Dec 6, 2022

๐ŸŒด PR ์š”์•ฝ

๐ŸŒฑ ์ž‘์—…ํ•œ ๋ธŒ๋žœ์น˜

๐ŸŒฑ PR Point

๊ตฌํ˜„ ์‹œ ํŽธ์˜๋ฅผ ์ œ๊ณตํ•˜๋Š” Util ์ฝ”๋“œ๋“ค์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

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

KeyPathFindable: keyPath๋ฅผ ์ž๋™์™„์„ฑ์œผ๋กœ ์กฐํšŒ ๊ฐ€๋Šฅ

๊ตฌํ˜„ ๋ฐฉ๋ฒ• : ๋งํฌ์— ๊ธฐ์ˆ ํ–ˆ์Šต๋‹ˆ๋‹ค!

        output.nicknameAlert
            .assign(to: nickNameTextFieldView.kf.alertText,
                    on: nickNameTextFieldView)
            .store(in: cancelBag)

withUnreatined: retain cycle ๋ฐฉ์ง€๋ฅผ ์œ„ํ•œ guard self๋ฌธ ์ƒ๋žต ๊ฐ€๋Šฅ

        output.passwordAlert
            .withUnretained(self)
            .sink { event in
            print("event: \(event)")
        } receiveValue: { (weakself, alertText) in
            weakself.passwordCheckTextFieldView.changeAlertLabelText(alertText)
        }.store(in: cancelBag)

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

@L-j-h-c L-j-h-c added Feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๊ตฌํ˜„ ์ค€ํ˜ธ๐Ÿ… labels Dec 6, 2022
@L-j-h-c L-j-h-c self-assigned this Dec 6, 2022
Copy link
Member

@devxsby devxsby left a comment

Choose a reason for hiding this comment

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

์ปด๋ฐ”์ธ์— ์—†๋Š” withUnretained๊นŒ์ง€..
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹น ์ž˜์“ฐ๊ฒ ์Šต๋‹ˆ๋‹น ๐Ÿ™‡๐Ÿปโ€โ™€๏ธ

Copy link
Member

@lsj8706 lsj8706 left a comment

Choose a reason for hiding this comment

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

์—ฌ๋Ÿฌ ํŽธ์˜ ๊ธฐ๋Šฅ ๊ตฌํ˜„ ์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค~!!
์ฒจ๋ถ€ํ•ด์ค€ ๋ธ”๋กœ๊ทธ๋„ ์ •๋…ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!!

}
}

public protocol KeyPathFindable {
Copy link
Member

Choose a reason for hiding this comment

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

assign์„ ์‚ฌ์šฉํ•  ๋•Œ ๋งค์šฐ ํŽธ๋ฆฌํ•˜๊ฒ ๋„ค์š”!!
๋ฉ‹์ง„ ๊ฐœ๋ฐœ์ž ์ค€ํ˜ธ์„ ๋ฐฐ ๋Œ€๋‹จํ•ฉ๋‹ˆ๋‹ค..!

Copy link
Member

@yangsubinn yangsubinn left a comment

Choose a reason for hiding this comment

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

์ฐธ๋ง๋ฃจ ์‹ ๊ธฐํ•˜๋„ค์š” .. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค !

@L-j-h-c L-j-h-c merged commit 87cd5a8 into sopt-makers:develop Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๊ตฌํ˜„ size/M ์ค€ํ˜ธ๐Ÿ…
Projects
None yet
4 participants