0
嘗試將用戶在文本字段中寫入的內容分割爲一個包含所鍵入內容中的字符的數組。使用字符串方法將單詞分隔爲字符
這裏是我迄今爲止
-(IBAction) generateFlashNow:(id)sender{
[textField resignFirstResponder];
NSString *string1 = textField.text;
NSString *string2 = [string1 stringByReplacingOccurrencesOfString:@"" withString:@","];
NSArray *arrayOfLetters = [string2 componentsSeparatedByString:@","];
NSLog(@"Log Array :%@", arrayOfLetters);
//NSArray *imageArray = [[NSArray alloc] init];
NSLog(@"Log First Letter of array: %@",[arrayOfLetters objectAtIndex:0]);
}
我在做什麼錯?