我正在尝试在 C4Stepper 上使用我自己的图像。我是这样设置的
@implementation C4WorkSpace{
C4Stepper *theStepper;
C4Image *stepperBackground;
C4Image *stepperPlus;
}
-(void)setup {
//load backgroundimage
stepperBackground=[C4Image imageNamed:@"icon_zoom.png"];
stepperBackground.width=100;
//load incrementImage
stepperPlus=[C4Image imageNamed:@"icon_zoom_plus.png"];
stepperPlus.width=stepperBackground.width/2;
//setup stepper
theStepper=[C4Stepper stepper];
[theStepper setBackgroundImage:stepperBackground forState:NORMAL];
[theStepper setIncrementImage:stepperPlus forState:NORMAL];
theStepper.center=self.canvas.center;
[self.canvas addSubview:theStepper];
}
2 个图标看起来像这样: 奇怪的是,画布上出现的东西看起来像这样:! zoomStepperImages 有什么特殊要求吗?一定的尺寸还是什么?