Skip to content

Instantly share code, notes, and snippets.

@samhenrigold
samhenrigold / _WWDC25 AI-ML Group Lab.md
Last active June 18, 2025 03:44
WWDC25 Machine Learning and AI Frameworks group lab

(Summary generated by ChatGPT based on the automatic transcription. Transcript is attached to this Gist)

Panelists:

  • Host: Shashank

  • Panelists: Michael, Erik, Richard, Ronan


Also, if you have a bug or a feature request, please go to bugreporter.apple.com. Today we want to focus on questions that will help the broader audience. So, please send us your questions using the Slido panel here in WebEx. Once our moderators approve the questions, they'll appear for everyone to up vote, so we can narrow in on the questions that are of most interest to all of you. So let's jump in. I'm going to claim moderator privilege and start with a couple of questions that I'm particularly interested in. So the first thing I would like to talk about to get the ball rolling is, I just want to ask each of you what your favorite new Swift UI API is this year. Summer, why don't you kick us off? All right, I'm gonna have to go with our new rich text editor. was a big labor of love for my team, and it was super fun, 'cause we got to work cross functionally with foundation, text kit, cortex, UAKit, app kit, everybody. Excellent. Nick, how about you? Uh, for me, this is definitely a safe area bar, kind of an
import SwiftUI
struct ContentView: View {
var body: some View {
TextShape(sample)
.fill(.orange)
.stroke(.blue, lineWidth: 2)
}
var sample: AttributedString {
@TAATHub
TAATHub / ChipsSelection.swift
Last active April 17, 2025 18:21
Responsive Chips Selection
// Responsive Chips Selection
// See Also: https://youtu.be/T82izB2XBMA?si=Cnf6rGdyisG8ZWoX
import SwiftUI
struct Tag: Hashable {
var name: String
var color: Color
}
@Koshimizu-Takehito
Koshimizu-Takehito / SolarSystemView2.swift
Last active March 14, 2025 07:53
地動説と天動説のアニメーション
import SwiftUI
struct Star: Hashable, Identifiable {
var id = UUID()
var color: Color
var speed: Double
static var sun: Star {
Star(color: .red.mix(with: .orange, by: 0.2), speed: 1)
}
@mireabot
mireabot / WorkoutSetsCard.swift
Created March 12, 2025 17:45
WorkoutSetsCard
import SwiftUI
// MARK: - Exercise Data Model
struct ExerciseSet: Identifiable {
let id = UUID()
var weight: Double
var reps: Int
var isCompleted: Bool = false
}
@mireabot
mireabot / FinancialHealthSheet.swift
Last active April 7, 2025 07:39
FinancialHealthSheet
import SwiftUI
struct FinancialHealthSheetPreview: View {
@State private var showFinancialHealthSheet = false
var body: some View {
VStack {
Button(action: {
showFinancialHealthSheet.toggle()
}, label: {
HStack {
@Koshimizu-Takehito
Koshimizu-Takehito / SolarSystem.swift
Created March 8, 2025 14:49
地動説っぽいアニメーション
import SwiftUI
struct ContentView: View {
@State var start: Date = .now
var body: some View {
TimelineView(.animation) { context in
let progress = context.date.timeIntervalSince(start) / 10
ZStack {
Sphere(color: .red).frame(width: 30)
@mireabot
mireabot / WorkoutExpandedCard.swift
Created March 7, 2025 16:38
WorkoutExpandedCard
// Workout data model
struct WorkoutData {
let name: String
let date: Date
let duration: TimeInterval
let exerciseCount: Int
let effortPercentage: Double
}
struct WorkoutExpandedCard: View {
@Koshimizu-Takehito
Koshimizu-Takehito / CountdownView.swift
Last active June 15, 2025 19:39
カウントダウンアニメーション
import SwiftUI
// https://x.com/TAAT626/status/1895841081365053901
// https://gist.github.com/TAATHub/8f9e7d987c82ef0eea62d2e420d51144
struct CountdownView: View {
@State private var counter = Counter()
var body: some View {
let radius = 120.0
ZStack {