Coder Social home page Coder Social logo

accordiontableviewcontroller's People

Contributors

klevison 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

Watchers

 avatar  avatar  avatar  avatar

accordiontableviewcontroller's Issues

Objective C

Could you give me the equivalent code to install it in Objective C?

Remote calling instead of gesture recogniser?

Hi, nice work by the way...

After much messing about I was hoping to remotely call an event to change the open section of the accordion - but can't figure it out for whatever reason. No doubt it is something really simple... Given you wrote it - is there any chance you could give me a clue or point me in the right direction to achieve this please? I have the triggering event setup and tested, just can't get it to fire and change the cell.

Thanks in advance if you are able to find a moment to help me out with this.

Cheers,

Stewart.

tableview endupdate() crash

Hello there,

I got application crash every time when I try to close the previous section and open a new section.

Crash happened at line tableview.endupdate() in below code ,

 fileprivate func sectionHeaderViewOpenedAtIndex(_ index: Int) {
        
        let section = sections[index]
        section.open = true
        
        var indexPathsToInsert = [IndexPath]()
        var indexPathsToDelete = [IndexPath]()
        indexPathsToInsert.append(IndexPath(row: 0, section: index))

        if openedSectionIndex != NSNotFound {
            let previousOpenSection = sections[openedSectionIndex]
            let praviousSectionHeaderView = tableView.headerView(forSection: openedSectionIndex) as! SectionHeaderView
            praviousSectionHeaderView.disclosureButton.isSelected = false
            previousOpenSection.open = false
            indexPathsToDelete.append(IndexPath(row: 0, section: openedSectionIndex))
            delegate?.accordionTableViewControllerSectionDidClose(previousOpenSection)
        }
        
        tableView.beginUpdates()
        tableView.insertRows(at: indexPathsToInsert, with: openAnimation)
        tableView.deleteRows(at: indexPathsToDelete, with: closeAnimation)
        tableView.endUpdates()

        
        let sectionRect = tableView.rect(forSection: index)
        tableView.scrollRectToVisible(sectionRect, animated: true)
        
        openedSectionIndex = index
        
        delegate?.accordionTableViewControllerSectionDidOpen(section)
    }

error : Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete row 0 from section 1 which only contains 0 rows before the update'

Please let me know if there is any update in the library or if I miss something in above logic.
Any help will be appreciated :)

pod install outputs Unable to find a specification for `AccordionTableViewController`

My PodFile is the following.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'
pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper.git', :branch => 'swift-2.0'
pod 'SlideMenuControllerSwift'
pod 'AccordionTableViewController'

When I pod install I get Unable to find a specification for AccordionTableViewController
I tried platform: '9.0' but still the same.
Maybe the use_frameworks flag?

Refresh all section data

Hello there,

I want to reload all section data because everytime i expand the section, it'll call network and put the response from network into button title.

In my viewdidload, i call a func called reloadAllData() and in my func reloadAllData() there's some code like this

func reloadAllData() {

     if dataProducts.isEmpty == true {
        
        self.requestSpinnerData()
        
    } else {
   
        oneSectionAlwaysOpen = false
        sections = allSetions()
        delegate = self
        openAnimation = .fade
        closeAnimation = .fade
    
    }
 }

When i segue into this view, it'll go to self.requestSpinnerData() because i'll use the data that i get from requestSpinnerData() for the section.title. and then it'll call reloadAllData() again for executing code inside else

And what i get is empty (there's no section inside my viewcontroller"
How i can reload all section after i call another function?

Thankyou

Xib Support

Hi! Amazing Work!

Is any option to use this framework with xibs? I'm not using SB.

Thanks a lot!

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.