Enviar pesquisa
Carregar
Swift Basic
•
3 gostaram
•
1,779 visualizações
Ryan Chung
Seguir
http://MobileDev.TW
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 96
Recomendados
http://MobileDev.TW
JavaScript Lab1 - Random Selector
JavaScript Lab1 - Random Selector
Ryan Chung
http://MobileDev.TW
JavaScript Lab2 - Countdown Timer
JavaScript Lab2 - Countdown Timer
Ryan Chung
http://MobileDev.TW
JavaScript Lab3 - Dynamic Time Board
JavaScript Lab3 - Dynamic Time Board
Ryan Chung
http://MobileDev.TW
UIKit-Swift
UIKit-Swift
Ryan Chung
Testing Android apps with Robotium
Testing Android apps with Robotium
Stephen Gilmore
Some feedback on Part 1 of the Computer Science Large Practical.
Feedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLP
Stephen Gilmore
Swift Tutorial 2
Swift Tutorial 2
Swift Tutorial 2
Jintin Lin
놀아요 Swift Playgrounds
놀아요 Swift Playgrounds
WooKyoung Noh
Recomendados
http://MobileDev.TW
JavaScript Lab1 - Random Selector
JavaScript Lab1 - Random Selector
Ryan Chung
http://MobileDev.TW
JavaScript Lab2 - Countdown Timer
JavaScript Lab2 - Countdown Timer
Ryan Chung
http://MobileDev.TW
JavaScript Lab3 - Dynamic Time Board
JavaScript Lab3 - Dynamic Time Board
Ryan Chung
http://MobileDev.TW
UIKit-Swift
UIKit-Swift
Ryan Chung
Testing Android apps with Robotium
Testing Android apps with Robotium
Stephen Gilmore
Some feedback on Part 1 of the Computer Science Large Practical.
Feedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLP
Stephen Gilmore
Swift Tutorial 2
Swift Tutorial 2
Swift Tutorial 2
Jintin Lin
놀아요 Swift Playgrounds
놀아요 Swift Playgrounds
WooKyoung Noh
For some, developing for the Android platform might provide their first experience of working with a complex, modern Java API. This may test your knowledge of the Java programming language, especially with regard to features such as generics. The Android APIs make use of generics throughout and so you will have to know how to create and handle generic classes.
Common Java problems when developing with Android
Common Java problems when developing with Android
Stephen Gilmore
Installing Xcode and writing your first simple program. Shows the usefulness of static analysis.
Getting started with Xcode
Getting started with Xcode
Stephen Gilmore
A crash course in Objective-C.
Crash Course in Objective-C
Crash Course in Objective-C
Stephen Gilmore
Swift Tutorial 1
Swift Tutorial 1
Swift Tutorial 1
Jintin Lin
En este taller profundizaremos en el lenguaje de programación Swift. Swift une la potencia de lenguajes como C++ y la sencillez de un lenguaje de script. Según wired.com, tendrá la adopción masiva más rápida de la historia.
Taller Swift - iCon
Taller Swift - iCon
iCon
我們是一個以簡易學習 Swift,希望大家都能享受到 Swift 的樂趣而成立的聚會。在這個聚會中,我們不太談很艱難的東西,只想聊聊每個人都可能可以聽懂跟加入的話題。 這次聚會將會是個相見歡,除了認識大家外,我也會準備一份簡報跟各位聊聊學習 Swift 的東西,內容將以 Raywenderlich 出的 Swift 2 Apprentice 為基礎。 這本書可以在這裡買:https://www.raywenderlich.com/store/swift-apprentice,大家可以先聽過分享後,再看這本書適不適合自己。 這次的分享主要會是這本書的 Chapter1 ~ Chapter3 Chapter 1: Playground Basics(初識遊樂場) Chapter 2: Variables and Constants(變數與常數) Chapter 3: Numeric Types and Operations(數字與運算符) 活動議程: 19:30-20:00 相見歡 20:00-20:30 Swift Apprentice #1 #2 #3 分享 20:30-21:00 自由交流 *本活動由 123App 贊助場地
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Xue Xin Tsai
This slide set describes the submissions which were received for Part 1 of the Software Engineering Large Practical.
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large Practical
Stephen Gilmore
A quick quiz to point out some of the differences between Objective-C and Java.
Quick quiz on Objective-C
Quick quiz on Objective-C
Stephen Gilmore
http://MobileDev.TW
Programming in Objective-C
Programming in Objective-C
Ryan Chung
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and Swift, MVC
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and S...
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and S...
彼得潘 Pan
Although the signs were out there in the open, the introduction of Swift was one of the big surprises of WWDC 2014. In this talk, I've outlined the reasonings why a 30yo language is being phased out and the main improvements introduced in Swift as well as Xcode 6.
To swiftly go where no OS has gone before
To swiftly go where no OS has gone before
Paul Ardeleanu
Standford 2015 week8
Standford 2015 week8
彼得潘 Pan
想用最短的時間內,透過實做,體驗 APP 的開發流程,學習最重要的基本概念嗎?【打造你的第一個iPhone APP】課程,以淺顯易懂的 storyboard 工具,教你打造小王子電子故事書 APP ,讓你第一次寫 APP 就輕鬆上手!由暢銷電腦書《 Swift程式設計入門》作者彼得潘帶領,不管你是想要和工程師溝通的更順暢的 PM、設計,或是想接觸 iOS 開發的新手,由老師親自帶著你,一步一步實際操作,幫助你更快進入iOS的世界!
打造你的第一個iPhone APP
打造你的第一個iPhone APP
彼得潘 Pan
http://MobileDev.TW
NetworkService-Swift
NetworkService-Swift
Ryan Chung
Some examples of programs using arrays in Objective-C.
Arrays in Objective-C
Arrays in Objective-C
Stephen Gilmore
These are the slides of my SXSW 2010 Objective-C Crash Course for Web Developers. The code samples (and the keynote document) can also be downloaded from http://workshop.verbogt.nl/
Objective-C Crash Course for Web Developers
Objective-C Crash Course for Web Developers
Joris Verbogt
http://MobileDev.TW
TrainingProgramAtMobileDevTW
TrainingProgramAtMobileDevTW
Ryan Chung
Swift is the latest new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility.
Swift-Programming Part 1
Swift-Programming Part 1
Mindfire Solutions
Swift is a robust language for mobile but cloud development opens the door to new opportunities for today's top app developers. Integrating projects to backend systems can sometimes be problematic, requiring new tools and skills. It doesn't have to be; end-to-end Swift opens the door to radically simpler app dev so we can all focus on the engagement. This session will describe the work that's been done to bring Swift to the server, both in terms of efforts in the Swift.org projects, and with implementation of server frameworks, and show you how you can quickly create and deploy applications with both server and client components. Presented at the Swift Summit, Nov 7th 2016
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
Chris Bailey
Object Oriented Programming in Swift Ch 0 Encapsulation
Object Oriented Programming in Swift Ch0 - Encapsulation
Object Oriented Programming in Swift Ch0 - Encapsulation
Chihyang Li
現在越來越多服務都使用 ASP.NET Web API 建立,從開發前的規劃、開發進行實作,一直到服務上線的過程應該要做些什麼與注意什麼,在開發的同時如何導入單元測試以及如何實作開發完成後的整合測試,以一個已經上線的 APP 後端 Web Api 服務來做實際案例說明,以及開發的心路歷程。
twMVC#21 | 以實例說明ASP.NET Web API 服務的開發與測試過程
twMVC#21 | 以實例說明ASP.NET Web API 服務的開發與測試過程
twMVC
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
tka
Mais conteúdo relacionado
Destaque
For some, developing for the Android platform might provide their first experience of working with a complex, modern Java API. This may test your knowledge of the Java programming language, especially with regard to features such as generics. The Android APIs make use of generics throughout and so you will have to know how to create and handle generic classes.
Common Java problems when developing with Android
Common Java problems when developing with Android
Stephen Gilmore
Installing Xcode and writing your first simple program. Shows the usefulness of static analysis.
Getting started with Xcode
Getting started with Xcode
Stephen Gilmore
A crash course in Objective-C.
Crash Course in Objective-C
Crash Course in Objective-C
Stephen Gilmore
Swift Tutorial 1
Swift Tutorial 1
Swift Tutorial 1
Jintin Lin
En este taller profundizaremos en el lenguaje de programación Swift. Swift une la potencia de lenguajes como C++ y la sencillez de un lenguaje de script. Según wired.com, tendrá la adopción masiva más rápida de la historia.
Taller Swift - iCon
Taller Swift - iCon
iCon
我們是一個以簡易學習 Swift,希望大家都能享受到 Swift 的樂趣而成立的聚會。在這個聚會中,我們不太談很艱難的東西,只想聊聊每個人都可能可以聽懂跟加入的話題。 這次聚會將會是個相見歡,除了認識大家外,我也會準備一份簡報跟各位聊聊學習 Swift 的東西,內容將以 Raywenderlich 出的 Swift 2 Apprentice 為基礎。 這本書可以在這裡買:https://www.raywenderlich.com/store/swift-apprentice,大家可以先聽過分享後,再看這本書適不適合自己。 這次的分享主要會是這本書的 Chapter1 ~ Chapter3 Chapter 1: Playground Basics(初識遊樂場) Chapter 2: Variables and Constants(變數與常數) Chapter 3: Numeric Types and Operations(數字與運算符) 活動議程: 19:30-20:00 相見歡 20:00-20:30 Swift Apprentice #1 #2 #3 分享 20:30-21:00 自由交流 *本活動由 123App 贊助場地
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Xue Xin Tsai
This slide set describes the submissions which were received for Part 1 of the Software Engineering Large Practical.
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large Practical
Stephen Gilmore
A quick quiz to point out some of the differences between Objective-C and Java.
Quick quiz on Objective-C
Quick quiz on Objective-C
Stephen Gilmore
http://MobileDev.TW
Programming in Objective-C
Programming in Objective-C
Ryan Chung
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and Swift, MVC
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and S...
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and S...
彼得潘 Pan
Although the signs were out there in the open, the introduction of Swift was one of the big surprises of WWDC 2014. In this talk, I've outlined the reasonings why a 30yo language is being phased out and the main improvements introduced in Swift as well as Xcode 6.
To swiftly go where no OS has gone before
To swiftly go where no OS has gone before
Paul Ardeleanu
Standford 2015 week8
Standford 2015 week8
彼得潘 Pan
想用最短的時間內,透過實做,體驗 APP 的開發流程,學習最重要的基本概念嗎?【打造你的第一個iPhone APP】課程,以淺顯易懂的 storyboard 工具,教你打造小王子電子故事書 APP ,讓你第一次寫 APP 就輕鬆上手!由暢銷電腦書《 Swift程式設計入門》作者彼得潘帶領,不管你是想要和工程師溝通的更順暢的 PM、設計,或是想接觸 iOS 開發的新手,由老師親自帶著你,一步一步實際操作,幫助你更快進入iOS的世界!
打造你的第一個iPhone APP
打造你的第一個iPhone APP
彼得潘 Pan
http://MobileDev.TW
NetworkService-Swift
NetworkService-Swift
Ryan Chung
Some examples of programs using arrays in Objective-C.
Arrays in Objective-C
Arrays in Objective-C
Stephen Gilmore
These are the slides of my SXSW 2010 Objective-C Crash Course for Web Developers. The code samples (and the keynote document) can also be downloaded from http://workshop.verbogt.nl/
Objective-C Crash Course for Web Developers
Objective-C Crash Course for Web Developers
Joris Verbogt
http://MobileDev.TW
TrainingProgramAtMobileDevTW
TrainingProgramAtMobileDevTW
Ryan Chung
Swift is the latest new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility.
Swift-Programming Part 1
Swift-Programming Part 1
Mindfire Solutions
Swift is a robust language for mobile but cloud development opens the door to new opportunities for today's top app developers. Integrating projects to backend systems can sometimes be problematic, requiring new tools and skills. It doesn't have to be; end-to-end Swift opens the door to radically simpler app dev so we can all focus on the engagement. This session will describe the work that's been done to bring Swift to the server, both in terms of efforts in the Swift.org projects, and with implementation of server frameworks, and show you how you can quickly create and deploy applications with both server and client components. Presented at the Swift Summit, Nov 7th 2016
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
Chris Bailey
Object Oriented Programming in Swift Ch 0 Encapsulation
Object Oriented Programming in Swift Ch0 - Encapsulation
Object Oriented Programming in Swift Ch0 - Encapsulation
Chihyang Li
Destaque
(20)
Common Java problems when developing with Android
Common Java problems when developing with Android
Getting started with Xcode
Getting started with Xcode
Crash Course in Objective-C
Crash Course in Objective-C
Swift Tutorial 1
Swift Tutorial 1
Taller Swift - iCon
Taller Swift - iCon
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large Practical
Quick quiz on Objective-C
Quick quiz on Objective-C
Programming in Objective-C
Programming in Objective-C
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and S...
Standford 2015 iOS讀書會 week1: 1.Logistics , iOS 8 Overview 2. More Xcode and S...
To swiftly go where no OS has gone before
To swiftly go where no OS has gone before
Standford 2015 week8
Standford 2015 week8
打造你的第一個iPhone APP
打造你的第一個iPhone APP
NetworkService-Swift
NetworkService-Swift
Arrays in Objective-C
Arrays in Objective-C
Objective-C Crash Course for Web Developers
Objective-C Crash Course for Web Developers
TrainingProgramAtMobileDevTW
TrainingProgramAtMobileDevTW
Swift-Programming Part 1
Swift-Programming Part 1
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
Object Oriented Programming in Swift Ch0 - Encapsulation
Object Oriented Programming in Swift Ch0 - Encapsulation
Semelhante a Swift Basic
現在越來越多服務都使用 ASP.NET Web API 建立,從開發前的規劃、開發進行實作,一直到服務上線的過程應該要做些什麼與注意什麼,在開發的同時如何導入單元測試以及如何實作開發完成後的整合測試,以一個已經上線的 APP 後端 Web Api 服務來做實際案例說明,以及開發的心路歷程。
twMVC#21 | 以實例說明ASP.NET Web API 服務的開發與測試過程
twMVC#21 | 以實例說明ASP.NET Web API 服務的開發與測試過程
twMVC
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
tka
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Wen-Tien Chang
Java Jdk6学习笔记[Ppt]
Java Jdk6学习笔记[Ppt]
yiditushe
某年某月 twMVC 分享內容。 從人、事、物三個面向來談專案與效能調教相關內容。
一個微信專案從0到000的效能調教
一個微信專案從0到000的效能調教
Bruce Chen
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Weizhong Yang
Flutter 踩雷心得
Flutter 踩雷心得
Flutter 踩雷心得
Weizhong Yang
02.python.开发最佳实践
02.python.开发最佳实践
Na Lee
This is ASP.Net core v1.0 with MVC 6 introduction.
Asp.net core v1.0
Asp.net core v1.0
chang kuo-chao
這新新板的ASP.Net Core v1.0的入門介紹,裡面包含了ASP.Net Core學習的基本概念,以及新版本的ASP.Net MVC 6.
Asp.net core v1.0
Asp.net core v1.0
國昭 張
it's my own ppt
Html5
Html5
cazhfe
Phalcon2014 Startup for PHPconf Taiwan 2014
Phalcon2014 Startup
Phalcon2014 Startup
Steve Luo
Java 1(Java概述)
Java 1(Java概述)
xzdbd
漫谈php和java
漫谈php和java
sulong
《云原生训练营--Go 语言特性》 1. 为什么需要另外一种语言? 2. Go 语言编译环境设置 3. 控制结构 4. Go 语言常用数据结构 5. Go 语言函数调用 6. 常用语法 7. 多线程 • 深入理解 channel • 基于 channel 编写一个生产者消费者程序
模块一-Go语言特性.pdf
模块一-Go语言特性.pdf
czzz1
105學年度下學期世新大學資管系「iOS程式設計」第二週 本週課程將介紹 Swift 語法並且在 Playground 進行實際撰寫程式。
105-2 iOS程式設計(二)
105-2 iOS程式設計(二)
Hao Lee
de
Android工作坊
Android工作坊
國立政治大學 數位內容碩士學位學程
.NET 開發人員吃飯的工具,號稱地表最強的IDE Visual Studio 現在已經是 2015 版了,本課程將以 Web 開發人員為例介紹各種實務上的 Visual Studio 2015 技巧,以及推薦套件,讓您體驗行雲流水般的 Coding 樂趣。
twMVC#21 | 你所不知道的 Visual Studio
twMVC#21 | 你所不知道的 Visual Studio
twMVC
about java
beidakejian
beidakejian
hanxuebing
PyCon Taiwan 2021 使用 Pytest 進行單元測試 demos: https://tw.pycon.org/2021/zh-hant/conference/tutorial/8
使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)
Max Lai
Semelhante a Swift Basic
(20)
twMVC#21 | 以實例說明ASP.NET Web API 服務的開發與測試過程
twMVC#21 | 以實例說明ASP.NET Web API 服務的開發與測試過程
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Java Jdk6学习笔记[Ppt]
Java Jdk6学习笔记[Ppt]
一個微信專案從0到000的效能調教
一個微信專案從0到000的效能調教
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Flutter 踩雷心得
Flutter 踩雷心得
02.python.开发最佳实践
02.python.开发最佳实践
Asp.net core v1.0
Asp.net core v1.0
Asp.net core v1.0
Asp.net core v1.0
Html5
Html5
Phalcon2014 Startup
Phalcon2014 Startup
Java 1(Java概述)
Java 1(Java概述)
漫谈php和java
漫谈php和java
模块一-Go语言特性.pdf
模块一-Go语言特性.pdf
105-2 iOS程式設計(二)
105-2 iOS程式設計(二)
Android工作坊
Android工作坊
twMVC#21 | 你所不知道的 Visual Studio
twMVC#21 | 你所不知道的 Visual Studio
beidakejian
beidakejian
使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)
Mais de Ryan Chung
Design Voice-First Games for Amazon Alexa
Voice-First Games for Alexa
Voice-First Games for Alexa
Ryan Chung
Talk about AI integration service and using in education.
AI Service Integration - Education
AI Service Integration - Education
Ryan Chung
AWS AI, MS AI
AI Service Integration
AI Service Integration
Ryan Chung
產業AI化調查
AI Adoption in the Enterprise
AI Adoption in the Enterprise
Ryan Chung
https://MobileDev.TW
Intro to Dialogflow Chatbot Development
Intro to Dialogflow Chatbot Development
Ryan Chung
How to use AI technology from Microsoft, AWS in classroom?
AI in Classroom
AI in Classroom
Ryan Chung
Focus on AI Services, DeepRacer & Alexa skill updates
AWS re:Invent 2018 Recap
AWS re:Invent 2018 Recap
Ryan Chung
Chatbot Development - Get Movie Intro
MovieBot
MovieBot
Ryan Chung
Dialogflow / Bot Framework / Custom Vision
Service Integration Workshop
Service Integration Workshop
Ryan Chung
Microsoft x III
MPP AI
MPP AI
Ryan Chung
http://MobileDev.TW
Smart Home Intro Lab
Smart Home Intro Lab
Ryan Chung
https://MobileDev.TW
Introduction to DialogFlow
Introduction to DialogFlow
Ryan Chung
https://mobiledev.tw
Conversational AI Orientation
Conversational AI Orientation
Ryan Chung
http://MobileDev.TW
Udacity Meet Up - 0413
Udacity Meet Up - 0413
Ryan Chung
http://MobileDev.TW
Amazon Alexa Development Part II
Amazon Alexa Development Part II
Ryan Chung
http://MobileDev.TW
Amazon Alexa Development
Amazon Alexa Development
Ryan Chung
http://MobileDev.TW
Microsoft Professional Program - AI
Microsoft Professional Program - AI
Ryan Chung
http://MobileDev.TW
AI Service Integration
AI Service Integration
Ryan Chung
http://MobileDev.TW
Intro to AI
Intro to AI
Ryan Chung
http://MobileDev.TW
Hour of Code - Amazon Alexa
Hour of Code - Amazon Alexa
Ryan Chung
Mais de Ryan Chung
(20)
Voice-First Games for Alexa
Voice-First Games for Alexa
AI Service Integration - Education
AI Service Integration - Education
AI Service Integration
AI Service Integration
AI Adoption in the Enterprise
AI Adoption in the Enterprise
Intro to Dialogflow Chatbot Development
Intro to Dialogflow Chatbot Development
AI in Classroom
AI in Classroom
AWS re:Invent 2018 Recap
AWS re:Invent 2018 Recap
MovieBot
MovieBot
Service Integration Workshop
Service Integration Workshop
MPP AI
MPP AI
Smart Home Intro Lab
Smart Home Intro Lab
Introduction to DialogFlow
Introduction to DialogFlow
Conversational AI Orientation
Conversational AI Orientation
Udacity Meet Up - 0413
Udacity Meet Up - 0413
Amazon Alexa Development Part II
Amazon Alexa Development Part II
Amazon Alexa Development
Amazon Alexa Development
Microsoft Professional Program - AI
Microsoft Professional Program - AI
AI Service Integration
AI Service Integration
Intro to AI
Intro to AI
Hour of Code - Amazon Alexa
Hour of Code - Amazon Alexa
Swift Basic
1.
http://MobileDev.TWSwift Programming iOS APP
Developer Swift 語法入門 Ryan@MobileDev.TW 1
2.
http://MobileDev.TWSwift Programming Swift • 支援playground,可快速測試 •
效能最佳化 • 可以從Hello World到甚至作業系統都可開發 2
3.
http://MobileDev.TWSwift Programming 大綱 1. Hello
Swift! Xcode環境認識 2. 變數與常數 3. 陣列與字典 4. 控制流程 5. 函數 6. 物件與類別 3
4.
http://MobileDev.TWSwift Programming 1.Hello Swift!
Xcode環境認識 4
5.
http://MobileDev.TWSwift Programming 1.選擇Create a
new Xcode project 5
6.
http://MobileDev.TWSwift Programming 2.選擇macOS-Command Line
Tool 6
7.
http://MobileDev.TWSwift Programming Xcode的樣板專案分類介紹 7
8.
http://MobileDev.TWSwift Programming 3.輸入專案名稱,語言選Swift,存檔 8
9.
http://MobileDev.TWSwift Programming 4.執行應用程式 9
10.
http://MobileDev.TWSwift Programming 重點理解 1. main.swift是程式的進入點 2.
Import匯入基本程式所需的Framework 3. 利用print來輸出資訊於console 10
11.
http://MobileDev.TWSwift Programming What is
print? 游標放在print上,按下alt,看到問號後按下滑鼠左鍵 11
12.
http://MobileDev.TWSwift Programming 任務:輸出相加結果 12
13.
http://MobileDev.TWSwift Programming 變數/常數宣告 你會不會變… 13
14.
http://MobileDev.TWSwift Programming 變數與常數 • let:宣告常數 •
很多地方要用且不會改變,只指定值一次 • var:宣告變數 14
15.
http://MobileDev.TWSwift Programming 指定變數/常數的資料型態 • 常數/變數名稱
: 資料型態 • 可先宣告再給值 或 直接給值 15
16.
http://MobileDev.TWSwift Programming Convert value
to different type 16
17.
http://MobileDev.TWSwift Programming Type conversion
in string (string interpolation) 17
18.
http://MobileDev.TWSwift Programming 常數/變數也可先做運算 18
19.
http://MobileDev.TWSwift Programming 多種型態一起輸出 19
20.
http://MobileDev.TWSwift Programming 字串相加 20
21.
http://MobileDev.TWSwift Programming 註解 • 單行:
// • 多行: /* …… */ 21
22.
http://MobileDev.TWSwift Programming 陣列與字典 Array
Dictionary 22
23.
http://MobileDev.TWSwift Programming 字典 Dictionary 23
24.
http://MobileDev.TWSwift Programming 改變字典某項目的值 24
25.
http://MobileDev.TWSwift Programming 建立一個空的字典 25
26.
http://MobileDev.TWSwift Programming 字典取值 26
27.
http://MobileDev.TWSwift Programming 陣列取值 27
28.
http://MobileDev.TWSwift Programming 建立一個空的陣列 28
29.
http://MobileDev.TWSwift Programming 大量調整陣列 29
30.
http://MobileDev.TWSwift Programming 陣列排序 順著排 30 倒著排
31.
http://MobileDev.TWSwift Programming You should
got it NOW • Xcode可以製作哪些種類的應用程式 • 如何查閱進一步解釋 • 如何跳至匯入程式碼的原始位置 • 如何使用print顯示變數的值 • 變數與常數該如何宣告 • 陣列與字典是什麼?要如何存取? 31
32.
http://MobileDev.TWSwift Programming 控制流程 重複的工作請電腦幫你完成 32
33.
http://MobileDev.TWSwift Programming 控制流程 • if •
switch • for-in • for • while • repeat-while 33
34.
http://MobileDev.TWSwift Programming 計算優秀與不及格的數量 34
35.
http://MobileDev.TWSwift Programming Optional Value 你若是不在了,我會… 35
36.
http://MobileDev.TWSwift Programming Optional Value •
標示出可能為空值的風險 • 標示方式:? 問號 36
37.
http://MobileDev.TWSwift Programming 如果有值才…的寫法 if
let 37
38.
http://MobileDev.TWSwift Programming Why Swift
need optional? 1. 有些情況會讓方法本身無法回傳值 • var x=ABC.toInt() 2. 有些物件建構時,還沒有辦法決定某個屬性值 • 畫面上的按鈕要在哪裡 38
39.
http://MobileDev.TWSwift Programming 安全地處理有值與無值的狀況 將 x可能的兩種情況分開處理 39
40.
http://MobileDev.TWSwift Programming if不用括號,但是一定要是判斷式或布林值 在Swift中,if後面一定要接判斷式或是布林值 40
41.
http://MobileDev.TWSwift Programming Swift 3
不能用 ++ 在Swift中,if後面一定要接判斷式或是布林值 41
42.
http://MobileDev.TWSwift Programming 很確定有值的情況,驚嘆號解開! 42
43.
http://MobileDev.TWSwift Programming Optional Chaining 問號除了用在宣告外,也可以繼續跟著變數走,持續 為optional
type 43
44.
http://MobileDev.TWSwift Programming as? 與as! •
as? • 轉換型態但維持是optional,所以還是需要搭配if let 比較保險 • as! • 強制轉換型態,並且解開 44
45.
http://MobileDev.TWSwift Programming Switch..Case • 支援資料型態更廣泛 •
可多個狀況合併在一起(逗號分開) • 可使用判斷式 • 不用寫break,對應到執行完case就離開 • default一定要寫 45
46.
http://MobileDev.TWSwift Programming Switch..Case 多種狀況對應用逗號隔開 46
47.
http://MobileDev.TWSwift Programming Switch..Case 可使用判斷式 47
48.
http://MobileDev.TWSwift Programming Switch..Case 如果沒寫default會出什麼錯? 48
49.
http://MobileDev.TWSwift Programming 任務 請電腦幫我印出 1
~ 10 49
50.
http://MobileDev.TWSwift Programming For迴圈 50
51.
http://MobileDev.TWSwift Programming 任務 抓出不及格的學生 51
52.
http://MobileDev.TWSwift Programming for in 52
53.
http://MobileDev.TWSwift Programming 任務 找到女生 53
54.
http://MobileDev.TWSwift Programming for in 54
55.
http://MobileDev.TWSwift Programming 找到最大值 55
56.
http://MobileDev.TWSwift Programming Lab:顯示最大值的Key值 56
57.
http://MobileDev.TWSwift Programming while迴圈 57
58.
http://MobileDev.TWSwift Programming 任務:repeat…while • 當我們跟別人說話時,有些時候別人沒有聽到,所 以我們會重複說一次,直到對方聽到為止 •
請用程式模擬,亂數決定對方有沒有聽到,並印出 對對方說的話 58
59.
http://MobileDev.TWSwift Programming Function 函數 這個箱子有進有出,為了特定功能而存在著 59
60.
http://MobileDev.TWSwift Programming 最基本的函數:0進0出 • 關鍵字:func 60
61.
http://MobileDev.TWSwift Programming 有產出的函數:0進1出 • -傳回值資料型態 61
62.
http://MobileDev.TWSwift Programming 有輸入有產出的函數:1進1出 • 傳入變數名稱:變數資料型態 62
63.
http://MobileDev.TWSwift Programming 多輸入有產出的函數:2進1出 • 多個輸入變數用逗號隔開 63
64.
http://MobileDev.TWSwift Programming 多產出的函數:1進3出 • 多個輸出變數用逗號隔開,取值透過點運算子 64
65.
http://MobileDev.TWSwift Programming 不定量的多變數輸入 65
66.
http://MobileDev.TWSwift Programming Lab:改寫上個範例,計算平均 66
67.
http://MobileDev.TWSwift Programming 物件與類別 Object
Class 67
68.
http://MobileDev.TWSwift Programming 從一個簡單的分數開始 68
69.
http://MobileDev.TWSwift Programming 目前我們透過直接給值來顯示分數 指定固定的分子與分母 69
70.
http://MobileDev.TWSwift Programming 顯示一個分數 70
71.
http://MobileDev.TWSwift Programming 現在我們希望蓋一間工廠,給它分子 與分母,它就產生分數給我們 類別的初體驗 71
72.
http://MobileDev.TWSwift Programming 建立類別 • 建立一個運算分數的類別 •
裡面有分子、分母 • 有輸入分子的方法 • 有輸入分母的方法 • 有輸出結果的方法 類別就像是生產工廠的運 作機制,建立了類別,就 可以根據這個類別,創造 出一個個的物件來使用。 72
73.
http://MobileDev.TWSwift Programming 建立類別 73
74.
http://MobileDev.TWSwift Programming Swift 術語小字典:iVar •
實體變數(instance variable) • 簡稱 iVar • 相當於一個類別中的屬性定義 就像是一個工廠的儲 存空間。 在設計類別時,需要 思考有哪些東西需要 一個儲存空間,這些 東西會被各個運作部 門所使用。 74
75.
http://MobileDev.TWSwift Programming 蓋一間工廠,需要說明有哪些成員、 裡面有哪些機器在運作,並且實際把 這些機器的運作流程都描述清楚 你給我豬肉,我給你香腸 75
76.
http://MobileDev.TWSwift Programming 使用類別來生成實體 76
77.
http://MobileDev.TWSwift Programming 來寫一個計算機! 讓我們一起再蓋一間更完善的工廠吧 77
78.
http://MobileDev.TWSwift Programming 來寫一個計算機! • 建立一個計算機類別,裡面放一個iVar來儲存結果 •
初始化結果 • 計算用的方法 • 加法 • 減法 • 乘法 • 除法 78
79.
http://MobileDev.TWSwift Programming 建立類別 79
80.
http://MobileDev.TWSwift Programming 使用類別 80
81.
http://MobileDev.TWSwift Programming 繼承的概念 從0開始太累了,借用前人種的樹吧! 81
82.
http://MobileDev.TWSwift Programming 3-1.運用繼承再客製化類別 • 設計一個正方形類別 1.
若原先已經有矩形類別,那就繼承它,創一個正方形類別 2. 再增加正方形需要用的屬性與方法 3. 正方形這個類別,可以使用矩形類別中的屬性與方法 矩形類別 iVar Ra; iVar Rb; Method R1; Method R2; 正方形類別 : 矩形類別 iVar Ra; iVar Rb; Method R1; Method R2; iVar Sa; iVar Sb; Method S1; Method S2; 82
83.
http://MobileDev.TWSwift Programming 繼承的運作 • 父類別的所有實體變數與方法,都會成為子類別定 義的一部份。 •
子類別可以直接存取這些方法與實體變數。 • 首先會先確認該變數或方法是否存在目前物件的類 別定義中,若沒有,則會往父類別去尋找。 83
84.
http://MobileDev.TWSwift Programming 建立一個一般形狀的類別 84
85.
http://MobileDev.TWSwift Programming Lab 1. 增加一個iVar為let資料型態,裡面儲存圖案名稱 2.
增加一個有輸入變數的方法,可設定為幾邊形 85
86.
http://MobileDev.TWSwift Programming Lab 86
87.
http://MobileDev.TWSwift Programming 自訂初始化方法 87
88.
http://MobileDev.TWSwift Programming 繼承:建立正方形類別 88
89.
http://MobileDev.TWSwift Programming Lab:建立一個圓形的類別 1. 製作一個新的類別叫Circle 2.
初始化中輸入半徑、名稱 3. 實作area、simpleDescription方法 89
90.
http://MobileDev.TWSwift Programming Lab 90
91.
http://MobileDev.TWSwift Programming 全部都寫在一起,萬一程式碼很多怎麼辦 把類別放在不同的檔案中 91
92.
http://MobileDev.TWSwift Programming 用檔案來區分用途 • 全部寫在一起難 以管理 •
一個類別一個檔案 class A{ …. } class B{ …. } class C{ …. } class D{ …. } class E{ …. } A.swift B.swift C.swift D.swift E.swift 92
93.
http://MobileDev.TWSwift Programming Lab 請將Shape, Square,
Circle分別獨立成檔案,並且測 試是否仍可在main.swift中順利建立實體 93
94.
http://MobileDev.TWSwift Programming 如何增加檔案? Step1.點選欲新增檔案的位置,滑鼠右鍵,New File… 94
95.
http://MobileDev.TWSwift Programming 如何增加檔案? Step2.決定要製作的檔案類型,再按下Next 95
96.
http://MobileDev.TWSwift Programming 如何增加檔案? Step3.命名為該Class名稱,然後把類別宣告程式碼搬 移過去 96