2011-04-12 9 views
6

मैं अपने UIModalPresentationFormSheet शैली मोडल दृश्य सेट करने UIModalPresentationFullScreen शैली कुछ समय बनना चाहते हैं, लेकिन जब यह पहले से ही UIModalPresentationFormSheet शैली के साथ दिखाया गया है, ऐसा नहीं गोटो फुलस्क्रीन कोड का उपयोग कर सकते हैं "[xx setModalPresentationStyle:UIModalPresentationFullScreen];"मोडल व्यू कंट्रोलर पहले ही दिखाए जाने पर modalPresentationStyle को कैसे बदलें?

वहां उपस्थित शैली बदलने के लिए एक रास्ता है एक मॉडल दृश्य के बाद दिखाया गया? इस तरह मेरे कोड:

UITableDownload* vc = [[UITableDownload alloc] initWithStyle:UITableViewStylePlain]; 
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; 
[nav setModalPresentationStyle:UIModalPresentationFormSheet]; 
[MainAppDelegate mainBrowserViewController] presentModalViewController:nav animated:YES]; 

...//after shown,sometime I implement following code: 
[nav setModalPresentationStyle:UIModalPresentationFullScreen];//(The "nav" object is the same as above code) 
//But the change style code takes no effect. 

उत्तर

0

सुनिश्चित नहीं हैं कि अगर इस सवाल का जवाब है या नहीं है, लेकिन आप modalViewController के माध्यम से नियंत्रक तक पहुँचने की कोशिश की?

कुछ की तरह:

[self.modalViewController setModalPresentationStyle:UIModalPresentationFullScreen]; 

बजाय:

[nav setModalPresentationStyle:UIModalPresentationFullScreen]; 
+0

इसका कोई प्रभाव नहीं पड़ेगा – jyavenard

0

मुझे लगता है कि, आप अपने मॉडल को देखने autorotate चाहिए modalpresentationStyle रूप UIModalPresentationPageSheet

[nav setModalPresentationStyle:UIModalPresentationPageSheet]; 

इस प्रकार परिवर्तित करने का प्रयास कर सकते हैं

0

यह अभी भी आईओएस 7 ऐप में मेरे लिए एक प्रश्न है और इस बिंदु पर मुझे यह निष्कर्ष निकालने के लिए छोड़ दिया गया है कि संक्रमण के बाद मोडल प्रस्तुति स्टाइल को बदलना कोई प्रभाव नहीं पड़ता है।

संबंधित मुद्दे