Iphone addsubview提供了错误的输出?
我正在使用以下代码,但子视图添加在父视图下方,而不是在父视图(self.view)上…请提供帮助Iphone addsubview提供了错误的输出?,iphone,ipad,uiview,addsubview,Iphone,Ipad,Uiview,Addsubview,我正在使用以下代码,但子视图添加在父视图下方,而不是在父视图(self.view)上…请提供帮助 -(IBAction)okbutton:(id)sender { obj = [[imgViewNextController alloc] initWithNibName:@"green" bundle:nil]; obj.view.frame = self.view.frame; [UIView beginAnimations:@"cur
-(IBAction)okbutton:(id)sender
{
obj = [[imgViewNextController alloc] initWithNibName:@"green" bundle:nil];
obj.view.frame = self.view.frame;
[UIView beginAnimations:@"curldown" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:.5];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES];
[self.view addSubview:obj.view];
//[self.view insertSubview:obj.view aboveSubview:self.view];
[UIView commitAnimations];
您正在使用TableView吗 有些物体做(奇怪的)事情,所以它可能是相关的 如果可能,提供更多关于自我对象的信息 顺便说一下,你可以试试 [ self.view insertSubview: atIndex: ]; [self.view insertSubview:atIndex:]; 或 [self.view insertSubview:oversubview:];> 祝你好运 [ self.view insertSubview: aboveSubview: ];>