Skip to content

๐Ÿ”€ :: [#11] ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ / TextField ์ปดํฌ๋„ŒํŠธ ์ œ์ž‘#12

Merged
Xixn2 merged 21 commits intomasterfrom
11-signup-infoinput-publishing
Apr 9, 2025
Merged

๐Ÿ”€ :: [#11] ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ / TextField ์ปดํฌ๋„ŒํŠธ ์ œ์ž‘#12
Xixn2 merged 21 commits intomasterfrom
11-signup-infoinput-publishing

Conversation

@Xixn2
Copy link
Member

@Xixn2 Xixn2 commented Apr 8, 2025

๐Ÿ’ก ๊ฐœ์š”

๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ / TextField ์ปดํฌ๋„ŒํŠธ ์ œ์ž‘

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

  • TextField ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ฐ์ข… ์ปฌ๋Ÿฌ, ํฐํŠธํŒŒ์ผ ์ถ”๊ฐ€ ๋ฐ ์ƒ‰์ƒ Extension์„ Text์—์„œ View๊นŒ์ง€ ํ™•์žฅ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐ŸŽจ ์„ค๋ช…์ฝ”๋“œ

Color Extension ์ฝ”๋“œ

extension Color {
    static func color(_ style: ColorStyle) -> Color {
        return Color(style.rawValue)
    }
}

extension Text {
    func color(_ style: ColorStyle) -> Text {
        return self.foregroundColor(.color(style))
    }
}

extension View {
    func color(_ style: ColorStyle) -> some View {
        self.foregroundColor(.color(style))
    }
}

๋กœ๊ทธ์ธ ์„ฑ๊ณต (๋กœ์ปฌ์— ์ •๋ณด์ €์žฅ)

authViewModel.signIn { statusCode in
    if (200...299).contains(statusCode) {
        print("\(statusCode) | ๋กœ๊ทธ์ธ ์„ฑ๊ณต")
        
        if isLoggedIn {
            let email = "\(emailTextField)@gsm.hs.kr"
            let password = passwordTextField
            
            UserDefaults.standard.set(email, forKey: "savedEmail")
            UserDefaults.standard.set(password, forKey: "savedPassword")
            UserDefaults.standard.set(isLoggedIn, forKey: "isLoggedIn")
            
            print("โœ… ๋กœ์ปฌ ์ €์žฅ ์™„๋ฃŒ: \(email), \(password), ๋กœ๊ทธ์ธ ์ƒํƒœ ์œ ์ง€: \(isLoggedIn)")
        }
    } else {
        print("\(statusCode) | ๋กœ๊ทธ์ธ ์‹คํŒจ")
    }
}

๐ŸŽธ ๊ธฐํƒ€

โš ๏ธ ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ (TextField, Button ์ปดํฌ๋„ŒํŠธ)


์˜ค๋ฅ˜ ์—†์Œ

์˜ค๋ฅ˜ ์žˆ์Œ

โš ๏ธ ๋กœ๊ทธ์ธ ์„ฑ๊ณต (Xcode ๋กœ๊ทธ)

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2025-04-08 แ„‹แ…ฉแ„’แ…ฎ 9 11 40

@Xixn2 Xixn2 added 3๏ธโƒฃPriority: Low ์šฐ์„ ์ˆœ์œ„ - ํ•˜ โœจFeature ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๐ŸŽจPublishing ๋””์ž์ธ ๊ตฌํ˜„ โšก๏ธSimple ๊ฐ„๋‹จํ•œ ์ˆ˜์ • labels Apr 8, 2025
@Xixn2 Xixn2 requested a review from 2rjswn April 8, 2025 02:30
@Xixn2 Xixn2 self-assigned this Apr 8, 2025
Xixn2 added 13 commits April 8, 2025 15:14
@Xixn2 Xixn2 closed this Apr 8, 2025
@Xixn2 Xixn2 deleted the 11-signup-infoinput-publishing branch April 8, 2025 12:06
@Xixn2 Xixn2 restored the 11-signup-infoinput-publishing branch April 8, 2025 12:07
@Xixn2 Xixn2 reopened this Apr 8, 2025
@Xixn2 Xixn2 merged commit bc448ec into master Apr 9, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3๏ธโƒฃPriority: Low ์šฐ์„ ์ˆœ์œ„ - ํ•˜ โœจFeature ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๐ŸŽจPublishing ๋””์ž์ธ ๊ตฌํ˜„ โšก๏ธSimple ๊ฐ„๋‹จํ•œ ์ˆ˜์ •

Projects

None yet

Development

Successfully merging this pull request may close these issues.

๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ

2 participants