开发者

add subview in another subview

开发者 https://www.devze.com 2023-01-20 03:58 出处:网络
i use this code but nothing shows开发者_Python百科 up!!!!? help CGRect frame = CGRectMake(0.0,0.0,480,320);

i use this code but nothing shows开发者_Python百科 up!!!!? help

CGRect frame = CGRectMake(0.0,0.0,480,320);
secondview=[[UIView alloc] initWithFrame:frame];

[self.view addSubview:secondview];  
[self.view bringSubviewToFront:secondview];


Right now your view doesn't have any content. Try adding this:

[secondView setBackgroundColor:[UIColor redColor]];
0

精彩评论

暂无评论...
验证码 换一张
取 消