swift程序进入后台

swift程序进入后台,第1张

概述class ViewController: UIViewController { @IBOutlet weak var message: UILabel! @IBOutlet weak var myNotification: UILabel! override func viewDidLoad() { super.viewDidLoad(
class VIEwController: UIVIEwController {        @IBOutlet weak var message: UILabel!    @IBOutlet weak var myNotification: UILabel!        overrIDe func vIEwDIDLoad() {        super.vIEwDIDLoad()        NSNotificationCenter.defaultCenter().addobserver(self,selector: #selector(VIEwController.updateInterface(_:)),name: UIApplicationWillEnterForegroundNotification,object: nil)    }        func updateInterface (notification: NSNotification){        myNotification.text = "Back to background with notification"    }        overrIDe func dIDReceiveMemoryWarning() {        super.dIDReceiveMemoryWarning()    }    }@H_502_1@按下home键之后,myNotification的text永久的改为 "Back to background with notification"          总结       

以上是内存溢出为你收集整理的swift程序进入后台全部内容,希望文章能够帮你解决swift程序进入后台所遇到的程序开发问题。

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

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

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

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

发表评论

登录后才能评论

评论列表(0条)

保存