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 ...
随机推荐
- 2019-03-22 Python Scrapy 入门教程 笔记
Python Scrapy 入门教程 入门教程笔记: # 创建mySpider scrapy startproject mySpider # 创建itcast.py cd C:\Users\theDa ...
- Java 多线程均匀处理同一个List中的数据
需求:使用多线程来处理同一个List中的数据,希望每个线程处理的数量是均匀的 事例代码如下: public class Test { static class HandleThread extends ...
- jvm 虚拟机参数_方法区内存分配
1.方法区( 永久区 ) 和堆一样,方法区是一块所有线程共享的区域,他用于保存系统类的信息.默认情况下 -XX:MaxPermSize 为 64m.如果系统运行时产生大量的类,就需要设置一个合适方法区 ...
- java有参无参构造器的的执行顺序
这里拿了用数组构造栈的一段代码说明一下 public class StackArray<E> { private Object[] data = null; private int max ...
- [AngularJS]Chapter 8 秘籍诀窍
<!DOCTYPE html> <html ng-app="myApp"> <head lang="en"> <met ...
- POJ3624 Charm Bracelet 【01背包】
Charm Bracelet Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22621 Accepted: 10157 ...
- oracle 10g/11g 命令对照,日志文件夹对照
oracle 10g/11g 命令对照,日志文件夹对照 oracle 11g 中不再建议使用的命令 Deprecated Command Replacement Commands crs_st ...
- Codeforce 163 A. Substring and Subsequence DP
A. Substring and Subsequence One day Polycarpus got hold of two non-empty strings s and t, consist ...
- HTML5客户端数据存储机制Web Storage和Web SQL Database
引言 html5本地存储可以选择两种方式,一种是本地存储,一种是sqlite. 比如开发html5的购物车功能,就可以考虑选择其中之一,进行本地存储与操作. 又或者保存用户登录信息,可以使用local ...
- HTML与CSS学习记录
title: HTML与CSS学习记录 toc: true date: 2018-09-10 14:04:59 <HTML与CSS进阶教程读书笔记> HTML基础知识 HTML与XHTML ...