Giter Site home page Giter Site logo

snapchat-swipe-view's Introduction

πŸ‘‹ I'm Jake

πŸ€– I'm a programmer and Fractional CTO for early stage startups. I have over a decade of experience writing software, half of which I spent at Apple.

πŸ“ I'm currently based in Norfolk, VA

🌊 I enjoy surfing, hiking, and skateboarding

🎹 I also produce music

Startup Resources

πŸ“± Software Development for Non-technical Founders

βœ… Code Review for Startups

βš™οΈ Code review workflow

Recent Projects

πŸ‘¨β€πŸ‘©β€πŸ‘¦Β Grayrock - Co-parenting AI Mediator

πŸ’» 757 Build Weekend

🚨 founderpeptalks.com

πŸŽ›οΈ ML Synth Preset Generator

🎹 Filtering MIDI Pitch Bend Messages with Arduino

βœ‰οΈ Connect With Me

LinkedIn Twitter Medium

snapchat-swipe-view's People

Contributors

jakespracher avatar nbfuhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snapchat-swipe-view's Issues

hey

Hy,
I'm new in development and i would like modificated your project but i have not permission :/
Please give me the access to work in this projet
Sorry for my English, I'm french
Sincere

LeftVC is nil but still showing

Thank you for this library! I set the leftVC to nil because I only need the middle and right one, but it still allows me to swipe to the left (which shows an empty screen). How can I fix that?

Unwind from a presented view controller results in a blank 'black screen'

This is the code in my AppDelegate:

    let storyboard = UIStoryboard(name: "Main", bundle: nil)
    let middle = storyboard.instantiateViewController(withIdentifier: "DashboardStoryboardVC")
    let top = storyboard.instantiateViewController(withIdentifier: "CashoutStoryboardVC")
    let bottom = storyboard.instantiateViewController(withIdentifier: "AnalyticsStoryboardVC")
    let snapContainer = SnapContainerViewController.containerViewWith(nil,
                                                                      middleVC: middle,
                                                                      rightVC: nil,
                                                                      topVC: top,
                                                                      bottomVC: bottom)
    self.window?.rootViewController = snapContainer
    self.window?.makeKeyAndVisible()

I have modified your SnapContainerViewController to make the left and right as optional and top and bottom as mandatory view controllers. Now when I present a view controller via a segue from the middle view controller, after dismissing it through either an unwind segue or even a dismiss(), I get back a black blank screen.

I checked the rootViewController and see that it is still set to the snapContainer viewController as shown in the code above. Can you tell me what I'm doing wrong?

Just a question

How would you expand the top and bottom rows to have the same horizontal functionality as the middle row? For instance have 3x3 of view controllers and be able to swipe navigate both horizontally and vertically on each one.

Thanks,
Zach

View being unintentionally resized when appearing

One of my view controllers has a UILabel which is horizontally centered and has a fixed constrained from the top of the view controller:

image

When running the app and swiping to said view controller the UILabel will somehow rerender, i.e. the UILabel is initially show much closer to the top and then jumps into the right place. This only happens on the first view, afterwards it is always in the right position.

Oddly this only happens when a view is tied to the top, when I add another UILabel that has only constrains to the bottom or to the sides everything works as it should. Same for elements that are horizontally or vertically centered or collection views that span the whole view.

Any ideas what could be causing this or how to fix it? The closest I could find was described in this SO post

I'm using XCode9.

Stop Scroll

IS it possible to stop scrolling when Top view Controller appears(i am talking about left and right scrolling).

Is it possible to make transparent top view Controller..

Thanks in advance.

Initial Menu View

The middle VC keeps showing up first, even when I set another initial view controller.
Is there anyway I can make the bottom one show up first?

Change entry point && Move from top view to bottom view on scroll

Hi everybody,

I am new in swift and I am working on a project using this one.
Nice projet by the way !

I am wondering how could I force the app start on the top view ?
Moreover, I'd like to remove a view onclick on a button. Or prevent this view to appear.
Move from top view to bottom view on scroll in a way.

I tried a lot of thing but it does not work.

Could you please enlighten me a little here?

Thanks

Best regards,

Cannot set custom ViewController to Initial

Alright so let me just give you an overview of my system. I have a intial root view (home) that contains two buttons (sign up - login) where each of these buttons has its own viewcontroller. The LoginViewController has a method as such:

            if ((user) != nil) {
                let alert = UIAlertView(title: "Success", message: "Logged In", delegate: self,   cancelButtonTitle: "OK")
                alert.show()

                dispatch_async(dispatch_get_main_queue(), { () -> Void in
                    let viewController:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("View")
                    self.presentViewController(viewController, animated: true, completion: nil)
                })

            } else {
                let alert = UIAlertView(title: "Error", message: "Hmm, that doesn't seem  right. Try again.", delegate: self, cancelButtonTitle: "OK")
                alert.show()
            }

Where if login is successful it takes you to the ViewController w/ identifier "Main". Thing is that im having trouble setting the initial controller to the "home" view when using your approach, and i think this is due to the code you provided for the appDelegate. Even though I set the Home viewcontroller to initial, it still takes me to the middleviewcontroller. what am i doing wrong?

Button to scroll to viewcontroller

I have a button on the "middle" vc that should take the user to the "right" vc. Using a segue makes the swiping stop working. How would I scroll to the second vc with a button? The same functionality can be seen on snapchat where the bottom right button on the main vc takes you to the stories vc.

Bottom view allows for right and left scroll

I think this qualifies to be a bug. However, since I have heavily changed the original code there is a possibility that I have introduce something caused the problem.

In the VericalScrollViewController class the method outerScrollViewShouldScroll if I understand this correctly is responsible of disabling the horizontal scrolling on the outer vertical views (top and bottom). The method works fine for the top view since the condition scrollView.contentOffset.y < middleVc.view.frame.origin.y will catch anything that is placed to the top of the the middle (main) view. However, when it comes to the bottom one the condition scrollView.contentOffset.y > 2*middleVc.view.frame.origin.y is not accurate since it slightly exclude the bottom view. For example, if we arbitrarily assume that the y origin value for the main view is 6 and its height is 6 as well, then the y origin value for the bottom view would be 12. Given the condition 12 is equal to 2*6 thus the horizontal scrolling is enabled and one can go from the bottom view to the right and left ones. I think the safest is to change the conditional scrollView.contentOffset.y > 2*middleVc.view.frame.origin.y to scrollView.contentOffset.y > middleVc.view.frame.origin.y. Also, I think it is possible to change the whole condition to if scrollView.contentOffset.y != middleVc.view.frame.origin.y {return false} but I don't know if this will introduce navigation difficulties due to high accuracy.

Finally, thanks for sharing this.

Get current view

Hi everyone,

I am new in swift and I am working on a project using yours. I have noticed that the viewControllerLifeCycle is only called once.

So I am wondering how could I get the displayed view (the current view) ?
(swipe up / down)
I tried to print the scrollView.contentOffset.y but it's always equal to 0.0

Could you please help me

Thanks

Best regards,

how to use when embeded in a navigationcontroller?

I need my viewcontrollers to be embedded in a navigation controller so i embedded the middle viewcontroller. How would I get this to work inside it? Right now When i run the app it goes to the middle viewcontroller but not from the navigation controller.

Make top view appear over mid view

How can I make my top view appear over the mid view, instead of scrolling and replacing the current one that is in the view? So when scrolling down, the top view is falling over the mid view, so I have two controllers on each other(just like snapchat has when scrolling down in the camera view, so the current user info comes over the camera)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.