- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio
- Hacking with iOS: SwiftUI Editio

本系列课程来自Hacking with iOS: SwiftUI Edition,学习的同时,记录于此,希望更多人能够好好学习,天天向上!
项目 1: WeSplit
通过第一个项目学习SwiftUI的基础知识
概览
实现
挑战
项目 2: Guess the Flag 猜国旗
使用 stacks, images, 和 alerts开发一个游戏
概览
实现
挑战
项目 3: Views and Modifiers 视图和修饰符
深入研究Swift的渲染系统
概览
概念
高级用法
挑战
Project 4: BetterRest
使用机器学习改善睡眠
Overview
Implementation
Challenges
Project 5: Word Scramble
用列表构建字母排列游戏
Overview
Implementation
Challenges
Project 6: Animation
用动画来美化用户界面
Overview
Basics
Advanced Usage
- Controlling the animation stack
- Animating gestures
- Showing and hiding views with transitions
- Building custom transitions using ViewModifier
Project 7: iExpense
Bring in a second view with this expense tracking app
Overview
- iExpense: Introduction
- Why @State only works with structs
- Sharing SwiftUI state with @ObservedObject
- Showing and hiding views
- Deleting items using onDelete()
- Storing user settings with UserDefaults
- Archiving Swift objects with Codable
Implementation
- Building a list we can delete from
- Working with Identifiable items in SwiftUI
- Sharing an observed object with a new view
- Making changes permanent with UserDefaults
- Final polish
Challenges
Project 8: Moonshot
Teach users about space history with scroll views, Codable, and more
Overview
- Moonshot: Introduction
- Resizing images to fit the screen using GeometryReader
- How ScrollView lets us work with scrolling data
- Pushing new views onto the stack using NavigationLink
- Working with hierarchical Codable data
- Loading a specific kind of Codable data
- Using generics to load any kind of Codable data
Implementation
- Formatting our mission view
- Showing mission details with ScrollView and GeometryReader
- Merging Codable structs using first(where:)
- Fixing problems with buttonStyle() and layoutPriority()
Challenges
Project 9: Drawing
Use shapes, paths, colors, and more to create custom art for your app
Paths and Shapes
- Drawing: Introduction
- Creating custom paths with SwiftUI
- Paths vs shapes in SwiftUI
- Adding strokeBorder() support with InsettableShape
Customization and Performance
-
Transforming shapes using CGAffineTransform and even-odd fills
-
Enabling high-performance Metal rendering with drawingGroup()
Special Effects and Animation
- Special effects in SwiftUI: blurs, blending, and more
- Animating simple shapes with animatableData
- Animating complex shapes with AnimatablePair
- Creating a spirograph with SwiftUI
Project 10: Cupcake Corner
Build an app that sends and receives JSON from the internet
Overview
- Cupcake Corner: Introduction
- Adding Codable conformance for @Published properties
- Sending and receiving Codable data with URLSession and SwiftUI
- Validating and disabling forms
Implementation
- Taking basic order details
- Checking for a valid address
- Preparing for checkout
- Encoding an ObservableObject class
- Sending and receiving orders over the internet
Challenges
Project 11: Bookworm
Use Core Data to build an app that tracks books you like
Overview
- Bookworm: Introduction
- Creating a custom component with @Binding
- Using size classes with AnyView type erasure
- How to combine Core Data and SwiftUI
Implementation
- Creating books with Core Data
- Adding a custom star rating component
- Building a list with @FetchRequest
- Showing book details
- Sorting fetch requests with NSSortDescriptor
- Deleting from a Core Data fetch request
- Using an alert to pop a NavigationLink programmatically
Challenges
Project 12: Core Data
Take an in-depth tour of how SwiftUI and Core Data work together
Basics
- Core Data: Introduction
- Why does .self work for ForEach?
- Creating NSManagedObject subclasses
- Conditional saving of NSManagedObjectContext
- Ensuring Core Data objects are unique using constraints
Advanced Techniques
- Filtering @FetchRequest using NSPredicate
- Dynamically filtering @FetchRequest with SwiftUI
- One-to-many relationships with Core Data, SwiftUI, and @FetchRequest
Challenges
Project 13: Instafilter
Learn to link SwiftUI, UIKit, and Core Image in one app
Overview
- Instafilter: Introduction
- How property wrappers become structs
- Creating custom bindings in SwiftUI
- Showing multiple options with ActionSheet
- Integrating Core Image with SwiftUI
- Wrapping a UIViewController in a SwiftUI view
- Using coordinators to manage SwiftUI view controllers
- How to save images to the user’s photo library
Implementation
- Building our basic UI
- Importing an image into SwiftUI using UIImagePickerController
- Basic image filtering using Core Image
- Customizing our filter using ActionSheet
- Saving the filtered image using UIImageWriteToSavedPhotosAlbum()
Challenges
Project 14: Bucket List
Embed maps and make network calls in this life goals app
Overview
- Bucket List: Introduction
- Adding conformance to Comparable for custom types
- Writing data to the documents directory
- Switching view states with enums
- Integrating MapKit with SwiftUI
- Communicating with a MapKit coordinator
- Using Touch ID and Face ID with SwiftUI
Implementation
- Advanced MKMapView with SwiftUI
- Customizing MKMapView annotations
- Extending existing types to support ObservableObject
- Downloading data from Wikipedia
- Sorting Wikipedia results
- Making someone else’s class conform to Codable
- Locking our UI behind Face ID
Challenges
Project 15: Accessibility
Learn how to make your apps available to everyone
Overview
- Accessibility: Introduction
- Identifying views with useful labels
- Hiding and grouping accessibility data
- Reading the value of controls
Fixing Projects
Challenges
Project 16: Hot Prospects
Build an app for conferences with tabs, context menus, and more.
Overview
- Hot Prospects: Introduction
- Reading custom values from the environment with @EnvironmentObject
- Creating tabs with TabView and tabItem()
- Understanding Swift’s Result type
- Manually publishing ObservableObject changes
- Controlling image interpolation in SwiftUI
- Creating context menus
- Scheduling local notifications
- Adding Swift package dependencies in Xcode
Implementation
- Building our tab bar
- Sharing data across tabs using @EnvironmentObject
- Dynamically filtering a SwiftUI List
- Generating and scaling up a QR code
- Scanning QR codes with SwiftUI
- Adding options with a context menu
- Saving and loading data with UserDefaults
- Posting notifications to the lock screen
Challenges
Project 17: Flashzilla
Use gestures and haptics to build a learning app.
Overview
- Flashzilla: Introduction
- How to use gestures in SwiftUI
- Making vibrations with UINotificationFeedbackGenerator and Core Haptics
- Disabling user interactivity with allowsHitTesting()
- Triggering events repeatedly using a timer
- How to be notified when your SwiftUI app moves to the background
- Supporting specific accessibility needs with SwiftUI
Implementation
- Designing a single card view
- Building a stack of cards
- Moving views with DragGesture and offset()
- Coloring views as we swipe
- Counting down with a Timer
- Ending the app with allowsHitTesting()
- Making iPhones vibrate with UINotificationFeedbackGenerator
- Fixing the bugs
- Adding and deleting cards
Challenges
Project 18: Layout and Geometry
Explore the inner workings of SwiftUI's layout system.
Positioning
- Layout and geometry: Introduction
- How layout works in SwiftUI
- Alignment and alignment guides
- How to create a custom alignment guide
- Absolute positioning for SwiftUI views
GeometryReader
Project 19: SnowSeeker
Build an app for ski resorts that works great on iPad.
Overview
- SnowSeeker: Introduction
- Working with two side by side views in SwiftUI
- Using alert() and sheet() with optionals
- Using groups as transparent layout containers
Implementation
- Building a primary list of items
- Making NavigationView work in landscape
- Creating a secondary view for NavigationView
- Changing a view’s layout in response to size classes
- Binding an alert to an optional string
- Letting the user mark favorites
网友评论