Keynote: https://developer.apple.com/videos/play/wwdc2020/101/
Monday@WWDC: https://developer.apple.com/videos/play/wwdc2020/10691/
Platforms State of the Union: https://developer.apple.com/videos/play/wwdc2020/102/
Submit your questions for the cast and creators of Mythic Quest: Raven’s Banquet: https://developer.apple.com/videos/play/wwdc2020/10971/
Adopt the new look of macOS: https://developer.apple.com/videos/play/wwdc2020/10104/
Advances in UICollectionView: https://developer.apple.com/videos/play/wwdc2020/10097/
Advances in diffable data sources: https://developer.apple.com/videos/play/wwdc2020/10045/
Build Metal-based Core Image kernels with Xcode: https://developer.apple.com/videos/play/wwdc2020/10021/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--------- | |
THIS ONE DOESN'T FETCH FROM CORE DATA | |
--------- | |
If you're on Xcode 16, make sure to enable `SWIFT_ENABLE_OPAQUE_TYPE_ERASURE=NO` | |
to work around the performance issues of Debug builds: https://indieweb.social/@curtclifton/113273571392595819 | |
*/ | |
import SwiftUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
If you're on Xcode 16, make sure to enable `SWIFT_ENABLE_OPAQUE_TYPE_ERASURE=NO` | |
to work around the performance issues of Debug builds: https://indieweb.social/@curtclifton/113273571392595819 | |
*/ | |
import SwiftUI | |
import SwiftData | |
@main | |
struct SlowDataApp: App { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct SwiftUIListVSLazyVStackApp: App { | |
let numbers = (0...100).map { $0 } | |
var body: some Scene { | |
WindowGroup { | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
class AnimatedResultView: UIView { | |
enum Result { | |
case success | |
case failure | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This protocol only aggregates the needed properties for the extensions to work and avoid duplicated code. | |
private protocol Reusable: class { | |
/// Returns `String(describing: self)` to be used as the `reuseIdentifier`. | |
static var reuseIdentifier: String { get } | |
/// Returns the UINib using the `String(describing: self)` as the name of the NIB. | |
static var nib: UINib { get } | |
} | |
private extension Reusable { | |
static var reuseIdentifier: String { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Source: https://bitbucket.org/mmick66/centercellpagingcollectionview | |
class CenterCellCollectionViewFlowLayout: UICollectionViewFlowLayout { | |
var mostRecentOffset = CGPoint() | |
override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint { | |
guard let collectionView = self.collectionView else { | |
self.mostRecentOffset = super.targetContentOffset(forProposedContentOffset: proposedContentOffset) | |
return self.mostRecentOffset |