나는이 (가)하는 .m 파일에 다음을 수행하여이 배열에 레스토랑 개체를 추가하려고 헤더 파일 이제는 NS 배열에 객체를 추가 할 수 없습니다
@property (nonatomic, strong) NSMutableArray *resPool; //pool of restaurants
에 정의 된 레스토랑의 배열을 가지고 :
id restaurant = [[Restaurant alloc] initWithResName:resName]
[self.resPool addObject:restaurant];// add the restaurant to the res pool array
이 코드를 실행할 때 resName NSArray는 비어 있습니다. 나는 내가 뭘하고 있는지 확신하지 못한다. 나는 객관적인 C를 고르려고 노력하고있다. 누군가가 나를 도와 줄 수 있을까?
꽤 흔한 일 :
이 추가보십시오. 고마워요! – SivaDotRender