How to pass and set a CGFloat by reference?
Posted
by mystify
on Stack Overflow
See other posts from Stack Overflow
or by mystify
Published on 2010-04-22T09:53:52Z
Indexed on
2010/04/22
10:03 UTC
Read the original article
Hit count: 177
objective-c
I want to make an method which takes an CGFloat by reference.
Could I do something like this?
- (void)doStuff:(CGFloat*)floatPointer
I guess this must look different than other object pointers which have two of those stars. Also I'm not sure if I must do something like:
- (void)doStuff:(const CGFloat*)floatPointer
And of course, no idea how to assign an CGFloat value to that floatPointer. Maybe &floatPointer = 5.0f;
?
Could someone give some examples and explain these? Would be great!
© Stack Overflow or respective owner