subinspathilettu / SJSegmentedViewController

MIT License
334 stars 126 forks source link

Scrolling on view is working but not work for Tableview. #136

Closed sami110107 closed 4 years ago

sami110107 commented 4 years ago

When I scroll on UIView it scrolls the whole view but not responding on UITableView of CollectionView. How can I fix this issue?

abhinav2014 commented 4 years ago

You'll have to use this. suppose u have a viewcontroller named YourViewController, which contains someTableView:

extension YourViewController: SJSegmentedViewControllerViewSource { func viewForSegmentControllerToObserveContentOffsetChange() -> UIView { return someTableView // outlet of your tableview which u want to scroll } }

Basically you have to conform to SJSegmentedViewControllerViewSource, which makes the segmentedviewcontroller to know that your viewcontroller's view which contains tableview is to be scrolled.

sami110107 commented 4 years ago

Many many thanks for your support. Solved it. 👏

On Thu, Oct 10, 2019 at 2:31 PM Abhinav Dobhal notifications@github.com wrote:

You'll have to use this. suppose u have a viewcontroller named YourViewController, which contains someTableView:

extension YourViewController: SJSegmentedViewControllerViewSource { func viewForSegmentControllerToObserveContentOffsetChange() -> UIView { return someTableView // outlet of your tableview which u want to scroll } }

Basically you have to conform to SJSegmentedViewControllerViewSource, which makes the segmentedviewcontroller to know that your viewcontroller's view which contains tableview is to be scrolled.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/subinspathilettu/SJSegmentedViewController/issues/136?email_source=notifications&email_token=ANNFBOLG2JEO7G3HQ3JOVH3QN3R6VA5CNFSM4I66GX6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA3MQ2I#issuecomment-540461161, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANNFBOIYWLLINHBPCHPSPE3QN3R6VANCNFSM4I66GX6A .

-- Disclaimer: The content of this message(including any attachments)  is confidential. If you have received it by mistake, please inform us by an email reply and then delete the message. It is forbidden to copy, forward, or in any way reveal the contents of this message to anyone. The integrity and security of this email cannot be guaranteed over the Internet. Therefore, the sender will not be held liable for any damage caused by the message.