Code:
- (void)scrollViewDidScroll:(UIScrollView *)theScrollView
{
CGFloat width = self.scrollView.bounds.size.width;
int currentPage = (self.scrollView.contentOffset.x + width/2.0f) / width;
self.pageControl.currentPage = currentPage;
}
The x property here 'contentOffset.x' is listed in the documentation as geomagnetic data expressed as microteslas???
If this is the case, then dividing by a float promotes this unit value to a float also?
If this is the case, then how is an int returned? are the figures after the decimal point simply dropped?