ツリーハウスのチュートリアルに従って、XCode でこの一般的な Object-C 警告メッセージが表示されます。
マイボタン機能
- (IBAction)buttonPressed:(UIButton *)sender {
NSUInteger index = arc4random_uniform(predictionArray.count);
self.predictionLabel.text = [predictionArray objectAtIndex:index];
}
私はNSUInteger行でそれを見ます、私はいくつかの同様のスタックオーバーフローを持っています.32ビット対64ビットの数値と型キャストについて話しているようですが、ここでそれを行う方法がわかりませんか?
私の予測配列
- (void)viewDidLoad
{
[super viewDidLoad];
predictionArray = [[NSArray alloc] initWithObjects:
@"It is certain", @"It is decidely so", @"All signs say YES", @"The stars are not aligned",
@"My reply is no",
@"It is doubtful",
@"Better not tell you now",
@"Concentrate and ask again",
@"Unable to answer now", nil];
// Do any additional setup after loading the view, typically from a nib.
}