swift入门-实现简单的登录界面
//
// 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入门-实现简单的登录界面的更多相关文章
- sencha做个简单的登录界面
很多人都在群里问要一个好看的登录界面,我表示很无奈,哪有好看的,每个人的要求不一样,要好看的只有自己做. 下面是我自己整理的一个通用版的登录界面,稍做修改,很容易能变成你想要的界面, 不说废话,直接上 ...
- CSS样式案例(2)-制作一个简单的登录界面
首先来张完工的效果图. 一.html文件如下: <!DOCTYPE html> <html> <head> <meta charset="UTF-8 ...
- JAVA web简单的登录界面jsp实现
此次试验所用到的软件是myeclipse10,tomcat7,Dreamweaver,sqlserver2008数据库.可以实现用户使用用户名和密码登录.如果登录成功,页面会显示登录成功,如果密码错误 ...
- Qt实践基础-简单的登录界面的实现
主要代码的实现: 1.为了更好的实现界面的组织,采用C++直接构建UI 2.登录多次密码错误则断开“确认”按钮的链接 3.注意理解static变量的应用 4.QString类的使用更像继承了strin ...
- 混合开发的大趋势之一React Native之简单的登录界面
转载请注明出处:王亟亟的大牛之路 这些天都在学习RN这部分吧,然后写了个简单的登陆业务,从"实战"中讲解吧 还是继续安利:https://github.com/ddwhan0123 ...
- 第一次Java作业——简单的登录界面
千里之行,始于足下,从小做起,一点一滴学编程. import javax.swing.*; import java.awt.*; public class Homework{ public stati ...
- Swift 入门之简单语法(六)
KVC 字典转模型构造函数 /// `重写`构造函数 /// /// - parameter dict: 字典 /// /// - returns: Person 对象 init(dict: [Str ...
- Swift 入门之简单语法(四)
函数 目标 掌握函数的定义 掌握外部参数的用处 掌握无返回类型的三种函数定义方式 代码实现 函数的定义 格式 func 函数名(行参列表) -> 返回值 {代码实现} 调用 let result ...
- Swift 入门之简单语法(五)
面向对象 目标 构造函数 构造函数的基本概念 构造函数的执行顺序 KVC 在构造函数中的使用及原理 便利构造函数 析构函数 区分 重载 和 重写 懒加载 只读属性(计算型属性) 设置模型数据(didS ...
随机推荐
- 小记如何有顺序的搭建一个Spring的web项目
如何有顺序的搭建一个Spring的web项目 一.新建一个简单的maven,war工程 eclipse下如有报错,右键 Deployment 单击 Generate 生成web.xml后可解决报错 二 ...
- RabbitMQ学习总结(4)——分发任务在多个工作者之间实例教程
一.Work Queues(using the Java Client) 走起 在第上一个教程中我们写程序从一个命名队列发送和接收消息.在这一次我们将创建一个工作队列,将用于分发耗时的任务在多个工 ...
- Application Loader提交ipa文件出现ERROR ITMS-90022问题解决方式
话说在提交app到AppStore时出现了一些问题.网上找了一些资料,但不并具体.因此我做了一个总结,方便我以后遇到时可查询. 也希望能帮助遇到这个问题的提供解决方式. ERROR ITMS-9002 ...
- 题目1437:To Fill or Not to Fill(贪心算法)
题目描写叙述: With highways available, driving a car from Hangzhou to any other city is easy. But since th ...
- 深入浅出Struts2
Struts2简单介绍 Struts 2框架作为Struts 1.X框架的替代技术,相对Struts 1.X来说,有着本质上的改变. Struts 2框架是从WebWork框架发展而来的.Apache ...
- zzulioj--1716--毒(模拟水题)
1716: 毒 Time Limit: 2 Sec Memory Limit: 128 MB Submit: 96 Solved: 43 SubmitStatusWeb Board Desc ...
- xBIM 基础08 WeXplorer 简介
系列目录 [已更新最新开发文章,点击查看详细] 一.WeXplorer 简介 WeXplorer 是 XBIM 工具包的可视化部分,它使用预处理的 WexBIM 文件在 Web 上处理 IFC ...
- sicily 1137 河床 (二分分治)
<计算机算法设计与分析>啃书中... 有点看不进书,就来刷个水题吧,刚开始看错题了还. 注意:是所有测量点相差均不大于di而不是相邻两点... //1137.河床 #include < ...
- Sql Server创建外键失败
问题: 已成功保存“PPR_BasicInformation”表“PPR_PS”表- 无法创建关系“FK_PPR_PS_PPR_BasicInformation”. ALTER TABLE 语句与 F ...
- 51nod 1307 绳子与重物 (标记父节点更新即可)
1307 绳子与重物 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 有N条绳子编号 0 至 N - 1,每条绳子后面栓了一个重物重量为Wi,绳子的最大负重为Ci. ...