Open jemiahlee opened 8 years ago
:+1: nice work. The primary challenge of this homework was to learn how to use UITableView to manage a complex form, establish communication between view controllers, and apply the correct Auto Layout constraints to build adaptive UI's that work across many different screen sizes and orientations. If you haven't already, we recommend going back and running your homework again while rotating the device / simulator to ensure your AutoLayout constraints function as expected.
For the drop-downs table, you can try this solution. This is the way I usually use to implement this behavior.
isExpanded = false
. At the beginning, the table is collapsed. In the function tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath)
, if isExpanded
, set the first row's height = 44 (it depends on you) and return 0
for the rest rows, else
return 44
for all rows.tapGesture
for the first row. When tapping on this row, set isExpanded = true
, then reload the table view. But either way, I would recommend you use the reloadSections withRowAnimation
function - that way you can get a nice animation of the rows coming in, instead of the hard open/close.I hope this can help you :smile:
We have a detailed Project 2 Feedback Guide which covers the best practices for implementing this assignment. Read through the feedback guide point-by-point to determine ways you might be able to improve your submission. You should consider going back and implementing these improvements as well. Keep in mind that one of the most important parts of iOS development is learning the correct patterns and conventions.
If you have any particular questions about the assignment or the feedback, feel free to reply here or email us at support@codepath.com
This was a challenging assignment, congrats on completing it successfully!
/review @codepathreview
I had a really hard time trying to figure out how to do the drop-downs. I spent several hours working on that part of things and never got there. I embedded the UITableView within the UITableViewController and I seemed to have difficulty getting IB to let me connect the label in the cell for the embedded UITableView to a Cell class. So..I'm still not entirely certain how to do that part of things.
Also, I was a little bummed that at least one of the highlighted apps of my classmates didn't do that part of the assignment; I could have gotten other things done if I had punted on that part of things, but I thought it was important since it was a new thing (and segmented controls weren't).