第一个swift app project
VIEwController.swift
//// VIEwController.swift// MyFirstApp//// Created by hins on 16/3/26.// copyright © 2016年 hins. All rights reserved.//import UIKitclass VIEwController: UIVIEwController { @IBAction func touchMe(sender: UIbutton) { //print("hello app");//点击文字事件时控制台输出 // d窗 let msgBox = UIAlertController(Title: "this is Title",message: "this is content",preferredStyle: UIAlertControllerStyle.Alert); //d窗里的按钮 //let msgAction = UIAlertAction(Title: "confirm",style: UIAlertActionStyle.Default) { (_) in} let msgAction = UIAlertAction(Title: "confirm",style: UIAlertActionStyle.Default) { (_) in print("you touch button!")} msgBox.addAction(msgAction); self.presentVIEwController(msgBox,animated: true,completion: nil); } overrIDe func vIEwDIDLoad() { super.vIEwDIDLoad() // 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 学习笔记所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)