Xcode 6 swift没有故事板

时间:2014-09-11 23:57:53

标签: swift xcode6

您好我正在使用此代码尝试创建非故事板项目

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    window = UIWindow(frame: UIScreen.mainScreen().bounds)
    if let window = window {
        window.makeKeyAndVisible()
        window.rootViewController = LoginScreenViewController()
    }
    return true
}

它运行但它在模拟器中没有显示任何内容....只是一个空白的屏幕,我的xib中有很多项目。

导入UIKit

class LoginScreenViewController: UIViewController {
@IBOutlet weak var lblIniciaSesion: UILabel!
@IBOutlet weak var txtEmail: UITextField!
@IBOutlet weak var txtPassword: UITextField!
@IBOutlet weak var btnIniciarSesion: UIButton!
@IBOutlet weak var btnCancelar: UIButton!

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

有人可以帮助我吗?

0 个答案:

没有答案
相关问题