Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image animation #42

Closed
jackpaster opened this issue Jan 16, 2017 · 23 comments
Closed

image animation #42

jackpaster opened this issue Jan 16, 2017 · 23 comments

Comments

@jackpaster
Copy link

@pborreli @e28eta @mRs- @sgl0v @CalebeNP I have an image animation where an image inside a cell goes to fill the entire view of the view controller. Do you mind helping me. Because it almost looks like the images overlaps the image of the detail page view controller and then disappears.

@jackpaster
Copy link
Author

it looks off

@JustinM1
Copy link

check #31, might have to do with the zPosition.

@jackpaster
Copy link
Author

@JustinM1 it didn't help. could i please Skype with you to show you

@jackpaster
Copy link
Author

@JustinM1 I'm using this with dynamic cells, and the animation is not working properly if i set it with dynamic cells. I tried using the basic hero animation from your project in mine, but how would i use hero with dynamic cells

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 2, 2017

@jackpaster Are you still having this problem. I got time today, I can take a look at your problem.

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 5, 2017

Close due to inactivity.

@lkzhao lkzhao closed this as completed Feb 5, 2017
@jackpaster
Copy link
Author

@lkzhao Yes I am could you please take a look at it

@jackpaster
Copy link
Author

@lkzhao sorry I couldn't talk to you sooner, I was away

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 5, 2017

Can you post a screenshot or upload a example project? Others might be able to benefit if they experiences the same problem.

@lkzhao lkzhao reopened this Feb 5, 2017
@jackpaster
Copy link
Author

@lkzhao sure, I'm still away on vacation with my family, and I will have access to my computer tomorrow. Is it fine if I post the example project tomorrow.

@jackpaster
Copy link
Author

@lkzhao Thank you so much, I've been struggling with this problem for a month now and I've had no solution

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 5, 2017 via email

@jackpaster
Copy link
Author

@lkzhao Thank you

@jackpaster
Copy link
Author

@lkzhao I am so sorry, my flight was delayed and I only got back last night. I will send it to you by tonight. I hope I didn't scare you off from helping me. Thanks hope you understand

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 8, 2017

Yea np

@jackpaster
Copy link
Author

@lkzhao How should i show it to you. Do you want me to email the project to you or what should I do.

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 9, 2017 via email

@jackpaster
Copy link
Author

Example.zip
Here is my zip file of the project. My Skype is jackpaster22. I would like to sit down with you and have a quick conversation. what I'm looking to do is have a the same animation as the basic view controller you have in your hero. I want to have the image expand the way it does in snapchat. And what I'm looking for is when you hold down on a cell for more than two seconds. The cell shrinks to 4/5 the size its at the way it does on snapchat. You can definitely do both with your project but the project is not working with me. Can you help me and Skype with me please.

@jackpaster
Copy link
Author

@lkzhao the project is up. Would you like me to take a video about the cell animation of it shrinking and expansion to a detail view controller, to show exactly what I'm talking about.

@jackpaster
Copy link
Author

jackpaster commented Feb 10, 2017 via email

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 10, 2017

Yes, I have. Unfortunately I couldn't skype with you. It is a bit inconvenient.

For the expanding transition, it looks weird because you have multiple views with the same heroID blue inside your table view controller. You should only have one. It should be set during tableView(_:didSelectRowAt:)

For you shrink animation, you have to do some custom UIView animation. There are plenty of tutorials available online, here is one: https://www.raywenderlich.com/2454/uiview-tutorial-for-ios-how-to-use-uiview-animation

I have also noticed some autolayout constraints issues in your TableViewCell2.xib. Ideally you shouldnt have fixed height constraint on cell's subviews. They should be determined by the cell's height.

@lkzhao lkzhao closed this as completed Feb 10, 2017
@jackpaster
Copy link
Author

could you fix it and show me what it would look like

@lkzhao
Copy link
Collaborator

lkzhao commented Feb 10, 2017

ExampleTableViewController.swift

    // MARK: - Table view data source
    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "TablesIdentifier", for: indexPath) as! TableViewCell2
      cell.Image2.heroID = "\(indexPath.item)"
      return cell
    }
    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let controller = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "yes23") as! ViewController2
        controller.view.heroID = "\(indexPath.item)"
        present(controller, animated: true, completion: nil)
    }

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

No branches or pull requests

3 participants