Custom Cells and Multiple Views
Today I finished the iOS Intermediate chapter. We learned this past week about table view cells. What if we want different labels for every single view cells? We then have a custom cell. The only difference is to have a custom cell file (or put it in your view controller with the appropriate class) that contains all the features you have on the view. I also learned today how to segue into other views and why delegates are now so important.
We can connect two different view controllers via navigation controllers. But there are multiple ways to present new controllers. We do everything modally because this allows us to go back as well as go forward to other controllers whereas if we do just show, we can only move back. There are two things that we need when we move between view controllers:
- Protocols that contains delegates
- Prepare/perform segue functions
I really struggled with this concept of passing variables and functions through the prepare segue. In the beginning I couldn't connect them but I realized that they must be declared in the second controller.
No comments:
Post a Comment