0
我需要添加到我的工作的主视图的新子视图。这个子视图应该放在主视图上的所有内容。子视图具有框架= view.frame/2 我试图实现了一些解决方案(下面),但目前还没有结果((递归self.view添加到self.view?
首先
CGRect frame = CGRectMake(100, 140, 250, 250);
UIView *view = [self.view copy];
view.frame = frame;
[self.view addSubview:view ];
[view release];
然后
UIView *View = [[[NSBundle mainBundle] loadNibNamed:@"CurrentTemplate" owner:self options:nil] objectAtIndex:0];
View.frame = CGRectMake(100, 140, 250, 250);
[self.view addSubview:view ];
[view release];
不限想法?
被查看应该从不同的观点,因为你混合使用大写查看和小写视图...可能只是格式问题? – 2009-11-05 12:19:23