내 tabBarController의 하위 뷰로 추가 된 모달 뷰를 표시하는 다음 코드가 있습니다. 그러나 수신 휴대 전화가 상단에있는 녹색 상태 표시 줄을 내 응용 프로그램을 중단하고 표시 할 때이 가능하도록 autoresizingMask 속성을 사용에도 불구하고, 나는이 이벤트 후 전체보기를 20 픽셀로 변위 찾을 수 아래로모달 뷰 대체 됨
- (void) showLogin:(UIView*) modalView
{
CGPoint middleCenter = CGPointMake(160, 226);
CGSize offSize = [UIScreen mainScreen].bounds.size;
CGPoint offScreenCenter = CGPointMake(offSize.width/2.0, -210); // start from top
modalView.center = offScreenCenter; // we start off-screen
modalView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
[self.tabBarController.view addSubview:modalView];
// Show it with a transition effect
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.4]; // animation duration in seconds
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
modalView.center = middleCenter;
[UIView commitAnimations];
}
방법 이거 해결해? 감사합니다.
설명 : "전체보기가 옮겨졌습니다"라고 말하면 modalView 또는 tabBarController.view를 의미합니까? – TechZen
전체 화면 비디오에서 돌아올 때 모달과 비슷한 문제가 있습니다. –
죄송합니다. 모달보기가 녹색 막대의 높이만큼 아래쪽으로 옮겨졌습니다. – tech74