大多数浏览器和
Developer App 均支持流媒体播放。
-
Xcode 16 的新功能
探索 Xcode 16 在效率和性能方面的最新改进。了解代码补齐、诊断工具和 Xcode 预览方面的增强功能。进一步了解构建版本方面的更新,并探索调试和 Instruments 方面的改进。
章节
- 0:00 - Introduction
- 0:29 - Updates in editing
- 0:33 - Code completion
- 1:01 - Adopting Swift 6 data-race safety guarantees
- 2:49 - Improvements to Previews
- 6:22 - Updates in builds
- 6:26 - Explicit modules
- 7:15 - Package resolution
- 7:15 - Package resolution
- 8:30 - What's new in debugging
- 8:35 - Build process and debugging
- 9:07 - Thread performance checker
- 9:23 - The organizer
- 12:16 - The RealityKit debugger
- 12:55 - Meet Swift Testing
- 18:42 - What's new in Instruments
- 19:44 - Meet the flame graph
- 21:38 - Wrap up
资源
相关视频
WWDC24
-
下载Array
-
-
3:37 - Inline State within Preview
#Preview { @Previewable @State var currentFace = RobotFace.heart }
-
3:45 - View using Inline State
RobotFaceSelectorView(currentFace: $currentFace)
-
3:53 - Complete Preview using Previewable
#Preview { @Previewable @State var currentFace = RobotFace.heart RobotFaceSelectorView(currentFace: $currentFace) }
-
4:40 - Type Conforming to PreviewModifier
struct SampleRobotNamer: PreviewModifier { typealias Context = RobotNamer static func makeSharedContext() async throws -> Context { let url = URL(fileURLWithPath: "/tmp/local_names.txt") return try await RobotNamer(url: url) } func body(content: Content, context: Context) -> some View { content.environment(context) } }
-
5:29 - Extension on PreviewTrait
extension PreviewTrait where T == Preview.ViewTraits { @MainActor static var sampleNamer: Self = .modifier(SampleRobotNamer()) }
-
5:38 - Preview using created PreviewModifier
#Preview(traits: .sampleNamer) { RobotNameSelectorView() }
-
10:26 - AVPlayer Creation
struct BOTanistAVPlayer { func player(url: URL) throws -> AVPlayer { let player = AVPlayer(url: url) return player } }
-
11:28 - AVPlayer Call Site
self.player = try? await robotVideoAVPlayer()
-
11:57 - AVPlayer Initialization
private nonisolated func robotVideoAVPlayer() async throws -> AVPlayer? { guard let url = Bundle.main.url(forResource: RobotVideo.resource, withExtension: RobotVideo.ext) else { throw BOTanistAppError.videoNotFound(forResource: RobotVideo.resource, withExtension: RobotVideo.ext) } let avPlayer = BOTanistAVPlayer() let player = try avPlayer.player(url: url) return player }
-
13:42 - Initial Test Scaffolding
import Testing @testable import BOTanist // When using the default init Plant(type:) make sure the planting style is graft @Test func plantingRoses() { // First create the two Plant structs // Verify with #expect }
-
14:36 - Complete Test
import Testing @testable import BOTanist // When using the default init Plant(type:) make sure the planting style is graft @Test func plantingRoses() { // First create the two Plant structs let plant = Plant(type: .rose) let expected = Plant(type: .rose, style: .graft) // Verify with #expect #expect(plant == expected) }
-
17:35 - Custom Tag
extension Tag { @Tag static var planting: Self }
-
17:42 - Tag Usage in @Test
.tags(.planting)
-
20:37 - Slow Asset Loading
for asset in allAssets { asset.load() }
-
20:54 - Fast Asset Loading
await withDiscardingTaskGroup { group in for asset in allAssets { group.addTask { asset.load() } } }
-
-
正在查找特定内容?在上方输入一个主题,就能直接跳转到相应的精彩内容。
提交你查询的内容时出现错误。请检查互联网连接,然后再试一次。