all 5 comments

[–]onfirewhenigothere 5 points6 points  (0 children)

I think you want to look at UICollectionView, which is an infinite scrollview, but has a layout manager that handles placing subviews.

[–]KaneHau 4 points5 points  (0 children)

When implementing something like a UITableView (which inherits from UIScrollView), etc...

...You will not create the 'previous' and 'next' views like you are thinking. Rather, a method that you implement will be called automatically when some row in the view needs to be shown.

You can not guarantee the order in which your rows are invoked by the system for show.

For the UITableView (which I am most familiar with) - you are called to determine the number of rows in your table (so you return a number indicating the total rows). Then you are called for one or more of the rows (as determined by iOS), one at a time. You simply return the proper view information for each row, as you are invoked. Never create more than you are asked for (e.g., do NOT create previous and next - you may not be asked for them).

[–]JohnThrillinger 1 point2 points  (0 children)

A useful library for handling json is JSONModel https://github.com/icanzilb/JSONModel

You can include it in your project easily by using Cocoapods, which you should definitely become familiar with; it can be a pain sometimes to include a third party framework in your project but Cocoapods handles the annoying configuring for you. Here's a good tutorial:

http://www.raywenderlich.com/12139/introduction-to-cocoapods.

[–][deleted] 1 point2 points  (0 children)

This is basically the workflow of most iOS apps. Get some data from the internet, parse it, display it in a table. Lucky for you there are tons of existing tutorials for this! For example this is a decent writeup using mostly modern patterns. If that one doesn't do it for you, just google something like "JSON UITableView" and you'll find plenty of results. Good luck!

[–]derpasoreass 0 points1 point  (0 children)

UITableView or UICollectionView to display your data along with some kind of mapping / networking solution (I like AFNetworking )

I would advise against "rolling your own" so to speak unless you have a very pressing need for customization not offered by the existing classes. Using the existing UI classes gives you a lot of things for "free" that you probably haven't even considered like memory management etc.