سؤال

لدي تطبيق TabView على iPhone. عند التحميل الأولي ، أريد أن أقلب الشاشة لإظهار بعض الإعدادات.

في AppDelegate الخاص بي ، تتم إضافة tabview إلى النافذة مع

[window addSubview:tabBarController.view];

لقد قمت بتصفح الويب ووجدت هذا:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
                       forView:tabBarController.view
                         cache:YES];
[window addSubview:settingsViewController.view];
[UIView commitAnimations];

ولكن عندما أختبر هذا في جهاز المحاكاة ، فإن التغيير الوحيد الذي يمكنني رؤيته هو أن tabmenu تطفو من اليمين إلى اليسار.

هل يمكن حل هذا؟

هل كانت مفيدة؟

المحلول

يمكنك تقديم عرض الإعدادات كعرض مشروط. يمكنك تحديد الرسوم المتحركة للوجه من اليمين إلى اليسار.

[settingsViewController.view setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:settingsViewController animated:YES];

لكي ترجع:

[self.parentViewController dismissModalViewControllerAnimated:YES];

نصائح أخرى

شكرا ، هذا نجح. لكن اضطررت إلى إدراج NavigationScontroller:

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:settingsViewController];

[navigationController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:navigationController animated:YES];

[navigationController release];
[settingsViewController release];

ولكن الآن السؤال التالي: كيف أعود؟ قون

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top