2011-11-18 30 views

答えて

2

それはのように簡単です:

yourSubView.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"BackgroundImage.png"]]; 
0

クラス:としてサブビューの

IBOutlet UIView* subView; 

セットの背景画像:クラスで

@interface abc : UIView { 
....... 
} 

がサブビューを定義

UIColor* bgrColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed: backgroundImageName]]; 
subView.backgroundColor = bgrColor; 

最後にビューに

[self.view addSubView:subView]; 
をサブビューを追加3210
関連する問題