से भिन्न होता है मेरा ऐप आईओएस 6 जीएम सिम्युलेटर में ऑटोरोटेट नहीं करेगा लेकिन यह डिवाइस पर आईओएस के उसी संस्करण के साथ करता है। क्या यह एक सिम्युलेटर बग हो सकता है? ऐप बहिष्कृत ऑटोरोटेशन विधियों का उपयोग कर रहा है, लेकिन वे डिवाइस पर ठीक काम कर रहे हैं जो मुझे आश्चर्यचकित करता है अगर सिम्युलेटर एपीआई अलग हैं? ,सिम्युलेटर में आईओएस 6 ऑटोरोटेशन वास्तविक आईओएस 6 डिवाइस
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
- (BOOL) shouldAutorotate {
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationPortrait;
}
यह काम करने के लिए मैं:
// Tell the system what we support
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
// Tell the system It should autorotate
- (BOOL) shouldAutorotate {
return YES;
}
// Tell the system which initial orientation we want to have
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationPortrait;
}
क्या आप आईओएस 6 जीएम एसडीके के साथ संकलित ऐप चला रहे हैं? – rckoenes
यह एक अच्छा सवाल है, मुझे कैसे पता चलेगा? मैं बस एक्सकोड के भीतर से डिवाइस पर ऐप चला रहा हूं, आईओएस 6 चलाने वाले डिवाइस पर, एक्सकोड 4.5 का उपयोग कर जिसमें आईओएस 6 एसडीके और आईओएस 6 सिम्युलेटर – johnbakers
है, यह आईओएस 6 एसडीके है। मैं एक ही समस्या में भाग गया था, मेरे बेस व्यू कंट्रोलर में एक छोटी सी रीराइट कर रहा था, मैं नए रोटेशन विधियों को जोड़ने में सक्षम था, इस प्रकार सिम्युलेटर में इसे ठीक कर रहा था। हमने नए रोटेशन कोड को जोड़ने से पहले परीक्षण किया है और ऐसा लगता है कि यह डिवाइस पर ठीक है। – rckoenes