| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- 3d
- Flash
- 영어
- 게임
- smartfoxserver
- Build
- XML
- Game
- Mac
- path
- 경로
- Ane
- unity
- sdk
- unity3D
- iphone
- builder
- 아이튠즈
- class
- 단축키
- file
- 배열
- Android
- texture
- 태그를 입력해 주세요.
- swf
- AIR
- ios
- flash builder
- AS3
Archives
- Today
- Total
상상 너머 그 무언가...
UILabel 추가하기 본문
특정 뷰에 라벨을 생성해서 붙이는 방법
UILabel *testLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 30)];
testLabel.center = viewCtrl.view.center;
testLabel.text = @"라벨테스트";
testLabel.textAlignment = NSTextAlignmentCenter; // 글씨 중앙정렬
testLabel.backgroundColor = [UIColor clearColor]; // 배경색 투명으로
testLabel.textColor = [UIColor whiteColor]; // 글씨색 흰색으로
[viewCtrl.view addSubview:testLabel];
[testLabel release];
이렇게 하면 200*30 사이즈의 라벨이 생성되고 중앙정렬에 투명한 배경으로 흰색글씨의 라벨이 화면에 보여진다.