swift 学习笔记

swift 学习笔记,第1张

概述第一个swift app project ViewController.swift //// ViewController.swift// MyFirstApp//// Created by hins on 16/3/26.// Copyright © 2016年 hins. All rights reserved.//import UIKitclass ViewContro

第一个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 学习笔记所遇到的程序开发问题。

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

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

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

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

发表评论

登录后才能评论

评论列表(0条)

保存