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
struct IntegerField: View { | |
@Binding var value: Int | |
@State private var stringValue: String | |
init(value binding: Binding<Int>) { | |
self._value = binding | |
self._stringValue = State(wrappedValue: binding.wrappedValue.formatted()) | |
} |
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
struct AnimateableView<ContentView: View, Value: VectorArithmetic>: View { | |
let value: Value | |
@ViewBuilder let builder: (Value) -> ContentView | |
var body: some View { | |
builder(value) | |
.modifier(Animation<ContentView, Value>(value: value, builder: builder)) | |
} | |
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 QuartzCore | |
class ConfettiView: UIView { | |
public var colors: [UIColor]! | |
public var intensity: Float! | |
private(set) var active: Bool! | |
override public class var layerClass: Swift.AnyClass { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Foundation | |
// We provide some json and transform it to Data-type | |
let json = """ | |
[{ | |
"name": "John", | |
"startingTime": 581167640.06502903 | |
}, { | |
"name": "Mark", | |
"startingTime": 582031640.06502903 |
NewerOlder