1
TTView에서 이미지 배경을 설정하는 데 문제가 있습니다. 여기에 인터넷에서 발견 된 코드가 있지만 검은 색 사각형 만 보여줍니다.TTview에서 배경으로 TTImageView 설정
- (TTView *) monthBar {
if (!_monthBar) {
_monthBar = [[[TTView alloc] init] autorelease];
_monthBar.style = TTSTYLE(calendarMonthBarStyle);
_monthBar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
TTImageView *imageView = [[TTImageView alloc]initWithFrame:CGRectMake(0, 0, 480, 20)];
[imageView setDefaultImage:[UIImage imageNamed:@"picture.png"]];
[self.monthBar addSubview:imageView];
[imageView release];
[self addSubview: _monthBar];
}
return _monthBar;
}
누군가가 문제를 해결하는 방법을 알고 있다면 도와주세요. 감사합니다.
TTImageView 대신 UIImageView를 사용해 보셨습니까? –