我这样做的基本应用程序运行正常,除了某些原因我的应用程序就在屏幕之外?有没有人知道为什么会这样?
我的索引页面只是基本的HTML,链接到CSS样式表。 和Xcode:
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var webView: UIWebView!
// Load the url into the webview
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let localfilePath = NSBundle.mainBundle().URLForResource("home", withExtension: "html");
let myRequest = NSURLRequest(URL: localfilePath!);
webView.loadRequest(myRequest);
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}