draw - iOS - Can't pass UIColor * as a parameter? -


I want to pass UIColor * as a parameter, but my program crashes on [paramColour set]. I know that I can pass in a string and select UICLL from there, but I am wondering why it does not work. Help would be greatly appreciated. - (zero) drawRooftopAtTopPointof: (CGPoint) paramTopPoint color: (UIColor *) paramColour lineJoin: (CGLineJoin) paramLineJoin {/ * Set the color that we want to use to draw the line * / [Paracler Set]; / * Get current graphics reference * / CGContextRef currentContext = UIGraphicsGetCurrentContext (); / * Join the line * / CGContactTilelineJoine (Drukkontext, Paraminezoin); / * Set width for lines / CGContactStyleLine (CurrentContax, 3.0F); / * Start the line at this point * / CGTTtexMovePoint (currentcontact, paramoutpoint.x-10, paragraphpoint.i +8); / * And end it at this point * / CGContextAddLineToPoint (CurrentContact, ParamountPoint.X, ParamountPoint.A); To make Rooftop * / CGContactAdlineTablepoint (the currentcontact, paratortpoint.X + 10, ParatPoint.I + 8), extend the line to the second point; / * Use the current color of the theme to attract lines / CGContextStrokePath (currentContext); / * Insert text on the roof using a black color * / [[UIColor blackcolor] set]; }

This is my draw in the underlined view which triggers this drawing function.

  - (zero) drawRect: (CGRect) rect {for (int i = 0; i   

And here is the definition of arrow class.

  #import & lt; UIKit / UIKit.h & gt; @ Class arrow; @Intefaş Arrow: NSBKem {UIColor * colorOfArrow; CGPoint Aeroplanment; } @property (nontomic, raten) uicollore * coloroffero; @property (non-metic) CGPent airplane; @end    

Thanks for the help,

I decided To do this properly, with the constructor and everyone, the new code here is now working

arrow.h

  #import & lt; UIKit / UIKit.h & gt; @ Class arrow; @Intefaş Arrow: NSBKem {UIColor * colorOfArrow; CGPoint Aeroplanment; } @property (nanatomic, strong) UIcolor * colored afero; @property (non-metic) CGPent airplane; + (Arrow *) MakeRao with Coal: (UICLOR * *) Parcelolar and post: (CP point) expansion; @end   

arrow.m

  #import "aeroH" @ assimilation arrow @ synthesis color off arrow; @ Synthesis arrow placement; + Make (Arrow *) * Rarovith Collar: (UICLOR * *) * Paramcolor and Post: (CP point) expansion {Aero * Tempero = [[Arrow Alok] IIT]; [TempArrow Set ColorOfArrow: paramColour]; [TempArrow set arrow placement: expansion]; Return temporary; } @end    

Comments