-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-21 Meetup5 Improve Todo cell UI #26
Conversation
ivancr
commented
Oct 2, 2018
- Added completion date property to Item Model
- Added an icon for complete and incomplete state.
- Added label to display completed date
- Setup labels layout to vertical when dynamic type size is large.
- Removed autoresizing masks form xibs
- Cleaned up code and added pragma marks
- Added completion date property to Item Model - Added an icon for complete and incomplete state. - Added label to display completed date - Setup labels layout to vertical when dynamic type size is large. - Removed autoresizing masks form xibs - Cleaned up code and added pragma marks
GH-20 PR needs to be merged before we can merge this one. |
Next time submit the pull request on the branch it depends on. You're requesting to merge it into master. |
@@ -2,10 +2,12 @@ import Foundation | |||
|
|||
struct Item: Codable { | |||
let title: String | |||
var completionDate: Date? | |||
var isComplete: Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect isComplete
to be calculated property of completionDate
.
This can introduce inconsistency between those two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great point @stemberamichal. I'll change that when I get a chance. Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created an issue (GH-30) to deal with this. I don't want to introduce it in this PR that is focused on other topic.
tableView.estimatedRowHeight = 44 | ||
tableView.rowHeight = UITableViewAutomaticDimension | ||
tableView.estimatedSectionFooterHeight = 80 | ||
tableView.sectionFooterHeight = UITableViewAutomaticDimension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you replace UITableViewAutomaticDimension
?
I have looked through the changes and could not find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UITableViewAutomaticDimension
is set by default when done programmatically.
https://developer.apple.com/documentation/uikit/uitableview/1614852-rowheight
The default value of rowHeight is automaticDimension. Note that if you create a self-sizing cell in Interface Builder, the default row height is changed to the value set in Interface Builder
tableView.rowHeight = UITableViewAutomaticDimension | ||
tableView.estimatedSectionFooterHeight = 80 | ||
tableView.sectionFooterHeight = UITableViewAutomaticDimension | ||
tableView.keyboardDismissMode = .interactive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's so cool.
Have been using UIScrollViewDelegate
to dismiss keyboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I love finding these tricks. I try to find the simplest way that uses the least code possible.