Hi,
In the Objective-C .m file, there is this definition at the top of the file.
`interface CCPanZoomControllerScale : CCScaleTo
{
CCPanZoomController *_controller;
CGPoint _point;
}
+(id) actionWithDuration:(ccTime)duration scale:(float)s controller:(CCPanZoomController*)controller point:(CGPoint)pt;
-(id) initWithDuration:(ccTime)duration scale:(float)s controller:(CCPanZoomController*)controller point:(CGPoint)pt;
`end
Here is the implementation for the two methods above:
@implementation CCPanZoomControllerScale
+(id) actionWithDuration:(ccTime)duration
scale:(float)s
controller:(CCPanZoomController*)controller
point:(CGPoint)pt
{
return [[[self alloc] initWithDuration:duration scale:s controller:controller point:pt] autorelease];
}
-(id) initWithDuration:(ccTime)duration
scale:(float)s
controller:(CCPanZoomController*)controller
point:(CGPoint)pt
{
[super initWithDuration:duration scale:s];
*controller = ;
*point = pt;
return self;
}
In the conversion guide, it is recommended that ID be replaced with bool which I did, however I’m not sure in the implementation how to replace this line? Due I just returned true or do I need to return the class CCPanZoomControllerScale?
return [[[self alloc] initWithDuration:duration scale:s controller:controller point:pt] autorelease];
also similar thing for these lines:
[super initWithDuration:duration scale:s];
*controller = ;
*point = pt;
return self;
Any help would be appreciated, thanks. I’ve been trying this for a few days with no luck.
thanks,
CCPanZoomController.h.zip (2.0 KB)
CCPanZoomController.m.zip (4.7 KB)