Đang sử dụng các phương pháp sau đây, và làm việc tốt của nó.
Sử dụng mã sau trong chế độ xem, trong đó bạn sẽ sử dụng 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)];
}
Nguồn
2012-11-17 07:38:16
Ai đang hiển thị hộp đăng nhập? Trình duyệt? Một ứng dụng? Hộp đăng nhập được yêu cầu hiển thị như thế nào? – DMCS
Chỉ cần rõ ràng, nó có hoạt động ở chế độ dọc hay không? – Autonomy
có nó hoạt động trong bức chân dung – Gypsa