'BackgroundColor'에 해당되는 글 1건

  1. 2011.10.28 Table View 관련

Table View 관련

Dev/iOS 2011. 10. 28. 18:21



테이블 배경에 패턴 형식으로 이미지 넣기.

NSString *backgroundPath = [[NSBundle mainBundle] pathForResource:@"background" ofType:@"jpg"];
UIImage *backgroundImage = [UIImage imageWithContentsOfFile:backgroundPath];
UIColor *backgroundColor = [[UIColor alloc] initWithPatternImage:backgroundImage];
self.tableView.backgroundColor = backgroundColor;
[backgroundColor release];


뷰 컨트롤러의 뷰 배경에 이미지 넣고 테이블 배경 투명하게 하기.


anniversaryTableView = [[AddAnniversaryTableViewController alloc]

initWithStyle:UITableViewStylePlain];

//테이블 뷰의 배경색을 투명으로 지정합니다.

anniversaryTableView.view.backgroundColor = [UIColor clearColor];

anniversaryTableView.view.opaque = YES;

anniversaryTableView.delegate = self;

anniversaryTableView.tableView.allowsSelectionDuringEditing = YES;

//뷰 컨트롤러의 뷰에 배경 이미지를 지정합니다.

self.view.backgroundColor =

[UIColor colorWithPatternImage:

[UIImageimageNamed:@"anniversary_background.png"]];

anniversaryTableView.view.frame = CGRectMake(9010230450);


//그리고 뷰 컨트롤러의 뷰 위에 테이블 뷰 컨트롤러의 뷰를 붙입니다.

[self.view addSubview:anniversaryTableView.view];






 

'Dev > iOS' 카테고리의 다른 글

UILabel 관련 내용.  (0) 2011.11.01
UITextView  (0) 2011.11.01
HTML5로 아이폰앱 만들기  (0) 2011.10.28
NSDate를 이용하여 D-Day 계산.  (0) 2011.10.28
iOS 텍스트 관련.  (0) 2011.10.24
: