UIView *cellBackView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease]; cellBackView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"background.png"]]; cell.backgroundView = cellBackView;
UIView *viewSelected = [[[UIView alloc] init] autorelease]; viewSelected.backgroundColor = [UIColor whiteColor]; cell.selectedBackgroundView = viewSelected;
本文介绍了如何使用UIView自定义iOS应用的背景视图,包括设置默认背景和选中背景,通过设置图案图像来实现个性化界面设计。

被折叠的 条评论
为什么被折叠?



