这篇文章希望记录自学苹果软件编程的全过程,写作的过程是希望实现第一个小目标上线一款个人ios应用,并实现个人创作价值的变现,赢得用户的积极反馈。
A 自学重要站点
Apple Developer
SwiftUI Pathway
SwiftUI Pathway - Apple Developer
B 自学课程
1. Swift Programming Tutorial for Beginners (Full Tutorial)
https://www.youtube.com/watch?v=Ulp1Kimblg0&t=11400s
2. 斯坦福CS193P 2021春季SwiftUI 2.0课程
【完结·双语字幕】斯坦福CS193P 2021春季SwiftUI 2.0课程_哔哩哔哩_bilibili
3. SwiftUI Fundamentals | FULL COURSE | Beginner Friendly
https://www.youtube.com/watch?v=b1oC7sLIgpI
C 自学笔记
下面是自学的相关笔记和一些学习体会,以备查漏补缺。
1. Swift初学者编程入门
【课程简介和自学体会】这个基础课程第一次学完的时间是2023年的1月份,是一个Chris为自己的Swift编程社区引流的0基础入门课程,内容比较基础和简单,时长3个半小时左右,比较系统搭建起了SwiftUI基础语法内容,但如果继续实战App编写的话需要去到对应官网解锁完整课程和社区讨论功能,月度订阅40刀,年度订阅400刀左右,一次性买断收费1499美刀,瞬间自学的驱动力又增加了呢:)
【原作者的课程介绍】Learn how to code with Swift in one single tutorial! We'll go through all the core concepts of Swift including: Variables and Constants, Data Types, Properties, Functions and Parameters, Classes, IF Statements And a lot more!
This Swift course also comes with notes, cheatsheets, exercises and solutions which you can download here:
Swift Tutorial Resources : CodeWithChris
🚨 SPECIAL CWC+ OFFER FOR YOUTUBE:
CWC+ Welcome Offer : CodeWithChris
𝗩𝗶𝗱𝗲𝗼 𝗧𝗶𝗺𝗲s𝘁𝗮𝗺𝗽𝘀:
00:00 Variables
15:13 Data Type
22:23 If Statements
38:01 Switch Statements
44:26 Loops (I)
54:48 Loops (II)
01:01:02 Functions (I)
01:10:39 Functions (II)
01:27:16 Classes (I)
01:38:36 Classes (II)
01:50:58 UIKit
01:57:26 Initializers (I)
02:05:41 Optionals
02:20:48 Properties
02:37:44 Initializers (II)
02:44:41 Arrays
02:58:22 Dictionaries
03:09:50 Outro
03:10:14 End of Stream (Nothing to see)
MY FREE ONLINE COURSE:
⚡ How to make an app in 14 days - https://cwc.to/14days
CWC+ PROGRAM:
👩💻 All our courses in a learning path - https://cwc.to/plus
WEEKLY UPDATES VIA EMAIL:
✉️ Every Saturday, receive an email digest of new content - https://cwc.to/newsletter
CONNECT:
🌍 Website - https://codewithchris.com
😺 GitHub - https://github.com/codewithchris
📸 Instagram - / codewithchris
🐦 Twitter - / codewithchris
ABOUT CODEWITHCHRIS:
Hi I’m Chris! I’m dedicated to teaching fundamentals about how to make an app. This is important if you’re trying to land an iOS job, be a freelancer, increase or start a business with an app idea. On this channel and my website, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have learned to code and build apps on their own! https://cwc.to/reviews
课后作业:
Introduction to Learn Swift coding challenges!
Ready to start honing those swift skills you just learned? Then look no further as these extra challenges will not only help you practice but also help you recap on what you have learned so far.
So get those brain juices flowing and get those hands busy typing because it's challenge time!
For the full playlist please use this link:
For the current updated solutions please use this link:
http://bit.ly/LearnSwiftChallengesSolution
If you don’t have a mac or are having problems with XCode you can use this online playground:
=============================
1. Swift Programming Tutorial for Beginners(Full Tutorial)
Swift Programming Tutorial for Beginners(Full Tutorial)_swift for beginners pdf-CSDN博客
2. Swift Programming Tutorial for Beginners-14day Tutorial
Swift Programming Tutorial for Beginners-14day Tutorial_ios 14 programming for beginners: get-CSDN博客
3. Swift Programming-Learning day3
Swift Programming-Learning day3-CSDN博客
4. Swift Programming-Note 04
Swift Programming-Note 04_swift .padding(.horizontal)-CSDN博客
5. Swift Programming-Note 05-MVVM
Swift Programming-Note 05-MVVM-CSDN博客
6. Swift Programming-Note 06
https://blog.csdn.net/weixin_43464653/article/details/122904803?spm=1011.2415.3001.5331
以上笔记和内容记录于2022年年初。
7. Swift 项目实践-美食护照
以下项目是本人根据个人的生活习惯,结合真实使用场景的需求研发,并且本着学以致用和用我所学的原则,玩成了大作业美食护照。
课程内容Cheetsheet
2. 斯坦福CS193P 2021春季SwiftUI 2.0课程
作为一个大学期间只学过C语言的理工科学生,我觉得这个视频的难度对我来说比较大[笑哭]可以理解代码但是组合起来就比较困难了。从寒假到现在自学两三个月了,我的建议是首先完成Swift Playground官方教程,然后去Exercism上练习,结合油管上Sean Allen的教程可以更好地学习swiftui,最后再来看这个教程可能会轻松不少。(From ZhenghangWu Bilibili)
3. SwiftUI Fundamentals
【自学体会】这个Sean Allen的课程是更注重实践的具体细节,时长12个小时,共需要做4个APP,第一个是一个天气APP,主要学习ios开发的基本视图排列方式和建立不同属性设置顺序和参数的使用情况。学完之后想学习页面间的切换和信息获取和展示方式。
第二个APP是一个工具箱APP,把开发者常用的UIKit放到一个软件内部做索引,方便开发时学习和使用。
第三个APP时一个扫码器,用来真刀真枪学习API的查阅和调用方法。
最后一个APP是一个电子开胃菜菜谱,介绍和展示美食APP,用于餐馆点餐服务等场景。
【原文课程简介】
Get your start in SwiftUI with SwiftUI Fundamentals. In this 12 hour course we build 4 apps that ramp up in difficulty. The first 3 apps are quite simple, but the 4th and final app grows substantialy in size and challenge. See the timestamps at the bottom of the description for the full curriculum.
The course has been updated for iOS 15 and iOS 16.
If you want a structured viewing experience with a comment section on each individual video, this course is also available (for free) at https://seanallen.teachable.com.
App 1 Weather:
We learn the absolute basics of SwiftUI to build the user interface of a weather app. If you have experience with SwiftUI, feel free to skip this one as it's very beginner friendly.
Weather Completed Source Code (Updated for iOS 16):
https://www.dropbox.com/scl/fo/sh092hs8fnwxwa169kkre/h?rlkey=5l9h82p95con0bu9usc2s1wg3&e=1&dl=0
App 2 - Apple Frameworks:
We learn to build a Grid and pass data from our main view to a detail view.
Framework icon images:
https://www.dropbox.com/scl/fo/lijj23qlv9eiblta13z61/h?rlkey=79h2tiegl2ysood23qcvfxo85&e=1&dl=0
Apple Frameworks Completed Source Code (Updated for iOS 16):
https://www.dropbox.com/scl/fo/5zvhvulzemu74sit9qn96/h?rlkey=pc8nycuc6eejy8rb8j9szfvhm&e=1&dl=0
App 3 - Barcode Scanner:
We learn to use UIViewRepresentable to connect SwiftUI and UIKit in case SwiftUI doesn't support a type of user interface you want.
Barcode Scanner Completed Source Code:
https://www.dropbox.com/scl/fo/iy2ymc4jcrz7vfh2wqxzk/h?rlkey=8055hc325k07rji6hapgifcw1&e=1&dl=0
App 4 - Appetizers:
This app is a big one where we put it all our learnings together to build a proper SwiftUI app that works with a network call (updated to Async/Await in iOS 15).
Appetizers Completed Source Code (updated for iOS 16):
https://www.dropbox.com/scl/fo/0h5kub6len9jkghiwj6gz/h?rlkey=uf04zyhvww722jksfrech2up4&e=1&dl=0
What's New in Xcode 15:
• Xcode 15 - What's New
What's New in Xcode 14:
• What's New in Xcode 14
What's New in Xcode 13:
• What's New in Xcode 13
What's New in SwiftUI WWDC 2021:
What's new in SwiftUI - WWDC21 - Videos - Apple Developer
What's New in SwiftUI WWDC 2022:
What's new in SwiftUI - WWDC22 - Videos - Apple Developer
What's New in SwiftUI WWDC 2023:
What’s new in SwiftUI - WWDC23 - Videos - Apple Developer
Twitter:
Sean Allen - / seanallen_dev
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Paul Hudson's Hacking With Swift:
https://gumroad.com/a/762098803
Donny Wals - Combine:
https://gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
https://gumroad.com/a/656585843
#swift #swiftui #iosdeveloper
App 1 - Weather APP
Timestamps:
0:00 - What you will learn & updates
6:30 - SwiftUI Basics - Weather App 大致介绍了Hstack Vstack和Zstack(层叠布局,后面在上,前面在下)的区别。
//
// ContentView.swift
// SwiftUI-Weather
//
// Created by Dominic on 2025/3/24.
//
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
Color(.blue)
LinearGradient(gradient: Gradient(colors: [.blue, .red, .green, .white]), startPoint: .topLeading, endPoint: .bottomTrailing)
.edgesIgnoringSafeArea(.all)
}
.padding()
}
}
#Preview {
ContentView()
}
去除paddings的效果
颜色梯度参数修改后效果
19:01 - Weather - Text 主要介绍怎么添加文本信息以及可以调整的参数,有font foregroundColor以及padding,frame,spacer等
//
// ContentView.swift
// SwiftUI-Weather
//
// Created by Dominic on 2025/3/24.
//
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
Color(.blue)
LinearGradient(gradient: Gradient(colors: [.blue, .white]),
startPoint: .topLeading,
endPoint: .bottomTrailing)
.edgesIgnoringSafeArea(.all)
VStack{
Text("Cupertino, CA")
.font(.system(size: 32, weight: .medium, design: .default))
.foregroundColor(.white)
.padding()
Spacer()
}
}
}
}
#Preview {
ContentView()
}
25:54 - Weather - SF Symbols
29:13 - Weather - Main VStack 基础的icon调用方法和Imang以及Text的可用参数介绍。
//
// ContentView.swift
// SwiftUI-Weather
//
// Created by Dominic on 2025/3/24.
//
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
Color(.blue)
LinearGradient(gradient: Gradient(colors: [.blue, .white]),
startPoint: .topLeading,
endPoint: .bottomTrailing)
.edgesIgnoringSafeArea(.all)
VStack{
Text("Cupertino, CA")
.font(.system(size: 32, weight: .medium, design: .default))
.foregroundColor(.white)
.padding()
VStac