์ง์ญํํ๋ String์ init ์ข ๋ฅ
init(localized:table:bundle:locale:comment:)
- iOS 15๋ฒ์ ์ด์๋ถํฐ ์ฌ์ฉ ๊ฐ๋ฅ
init(
localized keyAndValue: String.LocalizationValue,
table: String? = nil,
bundle: Bundle? = nil,
locale: Locale = .current,
comment: StaticString? = nil
)
- localized : stringํ์ผ๋ก ์์ฑํ ์ธ์ด๋ณ key value ์ ๋ ฅ. ์ด ํ๋ผ๋ฏธํฐ ์ธ ๋ชจ๋ ์๋ต ๊ฐ๋ฅ
- locale : ๋ฐ์ดํฐ ์์์ ์ง์ ํ๋ ๋ฐ ์ฌ์ฉํ ์ธ์ด์ , ๋ฌธํ์ , ๊ธฐ์ ์ ๊ท์น๊ณผ ํ์ค ์ ๋ณด
- comment : ํด๋น key ๊ฐ์ ๋ํ ์ค๋ช ์์ฑ
init(localized:defaultValue:options:table:bundle:locale:comment:)
- iOS 16๋ฒ์ ์ด์๋ถํฐ ์ฌ์ฉ ๊ฐ๋ฅ
- ์ initalize์ ๋ฌ๋ฆฌ defaultValue, option ์ค์ ์ด ๊ฐ๋ฅํจ
init(
localized key: StaticString,
defaultValue: String.LocalizationValue,
options: String.LocalizationOptions,
table: String? = nil,
bundle: Bundle? = nil,
locale: Locale = .current,
comment: StaticString? = nil
)
์ฐธ๊ณ ๋งํฌ
728x90