निम्न विधि का उपयोग कर रहा हूँ, और अपने काम कर ठीक।
दृश्य में निम्न कोड का उपयोग करें, जिसमें आप fbgraph का उपयोग करने जा रहे हैं।
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
[self leftOrienation];
}
else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
[self rightOrientation];
NSLog(@"right");
}
else
{
}
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
here i have initialized FbGraph as fbGraph.
-(void)leftOrienation
{
CGAffineTransform newTransform;
newTransform = CGAffineTransformMakeRotation(M_PI * 270/180.0f);
fbGraph.webView.transform = newTransform;
[fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)];
}
-(void)rightOrientation
{
CGAffineTransform newTransform;
newTransform = CGAffineTransformMakeRotation(M_PI * 90/180.0f);
fbGraph.webView.transform = newTransform;
[fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)];
}
स्रोत
2012-11-17 07:38:16
लॉगिन बॉक्स कौन प्रदर्शित कर रहा है? एक ब्राउज़र? एक आवेदन पत्र? लॉगिन बॉक्स को प्रदर्शित होने का अनुरोध कैसे किया जा रहा है? – DMCS
बस स्पष्ट होने के लिए, क्या यह चित्र में काम करता है, या बिल्कुल नहीं? – Autonomy
हाँ यह पोर्ट्रेट – Gypsa