GithubHelp home page GithubHelp logo

Comments (11)

danielVebman avatar danielVebman commented on May 15, 2024 1

@ivanvorobei, I added a very simple sample project here.

from splarkcontroller.

ivanvorobei avatar ivanvorobei commented on May 15, 2024

For now no way change height after presentation. But I am try do it in next version. Many users ask about it.

from splarkcontroller.

danielVebman avatar danielVebman commented on May 15, 2024

Do you expect to add it sometime soon, or is might there be some kind of maybe imperfect workaround for the meantime? I would love to use your beautifully done framework in the app I’m currently developing.

from splarkcontroller.

ivanvorobei avatar ivanvorobei commented on May 15, 2024

Now I am develop it for my app Debt:
https://itunes.apple.com/app/id1446635818

For start I am added dynamic height in app.

from splarkcontroller.

danielVebman avatar danielVebman commented on May 15, 2024

That looks very good! When do you expect to merge your enhancement with the main SPLarkController branch?

from splarkcontroller.

ivanvorobei avatar ivanvorobei commented on May 15, 2024

I am try do it in ‘June’.

from splarkcontroller.

danielVebman avatar danielVebman commented on May 15, 2024

Awesome I’ll keep an eye out!

from splarkcontroller.

danielVebman avatar danielVebman commented on May 15, 2024

Hi! Do you have any estimate as to when the enhancement might be ready?

from splarkcontroller.

danielVebman avatar danielVebman commented on May 15, 2024

I did the enhancement myself and published it in my repository, here. The change is actually quite simple. In SPLarkPresentationController, I added:

/// update the current height of the controller
public func updateHeight(_ newHeight: CGFloat) {
    guard let containerView = containerView else { return }
    
    UIView.animate(
        withDuration: 0.45,
        delay: 0,
        usingSpringWithDamping: 1,
        initialSpringVelocity: 1,
        options: [.curveEaseOut, .allowUserInteraction],
        animations: {
            self.presentedView?.frame.origin.y = containerView.frame.height - newHeight
            self.presentedView?.frame.size.height = newHeight
            self.snapshotViewContainer.transform = CGAffineTransform(translationX: 0, y: -newHeight)
        }
    ) { _ in
        // I simplified `self.height` into a { get set } variable that basically keeps track of state
        self.height = newHeight 
    }
}

The version in my repository also contains some other simplifications (although the access control is nonexistent).

from splarkcontroller.

ivanvorobei avatar ivanvorobei commented on May 15, 2024

@danielVebman you can create simple project with changeable height and send me for test?

from splarkcontroller.

ivanvorobei avatar ivanvorobei commented on May 15, 2024

@danielVebman thanks for your research and time!
You do cool job! I am added changeable height in new version 1.1.
Also I am added example project.

I now seem to understand what I had to offer to make you a PR, sorry if this was important to you.

Many thanks!

from splarkcontroller.

Related Issues (11)

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.