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 | |
/// View that observes its position within a given coordinate space, | |
/// and assigns that position to the specified Binding. | |
struct PositionObservingView<Content: View>: View { | |
var coordinateSpace: CoordinateSpace | |
@Binding var position: CGPoint | |
@ViewBuilder var content: () -> Content | |
var body: some View { |
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 | |
import PlaygroundSupport | |
// constants | |
let cardWidth: CGFloat = 343 | |
let cardHeight: CGFloat = 212 | |
let spacing = 36 | |
let animation = Animation.spring() | |
let cardColors = [ | |
Color(UIColor.systemRed), |
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
// | |
// CALayer+MBAnimationPersistence.h | |
// | |
// Created by Matej Bukovinski on 19. 03. 14. | |
// Copyright (c) 2014 Matej Bukovinski. All rights reserved. | |
// | |
#import <QuartzCore/QuartzCore.h> | |