WWDC 2006 2007 2008 2009 2010 2011 2012 2013 2014
| mr Marathi | |
| bs Bosnian | |
| ee_TG Ewe (Togo) | |
| ms Malay | |
| kam_KE Kamba (Kenya) | |
| mt Maltese | |
| ha Hausa | |
| es_HN Spanish (Honduras) | |
| ml_IN Malayalam (India) | |
| ro_MD Romanian (Moldova) |
| #!/bin/bash | |
| # usage: get [ RESOLUTION [ YEAR [ IDS... ] ] ] | |
| resolution=${1:-SD} | |
| year=${2:-2015} | |
| shift | |
| shift | |
| ids=$* | |
| RESOLUTION=$(echo $resolution | tr '[:lower:]' '[:upper:]') |
| import Foundation | |
| extension Data { | |
| var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription | |
| guard let object = try? JSONSerialization.jsonObject(with: self, options: []), | |
| let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]), | |
| let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil } | |
| return prettyPrintedString | |
| } |
| [ | |
| {"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/236mwbxbxjfsvns4jan/236/236_hd_avspeechsynthesizer_making_ios_talk.mp4?dl=1", "title": "AVSpeechSynthesizer: Making iOS Talk", "summary": "Speech can enhance the audio experience of your app, whether you are generating spoken feedback for accessibility, or providing critical information beyond simple alerts or notifications. AVSpeechSynthesizer produces synthesized speech from text and allows you to control and monitor the progress of ongoing speech. Learn the ins and outs of AVSpeechSynthesizer and how to add computer-generated speech output to your app."}, | |
| {"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/405bjty1j94taqv8ii/405/405_hd_measuring_performance_using_logging.mp4?dl=1", "title": "Measuring Performance Using Logging", "summary": "Learn how to use signposts and logging to measure performance. Understand how the Points of Interest instrument can be used to examine logged data. Get an introduction into creating and using custo |
| import UIKit | |
| class InstaStories: NSObject { | |
| private let urlScheme = URL(string: "instagram-stories://share")! | |
| enum optionsKey: String { | |
| case StickerImage = "com.instagram.sharedSticker.stickerImage" | |
| case bgImage = "com.instagram.sharedSticker.backgroundImage" | |
| case bgVideo = "com.instagram.sharedSticker.backgroundVideo" |
Currently it doesn't seem possible to execute additional logic when a navigation link is tapped with the new NavigationLink(value:) initializer. When the link is tapped it updates path state all the way back at the root NavigationStack to drive navigation, but there are many times where we need to perform logic after the tap and before the drill down.
For example, after tapping a link we may want to pre-emptively load some data to show on the drill down screen. Or we may want to perform some form validation. Or we may want to track some analytics. This does not seem possible with the current link API.
A workaround is to use Buttons instead of NavigationLinks, but then you lose all of the styling and affordances given to links, such as chevrons when used in List.
If the API for NavigationLink cannot be changed to accomodate for this, perhaps a new ButtonStyle could be introduced that allows regular buttons to take on the sty
| struct ScrollViewDelegate<Content: View>: View { | |
| @State private var verticalScrollTimer: Timer? | |
| @State private var horizontalScrollTimer: Timer? | |
| @ViewBuilder private let content: Content | |
| private let axes: Axis.Set | |
| private let showsIndicators: Bool | |
| private let onVerticalScroll: ((_ isScrolling: Bool) -> Void)? | |
| private let onHorizontalScroll: ((_ isScrolling: Bool) -> Void)? | |
| private let coordinateSpace = "scrollView" |
| struct LazyScrollView<Content: View>: View { | |
| @State private var fitsVertically = false | |
| @State private var fitsHorizontally = false | |
| private let content: Content | |
| private let axes: Axis.Set | |
| private let showsIndicators: Bool | |
| private var activeScrollingDirections: Axis.Set { | |
| return axes.intersection((fitsVertically ? [] : Axis.Set.vertical).union(fitsHorizontally ? [] : Axis.Set.horizontal)) | |
| } |
| import SwiftUI | |
| struct ContentView: View { | |
| @State private var sliderValue: Double = 0.0 | |
| @State private var backgroundColor: Color = .red | |
| let colors: [Color] = [.red, .orange, .yellow, .green, .blue, .purple, .pink, .mint, .indigo, .teal, .cyan, .brown, .black] | |
| var body: some View { | |
| ZStack { |