Re: Paged UIScrollview is acting strange in iOS7?
Re: Paged UIScrollview is acting strange in iOS7?
- Subject: Re: Paged UIScrollview is acting strange in iOS7?
- From: Scott Andrew <email@hidden>
- Date: Mon, 17 Feb 2014 22:25:48 -0800
Seems our tool was not taking into account that the size needed to be halved out of our photoshop template. Some reason setting the frame and content size to 2x size of the view was causing the issue. One the scroll view was sized properly all is now working as expected.
Scott
On Feb 17, 2014, at 5:31 PM, Scott Andrew <email@hidden> wrote:
> I have some old gallery code that uses UIScrollView in a paged mode. We are trying to port the code to iOS7 but when we are getting strange behavior. In iOS7 we are constantly getting scrollViewDidScroll with weird offset of negative or some large offset that has huge exponents. Is there a known change in paged scrollviews in iOS7? Code is simple. The image content size is hard coded at 20 pages. The reality is its dynamic based on images coming and going.
>
> if (_imageScroller == nil) {
> CGRect scollViewRect = self.bounds;
> scollViewRect.size.width += IMAGE_PADDING;
>
>
> _imageScroller = [[UIScrollView alloc] initWithFrame:scollViewRect];
> CGSize contentSize = _imageScroller.bounds.size;
> contentSize.width *= 20;
> _imageScroller.contentSize = contentSize;
> _imageScroller.pagingEnabled = YES;
> _imageScroller.delegate = self;
> _imageScroller.clipsToBounds = YES;
> _imageScroller.showsVerticalScrollIndicator = NO;
> _imageScroller.showsHorizontalScrollIndicator = NO;
> _imageScroller.backgroundColor = [UIColor blueColor];
>
> [self addSubview:_imageScroller];
> }
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden