I answered a rather similar question a few weeks ago. The answer to this question has been edited for this question.
, NSInvocation . , , , , .
, :
-(void)plotPoly:(Polygon *)poly WithColor:(UIColor *)color AndFill:(BOOL)filled;
:
-(void)plotPoly:(Polygon *)aPoly color:(UIColor *)aColor filled:(BOOL)filledFlag;
.
, , , -invoke.
- :
PolyPlotter.h:
@interface PolyPlotter : NSObject
{
Polygon *poly;
UIColor *color;
BOOL filled;
}
+ plotterWithPoly: (Polygon *) aPoly color: (UIColor *) aColor filled: (BOOL) filledFlag;
- (void) plot;
@end
PolyPlotter.m:
@interface PolyPlotter()
@property Polygon *poly;
@property UIColor *color;
@property BOOL filled;
@end
@implementation PolyPlotter
@synthesize poly, color, filled;
+ plotterWithPoly: (Polygon *) aPoly color: (UIColor *) aColor filled: (BOOL) filledFlag;
{
PolyPlotter *polygonPlotter = [PolyPlotter new];
polygonPlotter.poly = aPoly;
polygonPlotter.color = aColor;
polygonPlotter.filled = filledFlag;
return [polygonPlotter autorelease];
}
- (void) plot;
{
}
@end
. PolygonPlotter plot - .
, , ? , -plot, , :
- (void) plot: (UIView *) aViewToPlotIn;
- .
, , , NSInvocation. , PolygonPlotter -, .