背景图像阻止我的整个屏幕

时间:2015-09-22 22:16:51

标签: ios objective-c iphone

我想在我的iOS应用中为UIViewcontroller添加背景 - (void)viewDidLoad { [super viewDidLoad]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; [imageView setImage:[UIImage imageNamed:@"background"]]; [self.view addSubview:imageView]; }

buttons

这很遗憾地产生了一个覆盖整个屏幕的结果。

有没有办法将此子视图移动到底层,以便它不会覆盖我的textfieldsdata all_data; length fname $100 path $200 version 8 ; length Date_L_ Time_L_ 8 Type $10.; informat Date_L_ date11. Time_L_ time18.3 ; format version z3. Date_L_ date11. Time_L_ time12.3 ; do fname='shanghai','london','newyork'; do version=1 to 100 ; path = catx('\','H:',cats(fname,put(version,z3.),'.csv')); if not fileexist(path) then do; put 'ERROR: File not found. ' path=:$quote.; continue; end; infile csvfile filevar=path dsd truncover end=eof; if not eof then input ; do while (not eof); input Date_L_ Time_L_ Type ; output; end; end; end; run;

1 个答案:

答案 0 :(得分:2)

您需要在层次结构的底部插入视图

[self.view insertSubview:imageView atIndex:0];