UISlider.value到UILabel.text SIGABRT ERROR

时间:2013-07-21 21:10:59

标签: ios objective-c uilabel uislider

我试图将UISlider的值显示在UILabel上,这是我在.m文件中的代码:

- (IBAction)wordLengthChanged:(id)sender {

int sliderWordValue = _wordSlider.value;

NSString *wordValueChanging = [[NSString alloc] initWithFormat:@"%d", sliderWordValue];

self.wordValue.text = wordValueChanging;
}


- (IBAction)livesChanged:(id)sender {

int sliderLivesValue = _livesSlider.value;

NSString *livesValueChanging = [[NSString alloc] initWithFormat:@"%d", sliderLivesValue];

self.wordValue.text = livesValueChanging;
}

这是我在.h文件中的代码..

@property (strong, nonatomic) IBOutlet UILabel *livesValue;
@property (strong, nonatomic) IBOutlet UISlider *livesSlider;
@property (strong, nonatomic) IBOutlet UILabel *wordValue;
@property (strong, nonatomic) IBOutlet UISlider *wordSlider;
- (IBAction)done:(id)sender;
- (IBAction)wordLengthChanged:(id)sender;
- (IBAction)livesChanged:(id)sender;

但唯一的问题是当我启动应用程序时,我收到错误线程1:信号SIGABRT

非常感谢任何帮助,谢谢!

0 个答案:

没有答案