1

我使用步进器来控制文本视图的字体大小,但是在我按下步进器两次之前不会触发任何操作。为什么会这样?

以下代码用于“mystepper”IBAction:

- (IBAction) changeFontSize:(id)sender
{
    [myStepper setMinimumValue:14.0]
    self.myStepper.maximumValue =20.0;

    CGFloat newSize = [myTextView fontWithSize:self.stepper.value];
    self.myTextView.font = newSize;
}
4

1 回答 1

1

检查您是否已将UIStepperRecieved Actions 连接到该changeFontSize:功能,Values Changed而不是Touches inside

于 2013-03-12T05:33:18.147 回答