ios-streetcat's Introduction
ios-streetcat's People
ios-streetcat's Issues
user input์ json์ผ๋ก encode / save Data ์ง๋ฌธ
@withkali
(zig branch / commit message: json encode issue ์
๋๋ค.)
AddViewController.swift ์์, nameTextField์ InfoTextView๋ฅผ ํตํด ๋ฐ์์จ String์ Json ๋ฐ์ดํฐ๋ก encodingํ๊ณ ์ ํฉ๋๋ค. 77์ค์ finalConfirm('์ถ๊ฐํ๊ธฐ' ๋ฒํผ) ํจ์๊ฐ ์คํ๋ ๋encoding์ ํ๊ณ ์ถ์ต๋๋ค. 96์ค์์๋ถํฐ encoding ์ฝ๋๊ฐ ์์๋ฉ๋๋ค.
user input์ผ๋ก ๋ฐ์์ฌ ๋ฐ์ดํฐ(cat)๋ฅผ Cat()์ ์ธ์คํด์ค๋ก ํด์ผํ๋์ง, CatList()์ ์ธ์คํด์ค๋ก ํด์ผํ๋์ง ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ๋ ๊ฐ์ง ๋ชจ๋ ์๋ํด๋ณด์๊ณ , ๊ทธ๋ด ๋๋ง๋ค ์ฌ๋ฌ๊ฐ์ง ์๋ฌ๊ฐ ๋ฐ์ํ์ฌ catProfile.swift์ struct CatList์ init์ ์๋ก ์ถ๊ฐํ๋ ๋ฑ ์ ์ฐจ๋ก ๊ตฌ๊ธ๋ง์ ํด๋ณด์์ง๋ง ํด๊ฒฐ๋์ง ์์์ต๋๋ค. ์ด๋ป๊ฒ ์ธ์คํด์ค๋ฅผ ์์ฑํ์ฌ model์ struct ์ ๋ฃ์ด์ค ์ ์์๊น์?
์ธ์คํด์ค๋ฅผ ์์ฑํ ํ ์ธ์ฝ๋ฉ์ 98์ค~104์ค์ฒ๋ผ ํ๋ ๊ฒ ๋ง๋ ๊ฒ์ธ์ง๋ ์ฌ์ญค๋ณด๊ณ ์ถ์ต๋๋ค!
์ถ๊ฐ์ ์ผ๋ก, ์๋ก ๋ฐ์์จ user input ๋ฐ์ดํฐ(์ธ์คํด์ค)๋ฅผ cats.json์ ์ ์ฅํ๊ธฐ ์ํด์ 110์ค~119์ค์ ์ฝ๋๊ฐ ๋ง๋์ง๋ ์๊ณ ์ถ์ต๋๋ค! 111,112์ค๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก path๋ฅผ ์ค์ ํ๋ฉด ์ ์๋(113์ค)์์ ์ค๋ฅ(Cannot convert value of type 'URL?' to expected argument type 'String')๊ฐ ๋ฐ๊น์?
๋ต๋ณ์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค :)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.