Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Feature/overlay #14

Merged
merged 13 commits into from Jun 20, 2016
Merged

Feature/overlay #14

merged 13 commits into from Jun 20, 2016

Conversation

marijnschilling
Copy link
Contributor

  • 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)
Copy link
Owner

Choose a reason for hiding this comment

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

💥

@marijnschilling marijnschilling changed the title Feature/overlay [WIP] Feature/overlay Jun 17, 2016
@marijnschilling
Copy link
Contributor Author

marijnschilling commented Jun 17, 2016

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)")
Copy link
Owner

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))
Copy link
Owner

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?

@3lvis
Copy link
Owner

3lvis commented Jun 20, 2016

Besides some non named hardcoded numbers, this PR is looking pretty solid. Great job @marijnschilling 👏

@marijnschilling marijnschilling merged commit 3fa30e2 into master Jun 20, 2016
@marijnschilling marijnschilling deleted the feature/overlay branch June 20, 2016 14:29
let y = (containingViewFrame.height * percentageInContentView) + self.containingViewFrame.minY

if y > 508.589 && y < 509.6 {

Copy link
Owner

Choose a reason for hiding this comment

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

👀 what happened here?

Copy link
Contributor

@elland elland Jun 21, 2016

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? 😂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants