2012-05-16 2 views
2

나는 내가 구현 한 다른 크기 (세 가지 유형)의 상자 (항목)와 그리드보기을 수행하려고이다른 크기로 조정 된 다른 항목 크기로 표보기를 만드는 방법은 무엇입니까?

https://github.com/tanin47/UIGridView

하지만 캔트 정말 세포의 세 가지 유형을하고 그들을 정렬 gridview.

이 같은 다른 세포를 호출하는 것을 시도하고있다 : 내가 전화를 오른쪽으로하고

- (UIGridViewCell *) gridView:(UIGridView *)grid cellForRowAt:(int)rowIndex AndColumnAt:(int)columnIndex 
{ 
    NSMutableDictionary *dic = [testArray objectAtIndex:rowIndex * 2 +columnIndex] ; 


    if ([[dic objectForKey:@"type"] isEqualToString:@"one"]) { 
     Cell *cell = (Cell *)[grid dequeueReusableCell]; 

     if (cell == nil) { 
      cell = [[Cell alloc] init]; 
     } 
     NSLog(@"dic:%@",dic); 
     // cell.label.text = [NSString stringWithFormat:@"(%d,%d)", rowIndex, columnIndex]; 
     cell.label.text = [dic objectForKey:@"handa"]; 
     return cell; 

    } 
    else { 
     CellTpye2 *cell = (CellTpye2 *)[grid dequeueReusableCell]; 

     if (cell == nil) { 
      cell = [[CellTpye2 alloc] init]; 
     } 

     NSLog(@"dic:%@",dic); 
     // cell.label.text = [NSString stringWithFormat:@"(%d,%d)", rowIndex, columnIndex]; 
     cell.label.text = [dic objectForKey:@"handa"]; 
     return cell; 
    } 


} 

M이는이 격자보기에서 수행 할 수 있습니다.

도움을 주시면 감사하겠습니다.

+0

아무 진행 상황이 있습니까? – Rizon

+0

아니, 나는 동적 인 다른 높이와 함께 특별한 경우를 나타 내기 위해 그것 위에서 20의 다른 층과 함께 단지 1 개의 세포를 만들었다. – IphoneBites

답변

0

삽입 업데이트 문제가 늦게 업데이트되었습니다.

관련 문제