Skip to content
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

Intergation custom table view to vc #4

Merged
merged 6 commits into from
Nov 3, 2022

Conversation

igover
Copy link
Owner

@igover igover commented Nov 1, 2022

No description provided.

@igover igover requested a review from IvanKrim November 1, 2022 10:55
Copy link
Collaborator

@firuz1844 firuz1844 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Про магические числа на твое усмотрение, но комментарии бы не помешали. К timeOnly и minDate

@@ -22,4 +22,15 @@ extension Date {
func year() -> Int {
return Calendar.current.component(.year, from: self)
}

func timeOnly() -> Float {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

честно сказать, так и не понял, что этот метод возвращает... Float... Time... В каких единицах измерения возвращается timeOnly?

if let yToScroll = timeline.currentTimeYPosition {
setTimelineOffset(CGPoint(x: contentOffset.x, y: yToScroll - padding), animated: animated)
}
let timeToScroll = Date().timeOnly() - 4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут еще какие-то магические 4 единицы чего-то отнимаются...

}

private func setTimelineOffset(_ offset: CGPoint, animated: Bool) {
let yToScroll = offset.y
let bottomOfScrollView = contentSize.height - bounds.size.height
let bottomOfScrollView = contentSize.height - bounds.size.height + 30
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Опять магическая цифра)

@@ -43,6 +43,8 @@ public final class TimelinePagerView: UIView, UIGestureRecognizerDelegate, UIScr
}

public var autoScrollToFirstEvent = false

public var minDate: Date?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавить бы комментарий с описанием, что это за минимальная дата и для чего она используется

@igover igover merged commit d08e1e1 into master Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants