Open anwol004 opened 9 years ago
Yeah, I think all you have to do is extending BLKDelegateSplitter with the protocol you want to use. In your case UITableViewDelegate.
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.
@trevisthomas could you show your BLKDelegateSplitter conformation to the UITableViewDelegate?
Just edit the BLKDelegateSplitter.h file. Replace the @implementation declaration at line 29 with:
@interface BLKDelegateSplitter : NSObject <NSObject, UITableViewDelegate>
Thank you for your response. You're right. Also @rabzu Demo in Swift pull request https://github.com/bryankeller/BLKFlexibleHeightBar/pull/20 was very helpful.
extension BLKDelegateSplitter: UICollectionViewDelegate {
}
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
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 !
This is working fine in swift 4 also add this extension to solve this issue this is work for me
extension BLKFlexibleHeightBarBehaviorDefiner :UITableViewDelegate{
}
Hello i try to use this repo but this is not working in swift.
Gives an problem with the tableview.delegate downcast, has anyone solution for this problem?
Greetz