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. This is my draw in the underlined view which triggers this drawing function. And here is the definition of arrow class. Thanks for the help, I decided To do this properly, with the constructor and everyone, the new code here is now working arrow.h arrow.m - (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]; }
- (zero) drawRect: (CGRect) rect {for (int i = 0; i
#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
#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
#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
Post a Comment