UISliderをfontSize[(IBAction)font1および(IBAction)font2]に接続する可能な方法。これはコードです
.h
@interface ViewController : UIViewController
{
IBOutlet UISlider* fontSizeSlider;
IBOutlet UITextView* textView;
}
-(IBAction)sliderValueChanged:(UISlider*)sender;
-(IBAction)font1;
-(IBAction)font2;
@end
.m
-(IBAction)sliderValueChanged:(UISlider*)sender
{
textView.font = [UIFont fontWithName:@"??????" size:sender.value];
}
-(IBAction)font1{
textView.font = [UIFont fontWithName:@"Heiti TC" size:18];
}
-(IBAction)font2{
textView.font = [UIFont fontWithName:@"Marker Felt" size:18];
}
-(IBAction)font1; //[UIButton]
-(IBAction)font1; //[UIButton]
-(IBAction)sliderValueChanged; //[UISlider]