Giter Site home page Giter Site logo

iOS 10 rotation issue about cardstackcontroller HOT 7 OPEN

akotulu avatar akotulu commented on September 13, 2024
iOS 10 rotation issue

from cardstackcontroller.

Comments (7)

victorBaro avatar victorBaro commented on September 13, 2024

Thank you @akotulu for reporting. I haven't tried it in landscape mode. I am not sure how to tackle the problem, to be honest. Cards are a good option in portrait mode, making them wider and shorter for landscape mode... I don't really like it. I have seen iOS10 ipad takes the card to the right side, keeping its ratio (height/width).
I didn't understand this part: "when I open cards on different view controller, it shows the last image of it not the current one".
Can you upload a screenshot, code snippet or something so I can understand? Thanks.

from cardstackcontroller.

akotulu avatar akotulu commented on September 13, 2024

I made a video, this happens all the time if you have custom table view cell with constraints.

Video

from cardstackcontroller.

victorBaro avatar victorBaro commented on September 13, 2024

I think you are misusing the control. Can you turn on slow animations on the simulator (cmd + t) and record another video?
Looks to me that you are presenting the same viewcontroller again underneath the card, that's wrong.

Can I see the code for didSelectCellAtIndexPath: ?

from cardstackcontroller.

akotulu avatar akotulu commented on September 13, 2024

Ok, set the self.present(self.stackController, animated: false, completion: nil) to false, animation flicker went away. But when scrolling to top and opening a new tab and closing it, shows wrong rows in background.

Video2

from cardstackcontroller.

victorBaro avatar victorBaro commented on September 13, 2024

This is weird.. the CardStackController generates a screenshot on viewWillAppear. I guess you are not dismissing the controller.
There is a public property called automaticallyDismiss which defaults to true (make sure you have not set it to false).
If your problem persists after setting automaticallyDismiss to true, you might have found a bug..
Another thing you can try is to set yourself as a delegate of the stackController, and make sure didFinishDismissingCardController is called.
I will review the code in the meantime, but I have never had this problem before.

from cardstackcontroller.

akotulu avatar akotulu commented on September 13, 2024

I haven't changed this property and delegate is called. Forced it to true, but nothing changed.

fileprivate let stackController: CardStackController = CardStackController()
private func setup()
{
    self.stackController.delegate = self
    self.stackController.cardScaleFactor = 0.9
    self.stackController.firstCardTopOffset = 20
    self.stackController.topOffsetBetweenCards = 20
    self.stackController.verticalTranslation = -20
    self.stackController.automaticallyDismiss = true
}
let taskController = self.storyboard?.instantiateViewController(withIdentifier: "\(TaskViewController.self)") as! TaskViewController

taskController.delegate = self

self.present(self.stackController, animated: false, completion: nil)
self.stackController.stack(viewController: taskController)
extension TasksTableViewController: CardStackDelegate
{
    func dismiss() {
        self.stackController.unstackLastViewController()
    }
}

from cardstackcontroller.

nmdias avatar nmdias commented on September 13, 2024

Hi also had an issue where it would always show the the image of the first transition.

I was keeping a strong reference to a CardStackController. After I started instantiating a new instance, instead of reusing the same, the problem went away.

Thank you for this great framework 🥇 very clean api, super simple, saved me hours.

from cardstackcontroller.

Related Issues (7)

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.