0

I am trying to set up FXLabel https://github.com/nicklockwood/FXLabel in my project but i get an error i cant explain. I am using Interface Builder to manage the property.

.h File

@property (nonatomic) IBOutlet FXLabel *titleLabel;

.m File

self.titleLabel.shadowColor = [UIColor colorWithWhite:1.0f alpha:0.8f];
self.titleLabel.shadowOffset = CGSizeMake(1.0f, 2.0f);
self.titleLabel.shadowBlur = 1.0f;
self.titleLabel.innerShadowColor = [UIColor colorWithWhite:0.0f alpha:0.8f];
self.titleLabel.innerShadowOffset = CGSizeMake(1.0f, 2.0f);

.xbi File

enter image description here enter image description here

When trying to compile & run an error gets thrown in this line

self.titleLabel.innerShadowColor = [UIColor colorWithWhite:0.0f alpha:0.8f];

and the error looks like that:

Terminating app due to uncaught exception 'NSInvalidArgumentException', 
reason: '-[UILabel setInnerShadowColor:]: unrecognized selector sent to 
instance 0x6e56180'

i guess somehow the compiler thinks it is a UILabel instead of an FXLabel (which it clearly is). i cant find a work around it, any ideas what might be the problem or what i could try?

thanks in advance sebastian

2
  • 1
    add the following if ([titleLabel isKindOfClass:[FXLabel class]]) { NSLog(@"Is FXLabel"); } and post what is the value Jun 10, 2012 at 12:01
  • thank you for taking the time. somehow it solved itself after restarting xcode twice and re-adding the FXLabel files to my project... strange :) Jun 10, 2012 at 12:24

1 Answer 1

0

Clean & Build + Restarting XCode solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.