//
// AppDelegate.swift
// UIWindow import UIKit @UIApplicationMain
class 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" class="objc">//
// ViewController.swift
// UIWindow import UIKit
import Foundation
class 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入门-实现简单的登录界面的更多相关文章

  1. sencha做个简单的登录界面

    很多人都在群里问要一个好看的登录界面,我表示很无奈,哪有好看的,每个人的要求不一样,要好看的只有自己做. 下面是我自己整理的一个通用版的登录界面,稍做修改,很容易能变成你想要的界面, 不说废话,直接上 ...

  2. CSS样式案例(2)-制作一个简单的登录界面

    首先来张完工的效果图. 一.html文件如下: <!DOCTYPE html> <html> <head> <meta charset="UTF-8 ...

  3. JAVA web简单的登录界面jsp实现

    此次试验所用到的软件是myeclipse10,tomcat7,Dreamweaver,sqlserver2008数据库.可以实现用户使用用户名和密码登录.如果登录成功,页面会显示登录成功,如果密码错误 ...

  4. Qt实践基础-简单的登录界面的实现

    主要代码的实现: 1.为了更好的实现界面的组织,采用C++直接构建UI 2.登录多次密码错误则断开“确认”按钮的链接 3.注意理解static变量的应用 4.QString类的使用更像继承了strin ...

  5. 混合开发的大趋势之一React Native之简单的登录界面

    转载请注明出处:王亟亟的大牛之路 这些天都在学习RN这部分吧,然后写了个简单的登陆业务,从"实战"中讲解吧 还是继续安利:https://github.com/ddwhan0123 ...

  6. 第一次Java作业——简单的登录界面

    千里之行,始于足下,从小做起,一点一滴学编程. import javax.swing.*; import java.awt.*; public class Homework{ public stati ...

  7. Swift 入门之简单语法(六)

    KVC 字典转模型构造函数 /// `重写`构造函数 /// /// - parameter dict: 字典 /// /// - returns: Person 对象 init(dict: [Str ...

  8. Swift 入门之简单语法(四)

    函数 目标 掌握函数的定义 掌握外部参数的用处 掌握无返回类型的三种函数定义方式 代码实现 函数的定义 格式 func 函数名(行参列表) -> 返回值 {代码实现} 调用 let result ...

  9. Swift 入门之简单语法(五)

    面向对象 目标 构造函数 构造函数的基本概念 构造函数的执行顺序 KVC 在构造函数中的使用及原理 便利构造函数 析构函数 区分 重载 和 重写 懒加载 只读属性(计算型属性) 设置模型数据(didS ...

随机推荐

  1. tp框架引入第三方sdk的经验总结

    tp框架开发常用到第三方的接口,这时候需要引入第三方的sdk.例如:微信扫码支付sdk,阿里大于的淘宝sdk等等 首先到官网上下载对应php的sdk文件,通常会有至少一个实例代码. 1 新建一个控制器 ...

  2. Nutch2 WebPage 字段解释

    Nutch2 WebPage 字段解释 Nutch2.2.1 id

  3. HDU 1709

    MB,一开始就想到是不是只要加上一个不选择砝码的情况,但一直没动手做,因为看了看网上了,觉得总有点复杂,认为自己想错了.... 相信自己 #include <iostream> #incl ...

  4. mydumper安装及安装故障汇总

     mydumper是针对mysql数据库备份的一个轻量级第三方的开源工具,备份方式术语逻辑备份.它支持多线程.备份速度远高于原生态的mysqldump以及众多优异特性. 因此该工具是DBA们的不二选 ...

  5. bzoj1103: [POI2007]大都市meg(树链剖分)

    1103: [POI2007]大都市meg 题目:传送门 简要题意: 给你一棵树,给出每条边的权值,两个操作:1.询问根到编号x的最短路径的权值和  2.修改一条边的边权 题解: 很明显啊,看懂了题基 ...

  6. vue 组件之间的传值

    父向子传值父组件 <v-footer :projectdat="dat"></v-footer> export default { data() { ret ...

  7. 分组后取每组内排名的Top N的SQL语句

    给个MySQL例子参考 -----查询每门课程的前2名成绩 CREATE   TABLE   StudentGrade( stuId   CHAR(4),         --学号 subId   I ...

  8. (转载)Android自定义ProgressDialog进度等待框

    Android自定义ProgressDialog进度等待框 作者:无缘公子 字体:[增加 减小] 类型:转载 时间:2016-01-11我要评论 这篇文章主要介绍了Android自定义Progress ...

  9. sqlserver 恢复模式及避免日志爆满的方法

    recovery simple 循环日志,空间自动回收,不可备份日志,恢复时仅能恢复到数据库备份时间点: 用于落地数据或测试环境或OLAP,不推荐用于生产OLTP 有时候distribution过大也 ...

  10. SQL中的union

    在SQL中,如果我们查询一个班级的考试成绩数据,再统计考试成绩的总和,我们使用以下两条语句: select StudentName,Grade from Student select '总成绩',SU ...