ninjinkun / NJKScrollFullScreen

Scroll to full screen like Facebook app
MIT License
936 stars 92 forks source link

uitableview delegate methods #2

Closed bkoc closed 10 years ago

bkoc commented 10 years ago

uitableview delegate methods are not getting called after setting tableview delegate to scroll proxy.

e.g.

In the demo project after calling

[self.tableView reloadData];

I thought that there is something wrong with method forwarding implementation.

But by calling

        [((UITableViewController <UITableViewDelegate>*)(self.tableView.delegate)) tableView:self.tableView heightForHeaderInSection:0];

instead of reloading tableview that method is forwarded correctly. Hence i can confirm that method forwarding is working.

It might be that uitableview has it's own delegate check mechanism internally and ignores to call delegate methods with current implementation. It sees an object conforming to UIScrollViewDelegate but not UITableViewDelegate.

cannyboy commented 10 years ago

Have the same problem.. Seems similar to this issue on another library (methods not being forwarded): https://github.com/IcaliaLabs/ILRemoteSearchBar/issues/1

ninjinkun commented 10 years ago

Sorry I missed to close.

ninjinkun commented 10 years ago

Thanks to reporting. I tried to fix this problem on https://github.com/ninjinkun/NJKScrollFullScreen/pull/3 . Please check my pull request.

ninjinkun commented 10 years ago

I released v0.2 including fixed issue and made update pull request to CocoaPods. Thanks @bkoc @cannyboy !