티스토리 툴바



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) 
   {
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle 
    reuseIdentifier:CellIdentifier] autorelease];
    }
    cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"image%d.jpg", indexPath.row+1]];
    cell.textLabel.text = [data objectAtIndex:indexPath.row];
    cell.detailTextLabel.text = @"row subtitle";
 

    return cell;
}

UITableViewCellStyleDefault: 보충 설명이 없음
UITableViewCellStyleSubtitle: 보충 설명을 하위로 작게 표시
UITableViewCellStyleValue1: 상세 텍스트를 파란색으로 셀의 오른쪽에 배치
UITableViewCellStyleValue2: 상세 텍스트를 파란색으로 셀의 왼쪽에 배치  


UIImageView * imageView: 이미지 뷰
UILabel * textLabel: 셀의 텍스트 레이블
UILabel * detailTextLabel: 셀의 보충 설명
UIView *accessoryView: 셀의 엑세서리 

Xcode 4.2 에서 하위 버젼 호환을 위해
프로젝트의 Deployment Target 를 3.2 로 맞추고
xib 들도 모두 File Inspector (option + command + 1) > Document Versioning 들을 3.2로 맞추고
빌드중 제목의 경고문구를 맞이했다.

http://stackoverflow.com/questions/7625731/xcode-4-2-warnings-when-dropping-nav-controller-on-tab-bar-in-ib
의 jkira 답변을 보면

MainWindow.xib 를 선택 > 경고를 뿌리는 컨트롤러 선택 > Attribute Inspector (option + command + 1) > View Controller 섹션 > Presentation > [  ] Defines context 체크 해제. 

오~ 경고 사라졌다. 

참고로,
모든 경고들을 보려면 Issue Navigator (command + 1)
에서 각 경고나 오류들을 클릭하면
바로 해당하는곳으로 이동한다. 
저작자 표시
// Customize the appearance of table view cells.
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
        // 테이블셀 오른쪽 끝에 > 나타내기
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    ......
    //cell.textLabel.text = @"row";
    return cell;
}
1 2 3 4 5  ... 114 

글 보관함

카운터

Total : 47,078 / Today : 26 / Yesterday : 65
get rsstistory!