Apologies
You must be signed in to watch this lesson.
Episode Cell Details and Design with Interface Builder
Podcasts
Now that we've been able to successfully parse our XML feed into Swift Episode objects, we're ready to design our cells to represent the data nicely. In this lesson, I want to show you how to easily design the episode cell using a XIB file with Interface Builder. Similar to a previous lesson, we'll be utilizing the flexibility of UIStackView to help achieve the best layout for our view components.

Comments (8)
Kilian Hiestermann
6 years ago
Finally
Brian Voong
6 years ago
MaurixFx
6 years ago
Brian, why do you use XIB and not just code as in previous courses?
Brian Voong
6 years ago
MaurixFx
6 years ago
Hi Brian, I've learned a lot with you to program without storyboards, I'm building my own music app with just code without storyboards.
Brian Voong
6 years ago
meher
5 years ago
yes Brian many developers use xib and it is a must to know and thank you for showing us xibs
Alpensol
6 years ago
Hey Brian, Why do you use property observers in the Views to pass the data, why not use a View Model and show us how to do it ?
Brian Voong
6 years ago
Prabhdeep Singh Randhawa
6 years ago
to be honest this xib file is pain in arse.in coding we got way better control on things.
Brian Voong
6 years ago
meher
5 years ago
Thank you Brian i really wanted to learn this xib thing , now i know how to use it
Andres F Lozano
5 years ago
The tableCellView not draw correctly on the first load but when scroll to down and up then correctly draw
Brian Voong
5 years ago
Andres F Lozano
5 years ago
Hi brian, I solved it by setting a minimum height to the stackview. Thanks
Andres F Lozano
5 years ago
hi brian, I solved it by setting a minimum height to the stackview, greetings
meher
5 years ago
Hi Brian i have a question.When we have created a UITableViewCell programmatically without xibs in instagram course we did initialize inside UITableViewCell class: init() and required init() but when we create UITableViewCell with xib why don't you type the initializer inside UITableViewCell class?
Brian Voong
5 years ago
awjenson
5 years ago
Hi Brian, could you explain the init(feedItem: RSSFeedItem) inside the Episode struct? It seems really smart to build it that way, but I'm trying to understand how you knew to do it?
Brian Voong
5 years ago
compuuterjuice
5 years ago
Hi Brian, For some reason when I run my app it is ignoring the ui constraints. Just as a test I removed all the labels and tried to just center the episode image view using "horizontally in container" and "vertically in container" constraints. It looks fine in interface builder and will adjust correctly when resizing the cell but when I run the app, it pins it to the top left corner. Any idea what is going wrong here? I've spent over an hour trying to fix this with no luck.
Brian Voong
5 years ago
compuuterjuice
5 years ago
After some more testing I just fixed it by remaking the cell class and xib, but this time individually instead of using the cocoa touch class and checking create xib. After getting it to work by remaking it individually I tried again doing it the way shown in the video by making a cocoa touch class and checking create xib and I got the same issue again.. Seems like an Xcode bug?
Brian Voong
5 years ago
shanekulatunga
4 years ago
Hey man, I used a UIView and put both the image and stack in it - this helped me with the constraints issue, hope it helps you too!
HELP & SUPPORT