আমার কাছে একটি ভিউ কন্ট্রোলার শ্রেণিবিন্যাস রয়েছে এবং শীর্ষস্থানীয়তম নিয়ামকটি একটি মডেল হিসাবে প্রদর্শিত হয় এবং ব্যবহারের সময় কীভাবে নেভিগেশন বারটি প্রদর্শন করতে হয় তা জানতে চাই
'UIViewController:presentViewController:viewControllerToPresent:animated:completion'
'বর্তমানভিউ নিয়ন্ত্রণকারী: অ্যানিমেটেড: সমাপ্তি:' নোট:
'আইফোন এবং আইপড স্পর্শে উপস্থাপিত দৃশ্যটি সর্বদা পূর্ণ পর্দা থাকে। আইপ্যাডে, উপস্থাপনাটি মডেলপ্রেজেন্টেশন স্টাইল সম্পত্তিটির মানের উপর নির্ভর করে। '
'মোডালপ্রেজেন্টেশনস্টাইল' এর জন্য ডকস বলেছেন:
উপস্থাপনা শৈলী নির্ধারণ করে যে কীভাবে একটি উপস্থাপিত ভিউ কন্ট্রোলার অনস্ক্রিন প্রদর্শিত হবে। আইফোন এবং আইপড স্পর্শে, মডেল ভিউ কন্ট্রোলার সর্বদা পূর্ণ-স্ক্রিন উপস্থাপিত হয়, তবে আইপ্যাডে বিভিন্ন ধরণের উপস্থাপনা বিকল্প রয়েছে।
একবার ভিউ কন্ট্রোলটি প্রদর্শিত হয়ে যাওয়ার পরে নেভিগেশন বারটি স্থিতি বারের নীচে দৃশ্যমান কিনা তা নিশ্চিত করার কোনও উপায় আছে? আমি কী ডকটির ব্যাখ্যা করব, আপনি আইফোন / আইপড এবং কেবলমাত্র আইপ্যাডের কোনও বিকল্প পাবেন না?
পূর্বে, আমি ব্যবহার করছিলাম 'UIViewController:presentModalViewController:animated'
যা ভাল কাজ করেছে, তবে আইওএস 5.0 থেকে, এপিআই হ্রাস করা হয়েছে তাই আমি নতুনটিতে স্যুইচ করছি।
দৃশ্যত, আমি যা করতে চাইছি তাতে পর্দার নীচে থেকে নতুন নিয়ামক স্লাইডটি আসছিল ঠিক যেমন পুরানো এপিআই করত।
[কোড সহ আপডেট করা]:
// My root level view:
UIViewController *vc = [[RootViewController alloc]
initWithNibName:nil
bundle:[NSBundle mainBundle]];
navController = [[UINavigationController alloc] initWithRootViewController:vc];
....
// Within the RootViewController, Second view controller is created and added
// to the hierarchy. It is this view controller that is responsible for
// displaying the DetailView:
SecondTierViewController *t2controller = [[SecondTierViewController alloc]
initWithNibName:nil
bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:t2controller animated:YES];
// Created by SecondTierViewController
DetailViewController *controller = [[DetailViewController alloc] initWithNibName:nil
bundle:[NSBundle mainBundle]];
controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
controller.modalPresentationStyle = UIModalPresentationCurrentContext;
[self.navigationController presentViewController:controller
animated:YES
completion:nil];