2012-01-01 1 views
2

가 나는 SEGUE와 두 번째보기를 제공 할 수 닫고 이후 첫 번째 기각 할 수 없습니다는 SEGUE을 수행하고

[self performSegueWithIdentifier:@"TargetLS" sender: self]; 
[self dismissModalViewControllerAnimated:YES]; 

난 항상 서로의 상단에 여러 모달 뷰를 가지고 있습니다.

내가 좋아하는 넣어 경우 다음 당신은 당신의 프로그램의 흐름을 설계해야합니다 모달 뷰를 사용하여

2012-01-01 17:23:54.018 Coverdale[21462:f803] *** Assertion failure in -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:], 
/SourceCache/UIKit_Sim/UIKit-1912.3/UIWindowController.m:188 

답변

0

좋아요 :

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 
{ 
NSLog(@"Rotation"); 
if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) 
    { 
2

가 수집하는 모달보기를 사용 :

[self dismissModalViewControllerAnimated:YES];  
[self performSegueWithIdentifier:@"TargetLS" sender: self]; 

내가 좀 이상한 오류 코드를 얻을 또는 정보를 제공하고 그것을 제시 한 견해로 돌아 간다. 그런 다음 다른 모달보기를 표시 할 수 있습니다. 프로그램 흐름에 맞지 않는 경우 모달보기 이외의 다른 것을 사용해야 할 가능성이 큽니다. 내가 viewDidLoad에 내가 다른 방향을위한 새로운 인터페이스를 설정하고, 지금까지있어

+0

내가 :

if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight) { 

등을

와 방향 변경에 대한

가로 및 세로 방향에 대해 다른 인터페이스를 사용하려고합니다. 이 경우에 당신이 선호하는 것은 어떤 종류입니까? – Faser

+0

기능이 비슷하다면 동일한보기 컨트롤러를 사용하고 세로보기를 숨기고 가로보기를 표시하거나 반대의 경우도 마찬가지입니다. 이 경우에는 segue를 전혀 사용하지 않지만 전환을 위해 애니메이션을 호출 할 수는 있습니다. –

+0

그래,하지만 완전히 다른보기 컨트롤러를 갖고 싶다 ... 어떻게하면 하나의 인터페이스에서 IB로 레이아웃을 관리 할 수 ​​있을까? – Faser