如何在纵向设备方向内将视图转换为横向
我的视图控制器代码 .
import UIKit
class SampleViewController: UIViewController {
var commingtextview:String = ""
@IBOutlet weak var textview: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
navigationController!.navigationBar.barTintColor = UIColorFromRGBs(0x000000)
navigationController!.navigationBar.tintColor = UIColor.whiteColor();
textview.text = self.commingtextview
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Important !
My project portrait must be portrait i want to change only this view orientation to landscape.
我也是我的项目导向
[x]肖像
[ ] 上下翻转
[]左侧风景
[]风景正确
1 回答
使用 :-