Giter Site home page Giter Site logo

Comments (5)

sidster-io avatar sidster-io commented on May 3, 2024

Play with the duration is "didSelectRowAtIndexPath". My example:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

    // Expands cell by unfolding if cell is folded and vice-versa
    let cell = tableView.cellForRowAtIndexPath(indexPath) as! SpotTableViewCell

    let forRowSpotInfo = self.spotList[indexPath.row]

    var duration = 0.0
    if cellHeights[indexPath.row] == closeCellHeight { // open cell

        cellHeights[indexPath.row] = openCellHeight
        if let locationData = self.userLocation {

            cell.unfoldedCellInfo(forRowSpotInfo, userLocationData: locationData) // Unfolded Cell Info

        }
        cell.selectedAnimation(true, animated: true, completion: nil)
        **duration = 0.25** < Modify this value and see the response
        cell.configureContainerView(true) // ContainerView Shadow

    } else {// close cell

        cellHeights[indexPath.row] = closeCellHeight
        cell.selectedAnimation(false, animated: true, completion: nil)
        **duration = 0.55** < Modify this value and see the response

        cell.setDefaultLabelTitleForWeatherAndTimeButton()

        // Delaying shadow clearing process using GCD
        let seconds = 0.25 
        let delay = seconds * Double(NSEC_PER_SEC)  // nanoseconds per seconds
        let dispatchTime = dispatch_time(DISPATCH_TIME_NOW, Int64(delay))

        dispatch_after(dispatchTime, dispatch_get_main_queue(), {

            cell.configureContainerView(false)

        })

    }

from folding-cell.

the-freshlord avatar the-freshlord commented on May 3, 2024

I am having a similar issue where my container height is 378 and I have the itemCount is 1. Any solution?

from folding-cell.

the-freshlord avatar the-freshlord commented on May 3, 2024

Also @Sidrock28 how does the animation duration solve this?

from folding-cell.

ahegazi18 avatar ahegazi18 commented on May 3, 2024

this didn't solve the issue

from folding-cell.

0ber avatar 0ber commented on May 3, 2024

Need to set height constraint to 340
image 2018-03-27 at 12 19 22 pm

from folding-cell.

Related Issues (20)

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.