2014-04-19 4 views
0

iPhone 용 Xcode 5 사용.
MVC (로컬 배열 아님)의 array에서 tableview의 데이터를 표시하려고합니다. 그러나 데이터가 테이블에 표시되지 않고 빈 그리드로 나타납니다.
storyboard (펜촉 없음) 및 custom cell (TableViewController 아님)을 사용하고 있습니다.
내가 누락 된 부분을 알려 주실 수 있습니까? 미리 감사
의 코드는 다음과 같습니다스토리 보드 및 맞춤형 셀의 MVC 배열에있는 테이블에 데이터가 표시되지 않습니다.

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection: (NSInteger)section { 

NSLog (@"array count is %i", listRecipes.recipeArray.count);   
return [listRecipes.recipeArray count]; 
} 

또한

-(UITableViewCell)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 
    static NSString cellIdentifier = @"ListCellIdentifier"; 
    MYCustomListCell* listCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 
    NSString* dataString = listRecipes.recipeArray[indexPath.row]; 
    listCell.listName.text = dataString; 
    listCell.imageView.image = [UIImage imageNamed:dataString]; 
    return listCell; 
} 
+0

도움이 될만한 코드를 보여주십시오. – Larme

+0

listRecipes.recipeArray.count는 무엇을 반환합니까? 0이 아닌가요? – rdelmar

+0

이것은 0을 출력합니다 : NSLog (@ "배열 개수는 % i", listRecipes.recipeArray.count); – ici

답변

0

당신은이 질문에 대한 몇 가지 코드를 추가해야합니다.

내 생각 엔 당신이 UITableViewDataSource의있는 tableView에 대한 구현을 제공하지 않은 것입니다 : numberOfRowsInSection : 가능성이 배열에서 객체의 수를 반환해야합니다

.