0
我正在使用下面的代碼,但子視圖添加在父視圖下面不是父視圖(self.view)..任何幫助嗎?addsubview給出錯誤的輸出?
-(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];