는 내가 배열처럼 설정 :배열에있는 개체에 액세스 하시겠습니까?
NSMutableArray *array = [[NSArray alloc] initWithObjects: @"Item 1", @"Item 2", @"Item 3", @"Item 4", @"Item 5", nil];
그리고 나는있는 NSString에서 그들을 표시 할 배열의 내용으로 접근하고 싶습니다하지만 예를 들어, 사용하는 것이 무엇인지 확실하지 오전 :
[NSString stringWithFormat:@"%c", [objectAtIndex:0]];
[NSString stringWithFormat:@"%c", [objectAtIndex:1]];
그러나 내 배열은 - (void)viewDidLoad
에 선언되어 있으며 - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
에 액세스해야합니다. 어떻게 액세스하여 NSString에 표시합니까?
'array'를 인스턴스 var로 만들어야합니다. http://stackoverflow.com/questions/6851963/question-about-instantiating-object/6852037#6852037 – David