Karthik Mitta
Karthik Mitta

Reputation: 335

Uibutton titlelabel shadowoffset property is not behaving properly in ios 7

I am using the below code to get a shadow to button title label.

theCuLabel.titleLabel.shadowColor=[UIColor blackColor];
theCuLabel.titleLabel.shadowOffset=CGSizeMake(-3.0,2.5);

In IOS 6 its working properly like below

But in IOS 7 its not working as expected like below

I didn't find solution for this, can any one tell me the solution or any update in IOS 7 that happened for this.

Thanks in Advance...

Upvotes: 0

Views: 1020

Answers (1)

AUK4SO
AUK4SO

Reputation: 411

[button setTitleShadowColor:[UIColor blackColor] forState:UIControlStateNormal];

this is the correct method to set the shadow color for a UIButton. I have tried this and is working in all versions.

Upvotes: 2

Related Questions