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 | |
// Remember to download FontSettings.swift | |
struct WWDC24AnimatedTextView: View { | |
var text = "Hello, World!" | |
var animation: Animation = .easeInOut | |
var targetFontSize: CGFloat = 40 | |
var minimumFontSize: CGFloat = 30 | |
var targetFontWeight: Font.Weight = .semibold |
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 RoundedTrapezoid: Shape { | |
var depth: CGFloat | |
var edge: Edge | |
var cornerRadius: CGFloat = 0 | |
var isRightAngle: Edge? = .none | |
func path(in rect: CGRect) -> Path { | |
var path = Path() | |
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 UniformTypeIdentifiers | |
struct MeshGradientPoint: Identifiable { | |
let id = UUID() | |
var point: SIMD2<Float> | |
var color: Color | |
} | |
struct ContentView: 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
// | |
// ContentView.swift | |
// MeshGradientPlayground | |
// | |
// Created by Bill Richards on 6/14/24. | |
// | |
import SwiftUI | |
struct ContentView: 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 | |
struct AnimatingMaskedMeshView: View { | |
let referenceDate: Date = .now | |
@State private var mainPosition: CGPoint = .zero | |
@State private var positions: [CGPoint] = [] | |
private let blurRadius = 20.0 | |
private let alphaThreshold = 0.875 |
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
// | |
// CircularSlider.swift | |
// CircularSliderTest | |
// | |
// Created by Tarlan Ismayilsoy on 28.08.22. | |
// | |
import SwiftUI | |
// MARK: - CircularSlider |
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
//<canvas><canvas> | |
function degreeToradians(degrees) { | |
return degrees * Math.PI / 180; | |
} | |
function getPosition(centerX, centerY, radius, endAngle) { | |
// Calculamos las coordenadas x e y del punto final del arco. | |
var x = centerX + radius * Math.cos(endAngle); | |
var y = centerY + radius * Math.sin(endAngle); |
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
// | |
// ContentView.swift | |
// Airdrop Demo | |
// | |
// Created by Daniel Kuntz on 7/30/23. | |
// | |
import SwiftUI | |
struct ContentView: 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
package com.codelaby.mapviewer | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.location.Location | |
import android.os.Looper | |
import android.util.Log | |
import androidx.lifecycle.LiveData | |
import com.google.android.gms.location.* |
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
package com.codelaby.mapviewer | |
import android.Manifest | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.location.Location | |
import android.location.LocationListener | |
import android.location.LocationManager | |
import android.os.Build | |
import android.os.Bundle |
NewerOlder