0
NSMutableArray(以下の文字列の1つ)内のオブジェクトをランダムに選択し、ランダムに選択したオブジェクトの内容をUITextViewのコンテンツにする方法を知りたいと思います。以下は私のコードです:NSMutableArrayの内容でUITextViewを更新する
NSMutableArray *quotes = [[NSMutableArray alloc] initWithObjects:
@"Text 1",
@"Text 2",
@"Text 3",
@"Text 4",
@"Text 5",
@"Text 6",
@"Text 7",
@"Text 8",
@"Text 9",
@"Text 10",
nil];
textView.text = // And then I would like to know how to randomly select one of the objects within the quotes Array
ありがとうございました!
をしかし答えは正しいものであると完璧に動作します - しばらく待つより良い練習ですか? –
ヘッドアップありがとう:) –