PagingKit
PagingKit copied to clipboard
Disable swipe for content view
Hi,
I have used this library and content inside is tableview with slider.
when scroll slider, content view also scrolling.
I want to disable scrolling on content view so that i can use slider.
Thanks
Hi @shaikshabana :)
You mean you are using UISlider in your contents? I recommend that you set false to "delaysContentTouches" in UIScrollView.
https://developer.apple.com/documentation/uikit/uiscrollview/1619398-delayscontenttouches
override func viewDidLoad() {
super.viewDidLoad()
// contentViewController is a PagingContentViewController's object.
contentViewController.scrollView.delaysContentTouches = false
}
PagingContentViewController uses UIScrollView object to scroll the contents. When "delaysContentToucnes" is false, controls in your contents take priority of scrolling.
If you have any trouble, feel free to ask.
Hi ,
Thank you for the inputs it helped me,
while using this framework i have got a bug
Let's take SimpleViewController , where we are having datasource and ContentTableViewController,
When i keep a break point, ContentTableViewController is getting called twice and one the tab of last element of menu,viewDidLoad is not getting called.
I have some data to be loaded in last menu item,with the above bug it couldn't achieve that.
Can you help me how to resolve this bug: Where for the first element viewDidLoad getting called twice and for last element viewDidLoad is not getting called.
Hi, @shaikshabana
I'll check later.
Hi, @shaikshabana
SimpleViewController in the sample directory doesn't call viewDidLoad() of ContentTableViewController twice. Could you make a property to set index on ContentTableViewController and print it in viewDidLoad(). ( or debug like this: https://www.bignerdranch.com/blog/xcode-breakpoint-wizardry/ ) You can see when each view controller is loaded.
Because PagingContentViewController has an own lifecycle, it loads only two or three view controller at once. It doesn't load the next content until scrolling.
If you make SimpleViewController by yourself, could you show me the code? (on this issue or e-mail)
Thanks.