Git Product home page Git Product logo

Comments (8)

rafalkitta avatar rafalkitta commented on June 16, 2024 2

Thank you for your response. You're right.
Also @rabzu Demo in Swift pull request #20 was very helpful.

extension BLKDelegateSplitter: UICollectionViewDelegate {
}

from blkflexibleheightbar.

trevisthomas avatar trevisthomas commented on June 16, 2024 1

I'm pretty new to Swift and iOS and I spent a lot of hours to come to the conclusion that the break was with this class. Modifying the BLKDelegateSplitter class to conform to the UITableViewDelegate protocol fixed it for me. I have the demo running now with a Swift based view controller.

from blkflexibleheightbar.

phausero avatar phausero commented on June 16, 2024

Yeah, I think all you have to do is extending BLKDelegateSplitter with the protocol you want to use. In your case UITableViewDelegate.

from blkflexibleheightbar.

rafalkitta avatar rafalkitta commented on June 16, 2024

@trevisthomas could you show your BLKDelegateSplitter conformation to the UITableViewDelegate?

from blkflexibleheightbar.

trevisthomas avatar trevisthomas commented on June 16, 2024

Just edit the BLKDelegateSplitter.h file. Replace the @implementation declaration at line 29 with:

@interface BLKDelegateSplitter : NSObject <NSObject, UITableViewDelegate>

from blkflexibleheightbar.

tgyhlsb avatar tgyhlsb commented on June 16, 2024

Hi rafalkitta,

I tried with your extension so I don't get the compiler error. But at run time, the BLKDelegateSplitter does not forward the calls to any of its sub-delegates.

Have you modify anything else to make it work ? I use Swift 2.0

from blkflexibleheightbar.

tgyhlsb avatar tgyhlsb commented on June 16, 2024

It appeared I have to make a strong reference to the splitter because tableView.delegate is weak. Why splitter was just deallocated by ARC...

Works perfectly now, great component !

from blkflexibleheightbar.

harshilkotecha avatar harshilkotecha commented on June 16, 2024

This is working fine in swift 4 also
add this extension to solve this issue this is work for me

extension BLKFlexibleHeightBarBehaviorDefiner :UITableViewDelegate{
    
}

from blkflexibleheightbar.

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.