Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 안드로이드 숏컷
- 스위프트 앨범
- 안드로이드 바로가기
- 앱 백그라운드 푸시 데이터 저장
- 안드로이드 앨범
- 스위프트 웹뷰
- flutter rotate
- 스위프트 푸시
- swift sms
- 노티피케이션 익스텐션
- silent push
- NotificationService Extension
- 앱 꺼졌을 때 푸시 데이터 저장
- 스위프트 카메라
- Swift flutterview
- Flutter UIKitView MethodChannel
- 플러터 뷰 컨트롤러
- 스위프트
- native flutter view
- Flutter NativeView
- FlutterView MethodChannel
- flutter 회전
- 스위프트 테이블 뷰 셀
- 안드로이드 에러
- 스위프트 UserDefaults
- 안드로이드 FCM
- 푸시 데이터 저장
- swift autolayout
- swift 문자
- Swift flutterviewcontroller
Archives
- Today
- Total
Things take time
[iOS] Android의 R.array와 같은 배열 문자열 처리 본문
[.plist사용]
<key>gyul</key>
<array>
<string>gyul_hi</string>
<string>gyul_kk</string>
<string>gyul_attention</string>
<string>gyul_sad</string>
<string>gyul_sorry</string>
<string>gyul_best</string>
<string>gyul_what</string>
<string>gyul_happy_meal</string>
<string>gyul_accept</string>
<string>gyul_sleep</string>
<string>gyul_heart</string>
<string>gyul_gloomy</string>
<string>gyul_ok</string>
<string>gyul_reject</string>
<string>gyul_cong</string>
<string>gyul_no</string>
<string>gyul_soju</string>
<string>gyul_surprise</string>
</array>
<key>hands</key>
<array>
<string>hand_hi</string>
<string>hand_best</string>
<string>hand_good</string>
<string>hand_v</string>
<string>hand_heart</string>
<string>hand_ok</string>
<string>hand_no</string>
<string>hand_punch</string>
</array>
</dict>
</plist>
plist에 기록을 해야한다.
안드로이드는 Resource폴더 밑에 array, string과 같은 상수 폴더를 생성하고 하위의 .xml파일을 생성하는 것에 대치된다고 보면 된다.
프로퍼티 타입으로 하면 입력하기 까다로우므로, 위와 같은 방식으로 편하게 쓰자. 제대로 입력됐는지 확인하려면, 소스코드 타입에서 프로퍼티로 변경해서 보면 된다.
[사용법]
if let gyulArray = Bundle.main.infoDictionary!["gyul"] as? NSArray{
for gyul in gyulArray{
print("gyul :: \(gyul)")
}
}
'iOS (기능)' 카테고리의 다른 글
[SWIFT] 투명도가 있는 뷰 하위에 추가 되는 뷰에서 투명도 영향 받지 않기 (1) | 2020.02.25 |
---|---|
[SWIFT] TextView에 링크 걸기 및 뷰 컨트롤러 이동 (0) | 2020.01.16 |
[Swift] Error : terminating with uncaught exception of type NSException[Xcode 11.2/iOS 13.2 미만 버전 앱 죽는 현상] (0) | 2019.11.07 |
[SWIFT] iOS 13대응 - UI(Modal 뷰, Present, 다크모드, StatusBar Color) (4) | 2019.09.24 |
[SWIFT] iOS13 - Swift UI란 무엇인가(UIKit은 ??) (2) | 2019.09.24 |