Git Product home page Git Product logo

pullupcontroller's Introduction

Hey there!

I'm just a guy who loves to code and has been doing it since I was 13. I wore many hats (EM, tech lead, IC, rubber duck) and experimented with different technologies but in the past years I've been focusing mostly on iOS.

Personal website | Twitter | [email protected]

pullupcontroller's People

Contributors

avihu-via avatar chrishannah avatar filletofish avatar jarrydrichards avatar marioiannotta avatar maslovsa avatar rmuhamedgaliev avatar ryanmeisters avatar twodollarsesq 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pullupcontroller's Issues

how to show Fully popup Expand window ?

i have one doubt in this pod,
for eg
if i click But ticket button how to show popup window ?

Could you give the code for this ?

For hide i use
pullUpControllerMoveToVisiblePoint(pullUpControllerAllStickyPoints[0], animated: true, completion: nil)
this is working

but how to show window on event ?

Scrolling of inside scrollable element results in skipping

Hi,

I've just tried the example from the project, added just a few more elements to tableview that is inside and got this behaviour that I've recorded in video https://youtu.be/q4cU4kW-rcQ
It happens when panel is fully open, inside tableview is scrolled a bit up and then when you pulling it down it starts skipping when it reaches the end by pulling the panel to compensate. Maybe it's not well explained in words, but you can see it in video :)

Regards,

Aleksandar

Method to remove PullUpController?

Hi,

Is there a method like the open func addPullUpController(_ pullUpController: PullUpController) to remove the PullUpController from the main view?

I did found the following three lines to remove a subview and added them to the extension UIViewController in your PullUpController.swift file:

open func removePullUpController(_ pullUpController: PullUpController) {
    pullUpController.pullUpControllerMoveToVisiblePoint(0, completion:  { () in
        pullUpController.willMove(toParentViewController: nil)
        pullUpController.view.removeFromSuperview()
        pullUpController.removeFromParentViewController()
    })
}

Does this make sense? Could there be a conflict with the previously added gesture recognizer or constraints?

Best,
Tom

Use function instead of closures where possible

Haven't you thought about changing some closures to functions opened to overriding, so that you could make a few overrides? For example, I have a subclass of PullUpController ABC, which is superclass to another class CDF. To call some function from ABC on each call in CDF I have to do something like this for now.
image
Maybe I just don't know something.

In portrait app landscape required

I'm developing an application in which only portrait orientation is available. When I started using the library I found the problem. It seemed to me that I should not override the variable pullUpControllerPreferredLandscapeFrame.
But when I override only pullUpControllerPreferredSize and run my application I saw that the frame of the PullUpController was inherited from super definition of pullUpControllerPreferredLandscapeFrame. Something going wrong inside of controller. That was really confused for me.
I hope this feedback will help you make your library better.

current position property

i need to know the current position of the top of the drawer in order to move elements around in the containing viewController.
i would use the origin of the PullUpController frame.. but this seems hacky and i need observation on this value for real time changes.
also i can't access topConstraint.

i suggest adding a public function pullUpControllerTopPositionChangedTo(_ position: CGFloat) after changes to topConstraint are made.

Edit:
i can see that this was merged to the repo but reverted in #7
why was this feature removed?

Jagged, not smooth animation

The pullup animation seems like its going to pause at an invisible sticky point in the middle of the screen( Even though the sticky point array has only 2 points - Offset and PreferredHeight)
This makes the animation look incomplete and smooth
Any idea on how I can resolve this?

Remove PullUpViewController Animation not working

I have added a PullupController in a simple view controller added on UIButton click when I'm removing it through DidSelect Delegate of TableView in Pullup Controller view removed quickly without animation.

Landscape Orientation not working properly

I am implementing pullupcontroller in iPad with landscape and portrait orientations.but I just found the landscape is not working fine even i am unable to close the pullupcontroller to its initial point.Kindly can you help me in this one

Сan't hide/show controller outside.

As I understood documentation and code, you can only change pullupVC inside itself. However, there is a needs to hide/show it outside.
I think there should be delegate for that, like in default UIKit elements.

Bouncing `PullUp` when is going to hide

Should PullUp bounce when pullUpControllerMoveToVisiblePoint is called to 0.0 or is removed with animation? Looks a bit weird. Should that be handled by the library or better to use overriding of the bounce offset and exposed current point?

UPD: This is not bounce issue.

PullUpController with UITableViewController

Hi,

I encountered a problem after replacing the MapView of the example with a TableViewController:
https://vimeo.com/278366283

I forked it and uploaded my code changes here: https://github.com/tomaculum/PullUpController

My TableViewController is still in the MapViewController file.

Is this an expected error which will occur with every scroll view as view controller or is this my fault and there is an issue in my implementation of the TableViewController?

How to support ipad?

In Map.app on iPad, the PullUpController is located in the left top Instead bottom and its width does not equal the width of the screen. There are some differences between iPad and iPhone.
In iOS 13 or newer, Apple add SceneDelegate and the size of the scene will be changed by users. So, updating the frame when it changes is also important.

Does not work on iPhone XR, XS, XS Max simulator

When running on the iPhone XR Simulator, the view controller does not "drag" up slowly when using finger like it does on iPhone 7 Simulator.

Do not have iPhone XR/XS to determine if this is a simulator issue, or issue with code.

Few things to add, if possible

Hi. Love you lib, though there are two things I'm concerned about:

  1. Could you add some way to change animations, except for copying the file and changing them yourself? Overriding is not quite an option because not all the functions using animation are open.
  2. On bounce or spring animation, I'm using now, there is some free space in the bottom when animating. It looks a bit weird. For now, I'm fixing it adding some extra height in pullUpControllerPreferredSize, though it would be also nice if you could do something with it, or at least I will be grateful if you could give me some advice how to do it better.

