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

2주차 기본,도전,심화과제 PR #19

Merged
merged 6 commits into from
Apr 29, 2022
Merged

2주차 기본,도전,심화과제 PR #19

merged 6 commits into from
Apr 29, 2022

Conversation

meenyweeny
Copy link
Member

@meenyweeny meenyweeny commented Apr 22, 2022

🌱 작업한 내용

기본, 도전, 심화 과제를 했습니다..

🌱 PR Point

칭찬 부탁><

스크린샷 귀찮아서 죄송합니다

📸 스크린샷

구현 내용 스크린샷
ex. 로그인 화면 파일첨부바람

📮 관련 이슈

Copy link

@pcsoyeon pcsoyeon left a comment

Choose a reason for hiding this comment

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

KIYA 역시 경민님 👍🏻 코드 깔끔하네요 !! 😎


extension UIViewController {
func changeRootViewController(_ viewControllerToPresent: UIViewController) {
if let window = UIApplication.shared.windows.first {

Choose a reason for hiding this comment

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

UIApplication.shared.windows. 요거 iOS 15에서도 가능한가여 ?? (just 궁금)

Choose a reason for hiding this comment

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

저도 궁금합니다!!

@@ -58,7 +58,7 @@ final class JoinNameViewController: UIViewController {
}

@IBAction func nextButtonDidTap(_ sender: Any) {
guard let passwordVC = self.storyboard?.instantiateViewController(withIdentifier: "JoinPasswordViewController") as? JoinPasswordViewController else { return }
guard let passwordVC = self.storyboard?.instantiateViewController(withIdentifier: Const.ViewController.JoinPasswordVC) as? JoinPasswordViewController else { return }

Choose a reason for hiding this comment

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

상수 처리 한 것 너무 좋네요 😎

Copy link

@88yhtserof 88yhtserof Apr 24, 2022

Choose a reason for hiding this comment

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

뷰 컨트롤러의 identifier를 따로 상수처리하는 이유가 뭔가요?? 찾아볼 때 조금더 효율적이라 따로 정리해두는 건가요??🧐
저도 배워서 사용해보고 싶어요!!!

Comment on lines +18 to +21
var borderView = UIView(frame: CGRect(x: 0, y: 0,
width: UIScreen.main.bounds.width, height: 1.5))
borderView.backgroundColor = UIColor(red: 218.0/255.0, green: 218.0/255.0, blue: 218.0/255.0, alpha: 1.0)
self.tabBar.addSubview(borderView)

Choose a reason for hiding this comment

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

요 borderView는 탭 바의 테두리(?)인가요 ??

Comment on lines +27 to +31
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
tabBar.backgroundColor = item.tag == 3 ? .black : .white
tabBar.tintColor = item.tag == 3 ? .white : .black
tabBar.barTintColor = item.tag == 3 ? .white : .black
}

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.

와 이런코드 너무 신기하고 똑똑해요 ... 세상에 ... 🙉

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.

tag를 통한 방법이 이거였군요 배워갑니다!!

Copy link
Member

@yujindonut yujindonut left a comment

Choose a reason for hiding this comment

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

경민...코드와 ... 폴더링 ... 다음주에 쑉쌱해서 와도 될까요... 정말 많이 배워갑니다...
과제 고생 너무 많았습니다!!!~ 😚😚

passwordTextField.isSecureTextEntry.toggle()
}

@IBAction func completeButtonDidTap(_ sender: Any) {
guard let completeVC = UIStoryboard(name: "Complete", bundle: nil).instantiateViewController(withIdentifier: "CompleteViewController") as? CompleteViewController else { return }
guard let completeVC = UIStoryboard(name: Const.Storyboard.Complete, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.CompleteVC) as? CompleteViewController else { return }
Copy link
Member

Choose a reason for hiding this comment

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

이렇게 Const.Storyboard를 사용하는 이유는 뭔가요...?!?!?(태클X...진짜단순궁금...)

Comment on lines +27 to +31
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
tabBar.backgroundColor = item.tag == 3 ? .black : .white
tabBar.tintColor = item.tag == 3 ? .white : .black
tabBar.barTintColor = item.tag == 3 ? .white : .black
}
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

@88yhtserof 88yhtserof left a comment

Choose a reason for hiding this comment

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

저도 상수 처리..? 공부해서 다음에 적용해볼래요🔥
그리고 Label 일부 단어 속성 변경하는 법 배워갑니다!!

func setPartialLabelColor(targetStringList: [String], color: UIColor?) {
let fullText = text ?? ""
let attributedString = NSMutableAttributedString(string: fullText)
targetStringList.forEach {

Choose a reason for hiding this comment

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

targetStringList.forEach문이
fullText 중 targetString 원소에 해당하는 단어들만 속성을 바꿔주는 내용 맞나요?
제대로 이해했는지 궁금해요!!!


extension UIViewController {
func changeRootViewController(_ viewControllerToPresent: UIViewController) {
if let window = UIApplication.shared.windows.first {

Choose a reason for hiding this comment

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

저도 궁금합니다!!

@@ -23,13 +23,23 @@ extension Const {

// MARK: - Home

static let HomeVC = "HomeViewController"

Choose a reason for hiding this comment

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

Const에 대해 설명해줄 수 있나요..😂
검색해보니깐 Constant, 상수를 정리할 때 사용하는 것 같은데,, 잘 모르겠어요,,
뷰 컨트롤러 구조체를 만드는데 주로 사용하는 걸까요??

@@ -58,7 +58,7 @@ final class JoinNameViewController: UIViewController {
}

@IBAction func nextButtonDidTap(_ sender: Any) {
guard let passwordVC = self.storyboard?.instantiateViewController(withIdentifier: "JoinPasswordViewController") as? JoinPasswordViewController else { return }
guard let passwordVC = self.storyboard?.instantiateViewController(withIdentifier: Const.ViewController.JoinPasswordVC) as? JoinPasswordViewController else { return }
Copy link

@88yhtserof 88yhtserof Apr 24, 2022

Choose a reason for hiding this comment

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

뷰 컨트롤러의 identifier를 따로 상수처리하는 이유가 뭔가요?? 찾아볼 때 조금더 효율적이라 따로 정리해두는 건가요??🧐
저도 배워서 사용해보고 싶어요!!!

Copy link

@inuinseoul inuinseoul 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 +11 to +12
///Label의 일부만 색을 바꿀 수 있는 익스텐션
func setPartialLabelColor(targetStringList: [String], color: UIColor?) {

Choose a reason for hiding this comment

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

이런 기능 필요할때가 종종있는데, extension으로 빼놓은거 좋네요

Comment on lines +27 to +31
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
tabBar.backgroundColor = item.tag == 3 ? .black : .white
tabBar.tintColor = item.tag == 3 ? .white : .black
tabBar.barTintColor = item.tag == 3 ? .white : .black
}

Choose a reason for hiding this comment

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

저도 알아갑니다~~

Copy link

@0lynny 0lynny 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 -40 to +43
welcomeLabel.text = "\(userName)님 Instagram에 오신 것을 환영합니다"
welcomeLabel.text = """
\(userName)님 Instagram에
오신 것을 환영합니다
"""
Copy link

Choose a reason for hiding this comment

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

수정 전 코드와 수정 후 코드의 차이가 궁금합니다..!

Comment on lines +27 to +31
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
tabBar.backgroundColor = item.tag == 3 ? .black : .white
tabBar.tintColor = item.tag == 3 ? .white : .black
tabBar.barTintColor = item.tag == 3 ? .white : .black
}
Copy link

Choose a reason for hiding this comment

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

너무 깔꼼해보여요 ! 쑉쌱하고 싶은 코드네요 ><

Comment on lines +43 to 45
private func setLabelUI() {
joinLabel.setPartialLabelColor(targetStringList: ["가입하기"], color: UIColor.tintColor)
}
Copy link

Choose a reason for hiding this comment

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

와 이렇게 라벨색상을 바꾸는거 알아갑니다! 위에 코드보고 어디에 쓰이는지 궁금했었는데 여기서 쓰이는 거였군요!

@meenyweeny meenyweeny merged commit cf458fd into main Apr 29, 2022
@meenyweeny meenyweeny deleted the feature/#18 branch April 29, 2022 02:11
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