0
Xcode 내에서 사용자를 새로운보기로 데려다주는 popover 안에 버튼을 추가 할 수 있습니까?popover 안에 버튼 추가하기
Xcode 내에서 사용자를 새로운보기로 데려다주는 popover 안에 버튼을 추가 할 수 있습니까?popover 안에 버튼 추가하기
예.
[myPopOver.contentViewController.view addSubview:myButton];
[myButton addTarget:self action:@selector(goToNextView) forControlEvents:UIControlEventTouchUpInside];
- (void)goToNextView
{
//if you are using xibs use this line
UIViewController *controller = [[UIViewController alloc] initWithNibName:@"myXib" bundle:[NSBundle mainBundle]];
//if you are using storyboards use this line
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"myViewControllersID"];
//to present the controller modally use this
[self presentViewController:controller animated:YES completion:nil];
//or if you are pushing to this controller using a navigation controller use this
[self.navigationController pushViewController:controller animated:YES];
}
어떻게 MyViewController에서 현재 상태로 돌아갈 수 있습니까? –