Open minhchau273 opened 8 years ago
+1: nice work. I always expect the best from you. :shipit:
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. You did an excellent job, as always.
Some tiny bugs/suggestions:
imageView.contentMode = UIViewContentMode.ScaleAspectFill
for the business detail, perhaps?UITextView
instead and use yourTextView.dataDetectorTypes = UIDataDetectorTypePhoneNumber
. Then clicking the number will open the phone application.The if
statement here is unnecessary:
if delegate != nil {
delegate?.selectCell?(self, didSelect: iconView.image!)
}
Likewise, instead of:
let indexPath = tableView.indexPathForCell(dropDownCell)
if indexPath != nil {
}
You can just do
if let indexPath = tableView.indexPathForCell(dropDownCell) {
...
}
didSelectRowAtIndexPath
because you get a row selection highlight effect. 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.Great work. :rocket:
Ah, one more thing - instead of setting the frame on searchbar, you could have done something like:
navigationItem.titleView = UISearchBar()
Hi Sang,
navigationItem.titleView = UISearchBar()
but I cannot expand the search bar (or maybe I made something wrong :confused:). So I used setting frame.
Thanks a lot, Sang :blush:.
Hi @chug2k,
My app is completed. Please review :) Thanks.