简体   繁体   English

为iOS创建目录应用程序的指南

[英]Guidance to create a catalogue app for iOS

I am in the process of creating an iOS app for a catalogue app that I created for Android which you can see it here ( https://play.google.com/store/apps/details?id=com.dynmk.bonbonup ) or here if you don't have an Android phone ( https://appetize.io/app/ctxjvzhu56fjh01dw89urmvq9g ) 我正在为我为Android创建的目录应用程序创建iOS应用程序,您可以在此处查看它( https://play.google.com/store/apps/details?id=com.dynmk.bonbonup )或者如果您没有Android手机, 在此处( https://appetize.io/app/ctxjvzhu56fjh01dw89urmvq9g

I want to create an iOS app that is similar to the one I did for Android using JSON files to retrieve the images and info of the product as you can see in the GridView in the Android app. 我想创建一个与我使用JSON文件检索Android的iOS应用类似的iOS应用,就像在Android应用的GridView中看到的那样。 I create the JSON files through a JSON editor online and then upload the files to a webhost file manager in which all images and JSON files are kept. 我通过JSON编辑器在线创建JSON文件,然后将文件上传到Webhost文件管理器,其中保留了所有图像和JSON文件。

My experience with Xcode is not too much and I am still in the learning curve by checking the tutorials in tree house and searching through the web. 我对Xcode的经验还不够多,通过查看树屋中的教程并在网上搜索,我仍然处于学习曲线中。

I have been reading about UICollectionView to create a GridView similar to the one I have in the Android app but my main question would be, will it work with the JSON files I have created? 我一直在阅读有关UICollectionView的信息,以创建一个与Android应用程序中的GridView类似的GridView,但我的主要问题是,它将与我创建的JSON文件一起使用吗?

Any suggestion would be appreciated, 任何建议将不胜感激,

Thanks! 谢谢!

Yea you can use JSON with Swift no problem. 是的,您可以将Swift与JSON结合使用。 There is a built in tool to serialize JSON. 有一个内置的工具可以序列化JSON。

let parsedDict = NSJSONSerialization.JSONObjectWithData(yourJSONData, options: nil, error: &error) as NSDictionary

https://developer.apple.com/library/prerelease/mac/documentation/Foundation/Reference/NSJSONSerialization_Class/index.html#//apple_ref/occ/clm/NSJSONSerialization/JSONObjectWithData:options:error : https://developer.apple.com/library/prerelease/mac/documentation/Foundation/Reference/NSJSONSerialization_Class/index.html#//apple_ref/occ/clm/NSJSONSerialization/JSONObjectWithData:options:error

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM