Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在objective c中使用stepper在UitextView中缩放文本_Ios_Objective C_Uitextview_Xib_Uistepper - Fatal编程技术网

Ios 如何在objective c中使用stepper在UitextView中缩放文本

Ios 如何在objective c中使用stepper在UitextView中缩放文本,ios,objective-c,uitextview,xib,uistepper,Ios,Objective C,Uitextview,Xib,Uistepper,我在Xib中有一个UiTextView和UiStepper,我想通过在objective c中使用stepper来缩放textView的内容。感谢您缩放(缩放)文本 它会缩放字体大小,然后使用textViewDidChange中的代码重新计算内容大小。请尝试以下操作: [stepper addTarget:self action:@selector(stepperValueChanged:) forControlEvents:UIControlEventValueChanged]; steppe

我在Xib中有一个UiTextView和UiStepper,我想通过在objective c中使用stepper来缩放textView的内容。感谢您缩放(缩放)文本

它会缩放字体大小,然后使用
textViewDidChange
中的代码重新计算内容大小。请尝试以下操作:

[stepper addTarget:self action:@selector(stepperValueChanged:) forControlEvents:UIControlEventValueChanged];
stepper.tag = indexPath.row;
stepper.stepValue = 1;
stepper.continuous = YES;
stepper.minimumValue = 0;
stepper.maximumValue = 10;
选择器

- (IBAction)stepperValueChanged:(UIStepper *)sender 
{
  NSUInteger value = sender.value;
    txtView.font = [UIFont systemFontOfSize:value];
}

看到这一点,当我在objective c@Anbu.Karthiki中单击+图标进行放大,单击-图标进行缩小时,我正在尝试使用stepper缩放文本视图的大小。只提到stepper@维韦克·盖布
- (IBAction)stepperValueChanged:(UIStepper *)sender 
{
  NSUInteger value = sender.value;
    txtView.font = [UIFont systemFontOfSize:value];
}