Conversation
marijnschilling
commented
Jun 10, 2016
- Show an overlay when the section scrubber is being scrubbed
- Change the time for hiding the element to 2 seconds
- fix some small bugs/add some safety state checks for hiding the elements
- try to fix bug where the section scrubber doesn't go all the way to the bottom [WIP]
@@ -2,12 +2,18 @@ import UIKit | |||
|
|||
public protocol SectionScrubberDelegate { | |||
func sectionScrubber(sectionScrubber:SectionScrubber, didRequestToSetContentViewToYPosition yPosition: CGFloat) | |||
func sectionScrubberDidStartScrubbing(sectionScrubber: SectionScrubber) | |||
func sectionScrubberDidStopScrubbing(sectionScrubber: SectionScrubber) |
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.
💥
When I looked at it this morning it seemed to work fine! ✌️ (Classic) So if the PR is reviewed it can be closed! |
} | ||
|
||
public extension SectionScrubberDelegate where Self: UICollectionViewController { | ||
func sectionScrubber(sectionScrubber:SectionScrubber, didRequestToSetContentViewToYPosition yPosition: CGFloat){ | ||
print("contentoffset of the collectionview \(yPosition)") |
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.
Would you mind removing the logs?
@@ -111,12 +116,12 @@ public class SectionScrubber: UIView { | |||
self.longPressGestureRecognizer.cancelsTouchesInView = false | |||
self.longPressGestureRecognizer.delegate = self | |||
|
|||
let scrubberGestureView = UIView(frame: CGRectMake(self.containingViewFrame.width-44,0,44,self.viewHeight)) | |||
let scrubberGestureView = UIView(frame: CGRectMake(self.containingViewFrame.width - 44, 0, 44, self.viewHeight)) |
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.
What's 44? Would you mind making a named variable for it?
Besides some non named hardcoded numbers, this PR is looking pretty solid. Great job @marijnschilling 👏 |
let y = (containingViewFrame.height * percentageInContentView) + self.containingViewFrame.minY | ||
|
||
if y > 508.589 && y < 509.6 { | ||
|
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.
👀 what happened here?
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.
let y = (
too much whitespace? 😂