Kodeco Forums

RWDevCon 2016 Session 102: Beginning iOS

Time to start developing for iOS! In this session, you’ll build an app from scratch and learn to assemble your user interface with Storyboards and Auto Layout, display large datasets with Collection Views, and fetch images and JSON data from a server. These core skills will help no matter what path your iOS development takes!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1305-rwdevcon-2016-session-102-beginning-ios

Question about this DEMO. I was able to get it to work like it does in the demo (2) but I have one column of books (all 50), but not the 2 columns as you have in the demo. Not sure what happened but I did this exactly as it was done during the video. I would like to have 2 columns or at least figure out why I have just one.

Hi @knokio, thanks for your question. I’m glad you have it working. The demo has two columns because of the Item Size. There is a step with these instructions:

Select the Collection View Flow Layout and, on the Size Inspector, change the Item Size to 150 for both Width and Height.

Does changing the Item Size change anything for you?

thanks for getting back to me Matt, I have that set correctly but it still shows the single column.
I tried to attach my zipped project but it wouldn’t let me.

figured out what was wrong Matt…it was one of the constraint values on the collection view, it was way off.

Glad you found it, @knokio!

I have spent the last hour trying to figure out what is wrong. I can not seem to get the end of demo 2 to work. Whenever I tap on the cells, it does not push to the new screen.

Is there anything that I can be missing? I have checked the StoryBoard ID and class of the DetailViewController and they are all there and set correctly.

I even copied line for line the code to implement the navigation controller but, it is still not working. I’ve compared it to the finished demo and it is exactly the same.

Edit: I tried to log the row that is selected in didSelectItemAtIndexPath and nothing is being logged there while the finished app does log the row selected. Could something be preventing me from selecting the row? (I did connect the dataSource and delegate to the ViewController)

Edit2: So after some digging I found the culprit to be in the Tap Gesture Recognizer that was added earlier on in the demo.

The app was working, it would only push to the tapped cell upon a long hold.

I had to disable the “Cancels touches in view” inside the Tap Gesture Recognizer which I missed in the tutorial. I guess these are the problems that are encountered if it isn’t living under the view of everything else.

Great tutorial, I learned a valuable lesson from this (: