第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

swift新特性:安全,時(shí)髦,強(qiáng)大,交互與高效

標(biāo)簽:
iOS

swift是一个新的支持iOS,OS X开发的面向对象语言。他是时髦的、强大的、易用的。

let people = ["Anna": 67, "Beto": 8, "Jack": 33, "Sam": 25] for (name, age) in people {     println("\(name) is \(age) years old.") }

swift is safe安全:swift是类型安全的,他使用类型推断机制,限制对象指针使用、自动管理内存来使程序更安全,让开发人员更容易开发出安全稳定的软件。

func configureLabels(labels: UILabel[]) {     let labelTextColor = UIColor.greenColor()     for label in labels {         // label inferred to be UILabel         label.textColor = labelTextColor     } }

swift is modern 时髦:swift具有optional,泛型,元祖等现代语言的特性。比objective-c语言更具灵感,更接近于自然语言,使代码可读性更好。

let cities = ["London", "San Francisco", "Tokyo", "Barcelona", "Sydney"] let sortedCities = sort(cities) { $0 < $1 } if let indexOfLondon = find(sortedCities, "London") {     println("London is city number \(indexOfLondon + 1) in the list") }

swift is powerful强大:使用swift中强大的模式匹配特性写出更简单,更直观表意的代码。通过变量插值的方式来方便的格式化字符串;方便的使用Foundation and UIKit

let size = (20, 40) switch size { case let (width, height) where width == height:     println("square with sides \(width)") case (1..10, 1..10):     println("small rectangle") case let (width, height):     println("rectangle with width \(width) and height \(height)") }

交互性:使用playgrounds 来试验新技术,分析问题,做所见即所得的界面原型 


高效: Swift的编译器使用高级的代码分析功能来调优你的代码。让你更专注于开发应用,而不必在性能优化上投入大量的精力。

翻译自:https://developer.apple.com/library/prerelease/ios/referencelibrary/GettingStarted/LandingPage/index.html


點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺(jué)得本文不錯(cuò),就分享一下吧!

評(píng)論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評(píng)論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評(píng)論
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說(shuō)多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開(kāi)微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊(cè)有機(jī)會(huì)得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

舉報(bào)

0/150
提交
取消