swift入门-实现简单的登录界面

swift入门-实现简单的登录界面,第1张

概述//// AppDelegate.swift// UIWindowimport UIKit@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplic
////  AppDelegate.swift//  UIWindowimport UIKit@UIApplicationMainclass AppDelegate: UIResponder,UIApplicationDelegate {    var window: UIWindow?    func application(application: UIApplication,dIDFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {        // OverrIDe point for customization after application launch.        return true    }    func applicationWillResignActive(application: UIApplication) {        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the Transition to the background state.        // Use this method to pause ongoing tasks,disable timers,and throttle down OpenGL ES frame rates. Games should use this method to pause the game.    }    func applicationDIDEnterBackground(application: UIApplication) {        // Use this method to release shared resources,save user data,invalIDate timers,and store enough application state information to restore your application to its current state in case it is terminated later.        // If your application supports background execution,this method is called instead of applicationWillTerminate: when the user quits.    }    func applicationWillEnterForeground(application: UIApplication) {        // Called as part of the Transition from the background to the inactive state; here you can undo many of the changes made on entering the background.    }    func applicationDIDBecomeActive(application: UIApplication) {        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was prevIoUsly in the background,optionally refresh the user interface.    }    func applicationWillTerminate(application: UIApplication) {        // Called when the application is about to terminate. Save data if appropriate. See also applicationDIDEnterBackground:.    }}
</pre><pre name="code" >////  VIEwController.swift//  UIWindowimport UIKitimport Foundationclass VIEwController: UIVIEwController {        @IBOutlet weak var usrnameLabel: UITextFIEld!            @IBOutlet weak var passwdLabel: UITextFIEld!    @IBAction func btntouch(sender: AnyObject) {                println("usrname is \(self.usrnameLabel.text)");        println("passwdLabel is \(self.passwdLabel.text)");            }        overrIDe func vIEwDIDLoad() {        super.vIEwDIDLoad()                //self.usrnameLabel.        // Do any additional setup after loading the vIEw,typically from a nib.    }    overrIDe func dIDReceiveMemoryWarning() {        super.dIDReceiveMemoryWarning()        // dispose of any resources that can be recreated.    }}
总结

以上是内存溢出为你收集整理的swift入门-实现简单的登录界面全部内容,希望文章能够帮你解决swift入门-实现简单的登录界面所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1085477.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存