Thanks :)

Edit: also seems logical to call willMoveToStickyPoint and didMoveToStickyPoint on moveToVisiblePointHandling.

How to increase the visible point height

With the latest pod update I cannot increase the visible point height. Previosuly I was able to increase with increasing previewOffsetValue. Now it has been removed.

override var pullUpControllerPreviewOffset: CGFloat {
       return 120
       //searchBoxContainerView.frame.height
   }

Bounce doesn't work

Bounce doesn't work when bottomConstraint = parentView.bottomAnchor.constraint(equalTo: view.bottomAnchor). It does work with less than constraint though then there is an issue I described in the previous topic.

Attaching a tableview, the swipe cell action doesn't work

Hi, I'm using the pullUpController with a tableview that is attached with the proper func.

I really have the need to add edit cel action that is performed with the swipe. But apparently there is something with the pullUpController that is blocking the swipe gesture

Enable attach/detach

The attach method in the current implementation must be called on the initial loading of the controller, and cannot be altered later programmatically.

For example, I want my table view to be attached to the pull up controller in all states except for the final (full-screen) state, where I want to be able to scroll the table view up and down without closing the pull up controller, so I detach the table view when it reaches this state. However, calling the attach method again when I leave this state does nothing, and the table view remains detached from the pull up controller.

Issues with spring animation and collection view

Hello again. At this moment you are probably already sick of me, though I found a few more problems. Sorry :P

  1. Now if you enable bounce, with collection view having enough objects to scroll, and start scrolling from some, not the top point, you will see this.
    I checked that is caused by custom Spring animation. Good news is that it can be fixed if you check if the duration is 0 and if so don't animate. Though probably it could be better if pullUpControllerAnimate won't just be called if duration is 0? 🤔
  2. That probably has nothing to do with you, but here is a thing: for scroll view not to scroll when reaching top like this I disable scroll in collection view when reaching the middle point, and enable back when reaching the top point. After that sometimes cells stop tapping at all, usually at the middle position. I tried detaching and attaching back the collection view from PullUpController as well, checked using Debug View Hierarchy and all objects are User Interactable. Just can't get what's going on. Probably some collection view issue, but it would be very nice if you could help in any way 🤔

Hoping that you don't hate me too much T.T,
Heltisace

Initial height as 0.x of Screen height and downward scrolling in Pull Up Controller and vice-versa

Hi,

I have used a pull-up controller for one of my projects. I am stuck in a situation:

  • When the view launches my pull up view height should be 0.6 * the screen height.

  • To achieve this I have changed the height from 50 to 0.6 * the screen height.

  • Now, my pull controller goes to the top,comes back to the given height.

  • From this height 0.6* the screen height, I want the controller to come down to the bottom and again go up to both the heights.

I am not able to change the logic to achieve this. How can we modify the logic so that we can achieve this transformation of this order:

On launch - 0.6 * screen height
Top scroll - 400
downward scrolling - 0.6 * screen height
downward scrolling - 50 (Not able to achieve)
upward scrolling - 0.6 * screen height
upward scrolling - 400

Please help me out as I need to implement it urgently and save me from rework

Keyboard hides UITextField.

Thanks for this wonderful library.

When the Keyboard is open, is there any way to keep up the UITextField/UITextView?

Showing PullUpController as opend

I just want to show the pullupcontroller as opened, when i launch first.
Then it must be normal, By pulling down, it will get down and vice versa?

Is there any property like that ?

PullUpView doesn't load properly when app loads

Hi, thanks for the great work you've done. But, when my app initially loads, the view is shown much lower than it should be when collapsed. Once I swipe up to open it, however, it returns to the correct height when collapsed and expanded. I have set the height of the collapsed view to be a view container I have in the PullUpView.

Unable to change PullUpController's height dynamically

I have a UILabel with numberOfLines set to 0. Its height constraint is >=30. I want to change pullUpController's height depends on its subview's height. I don't have any method to call after the layout is updated.

Hide PullUpController

How can i hide pullUPController. i need to hide and show it based on criteria but i am unable to remove or hide it .Please Help!

Rotating to landscape wrongly places the controller

Hey, thanks for the great library!

We're considering using it in an existing project. I seem to have managed to customize it fine so far (with rounded corners and shadow). But I cannot seem to set up the landscapeFrame. See this video: https://www.dropbox.com/s/8pxh1rdm56fs1fm/pulluppcontroller.mp4?dl=0 When the phone rotates, the controller is placed somewhere below the screen. When it is fully expanded, it does show up a bit, but its bottom is probably somewhere below the screen bounds. Also, it is aligned next to the left screen edge, even if it should have some trailing space.

I did override

override var pullUpControllerPreferredLandscapeFrame: CGRect

in my own ViewController inheriting from PullUpController. I gave it the value CGRect(x: 10, y: 20, width: 280, height: 100). Is there something else I am missing? Or maybe it is clashing with some existing code?

Expand and collapse programmatically?

Good day.

Tell me whether it is possible to expand and collapse the PullUpController without using GestureRecognizer, but by exiting the methods expand(), collapse()?

Update preferred height

Would be awesome to be able to adjust the preferred height will the pull up controller is already visible.

Avoid the need of subclassing PullUpController

I think it'd be better to use composition over inheritance for obvious reasons. In my case, working with a big project, it's hard to change your view controllers to inherit from a new type.
Since the code is abstracted in a nice way, it should be easily doable by moving all the logic to some type of manager. In fact, I've been playing with the code and I have it (mostly) working... I just ran into a couple of what seem small bugs.
I can open a PR once I clean up the code a bit, but wanted to get your take @MarioIannotta to see what you thought about this possible refactor.

Example app crashes

Install app from Xcode and will run well. but just stop app and open app directly from device crashes.

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.