开发者

Passing value to method is always zero

i have a method in subclass of UIView like this

-(void) reDrawPreviewWith:(UIColor *)textColor withGlowColor:(UIColor *)glowColor withGlowIntensity:(float)glowIntensity

I am calling this method by

float glowIntensity = 30.0f;
[preview reDrawPreviewWith:[UIColor co开发者_JS百科lorWithRed:red green:green blue:blue alpha:1.0]
                             withGlowColor:[UIColor colorWithRed:red green:green blue:blue alpha:1.0]
                         withGlowIntensity:glowIntensity];

but inside body of reDrawPreviewWith i am always getting glowIntensity=0


I tried to test your code with a debugger, and it seems to pass the glowIntensity parameter correctly. Are you sure there is no other place where reDrawPreviewWith: gets called? Perhaps in a wrong way?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