UIScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset: warning

I have two UITableViews on one view controller (view controller is their delegate). One of them will be depending on scrollViewWillEndDragging:withVelocity:targetContentOffset: (I want to do some kind of custom pagination). The other one have pagingEnabled property set to YES and when I try to scroll it for the first time XCode gives me warning

2012-09-07 16:46:39.672 test[17393:707] Stop offset can not be modified for paging scroll views

even though the code of the method is at the moment:

-(void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset

When I delethe the method scrollViewWillEndDragging:withVelocity:targetContentOffset: everything seems to be all right. Do I need to try to make another delegate (without that method) and make it UITableView with pagination delegate, or should I just don't worry?


The reason that you are seeing this warning in the console is because the method scrollViewWillEndDragging:withVelocity:targetContentOffset: has no effect when the scroll view has paging enabled. The documentation states the following.

This method is not called when the value of the scroll view’s pagingEnabled property is YES.

In other words, Xcode gives you a warning, but, as @tiguero indicates, it is best to check in each delegate method which table view (scroll view) is sending the delegate message.

As for the warning, you can ignore this warning since your controller is the delegate of both table views, one of which has paging enabled.

Need Your Help

Is it possible to make a halting function if you don't call it on itself?

recursion logic computation-theory halting-problem

The standard proof of of the impossibility of solving the halting problem is usually something like this

Why should I use HTTP basic authentication instead of username and password post parameters?

basic-authentication http-basic-authentication

I have an API endpoint https://www.example.com/api/authentication which takes username and password as input and returns an authentication token.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.