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

fatal error: unexpectedly found nil while unwrapping an Optional value #10

Closed
zzndino opened this issue Aug 12, 2014 · 4 comments
Closed
Labels

Comments

@zzndino
Copy link

zzndino commented Aug 12, 2014

My code like below :

    var label89val: LTMorphingLabel!
    label89val = LTMorphingLabel(frame: CGRectMake(20, 10, 80, 80))
    label89val.delegate = self
    label89val.morphingEffect = .Scale
    label89val.text = "0"
    label89val.textColor = UIColor.whiteColor()
    label89val.font = UIFont.boldSystemFontOfSize(23)
    label89val.setNeedsDisplay()
    self.view.addSubview(label89val)

always crash at

   label89val.text = "0"

and get this error

fatal error: unexpectedly found nil while unwrapping an Optional value

@lexrus lexrus added the bug label Aug 14, 2014
@lexrus
Copy link
Owner

lexrus commented Aug 14, 2014

The set method of text property is a little tricky. I'll fix it later.
Try move this line to the end.

@MichMich
Copy link

I've got the same problem. I absolutely like the concept, but unfortunalty the current code is unusable. Any idea when this is fixed?

@lexrus lexrus closed this as completed in 50fdd24 Sep 15, 2014
@lexrus
Copy link
Owner

lexrus commented Sep 15, 2014

@zzndino @MichMich I guess it's fixed. Please try again. Thanks.

@MichMich
Copy link

Yes, it's fixed. Thanks!

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

No branches or pull requests

3 participants