1. 레이블에 표시될 내용
title.text = @"This is Contents";
2. 폰트의 종류 및 크기를 지정
title.font = [UIFont systemFontOfSize:28.0];
3. 레이블의 색상설정
title..textColor = [UIColor redColor];
4. 레이블의 수평 / 수직 / 왼쪽 / 오른쪽 맞춤 / 가운데 맞춤
title.textAlignment = UITextAlignmentCenter;
typedef enum { UITextAlignmentLeft, UITextAlignmentCenter, UITextAlignmentRight, } UITextAlignment;
5. 레이블의 내용이 범위를 벗어날때 어떻게 처리 할것인가
title.lineBreakMode =
typedef enum { UILineBreakModeWordWrap = 0, // 단어 단위로 제한을 둔다 UILineBreakModeCharacterWrap, // 문자를 단위로 제한을 둔다. UILineBreakModeClip, // 사각의 영역을 기준으로 제한을 둔다. UILineBreakModeHeadTruncation, // 문장의 앞부분에 "..."말줄임표를 넣는다. UILineBreakModeTailTruncation, // 문장의 뒷부분에 "..."말줄임표를 넣는다. UILineBreakModeMiddleTruncation, //문장의 중간에 "..."말줄임표를 넣는다. } UILineBreakMode;
6. 라벨의 내용이 범위를 넘었을때 크기를 조절 할것인가
title.adjustsFontSizeToFitWidth = YES / NO;
'개발 > Objective-C' 카테고리의 다른 글
[Objectiv-C] Google Code에 있는 ParseKit을 연결하기 (0) | 2010.08.29 |
---|---|
[Objective-C] tokenizerWithString in ParseKit (0) | 2010.08.29 |
[Objectiv-C] Collection에 대해서 (0) | 2010.08.29 |
[Objective-C] Memory 관리 (0) | 2010.08.29 |
SEl, @selector (0) | 2010.08.29 |