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 4.2.1 on iPhone 3G #12

Open
mhausherr opened this issue Dec 13, 2010 · 7 comments
Open

iOS 4.2.1 on iPhone 3G #12

mhausherr opened this issue Dec 13, 2010 · 7 comments

Comments

@mhausherr
Copy link

I've a bug on iPhone 3G (ot 3Gs or 4) with the iOS 4.2.1 with the setFrame method of AFItemView.m
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [6.19918e-06 nan]'

I fixe it by adding a test

  • (void)setFrame:(CGRect)newFrame {
    CGSize size = newFrame.size;
    if(isnan(size.height)||isnan(size.width)){
    newFrame = CGRectMake(newFrame.origin.x, newFrame.origin.y, 0, 0);
    }
    [super setFrame:newFrame];
    [imageView setFrame:newFrame];
    }

I don't understand the real cause of this issue but it works, so i don't commit this code now. Tell me if you want.

Hope it's help.

@wsidell
Copy link

wsidell commented Jan 4, 2011

Great fix!

@agfa555
Copy link

agfa555 commented Jan 26, 2011

excellent!!!!
this was driving me crazy...
thanx!!!!

@elektrojunge
Copy link

I had the same issue. THX for fixing it! Does anyone know the reason for this issue?

@koukeisei
Copy link

It's wonderful!!!
THX mhausherr!!!

@snobear
Copy link

snobear commented Mar 29, 2011

Thank you so much, mhausherr. For some reason I did not run into this issue when building and running on the device with Xcode. I only encountered it when I was doing an Ad Hoc distribution of my app (using Build and Archive) and running from an ipa file. Sounds like its an iOS 4.2 issue.

@Deger
Copy link

Deger commented Jul 4, 2011

Thanks, mhausherr.

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

8 participants
@Deger @koukeisei @wsidell @elektrojunge @mhausherr @agfa555 @snobear and others