Me1000/RLPageControl — pull request #6 by jmcd (2013-05-23 15:06:21+00:00)
Title: Current page limiting refactor

I moved the code where the current page is limited (was inline MIN/MAX functions) to a new method used by the property setter, because:

1) It was possible for clients of the page control to set invalid values
2) A math error with unsigned ints was causing current page to be set to a large number instead of zero

Previously when currentPage was zero, the code

[self setCurrentPage:MAX(self.currentPage - 1, 0)];

would result in the currentPage being set to (NSUInteger)-1, which is large.