Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS SDK 8 issue #30

Open
fahadhaq opened this issue Oct 19, 2014 · 1 comment
Open

iOS SDK 8 issue #30

fahadhaq opened this issue Oct 19, 2014 · 1 comment

Comments

@fahadhaq
Copy link

Hi,

I been using your control for one of my project. Since I started using sdk 8 its been crashing my app.. The issue is in SMPageControl - - (void)_renderPages:(CGContextRef)context rect:(CGRect)rect

The error is thrown when we try to navigate the images.

The code that is throwing the error

yOffset = [self _topOffsetForHeight:image.size.height rect:rect];
CGFloat centeredXOffset = xOffset + floorf((_measuredIndicatorWidth - image.size.width) / 2.0f);
[image drawAtPoint:CGPointMake(centeredXOffset, yOffset)];
indicatorRect = CGRectMake(centeredXOffset, yOffset, image.size.width, image.size.height);

Not sure how to fix it. I ended up using the code in the else statement. Seems to be working for me for now

Thanks in advance

@gloob
Copy link

gloob commented Oct 16, 2015

Same happening in this side.

I just negate the image if in line 185 https://github.com/Spaceman-Labs/SMPageControl/blob/master/SMPageControl.m#L185

  •    if (image) {
    
  •    if (!image) {
    

as commented in previous comment and its works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants