开发者

Passing value to method is always zero

开发者 https://www.devze.com 2023-01-05 00:18 出处:网络
i have a method in subclass of UIView like this -(void) reDrawPreviewWith:(UIColor *)textColor withGlowColor:(UIColor *)glowColor withGlowIntensity:(float)glowIntensity

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

精彩评论

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