symbol | name |
---|---|
⌘ | command |
⌥ | option |
⌃ | control |
⇧ | shift |
⇥ | tab |
↩︎ | return |
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
private struct GroundReflectionViewModifier: ViewModifier { | |
let offsetY: CGFloat | |
func body(content: Content) -> some View { | |
content | |
.background( | |
content | |
.mask( | |
LinearGradient( | |
gradient: Gradient(stops: [.init(color: .white, location: 0.0), .init(color: .clear, location: 0.6)]), | |
startPoint: .bottom, |
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 (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.recyclerview.widget.ListAdapter | |
import androidx.recyclerview.widget.RecyclerView | |
#parse("File Header.java") |
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 kotlinx.coroutines.* | |
import kotlin.coroutines.CoroutineContext | |
abstract class UseCase<T, Params : Any> { | |
private lateinit var parentJob: Job | |
private lateinit var params: Params | |
private var isAttachedToLifecycle = false | |
private val backgroundContext: CoroutineContext = Dispatchers.IO | |
private val foregroundContext: CoroutineContext = Dispatchers.Main |
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.example.app | |
import android.content.Context | |
import android.content.res.TypedArray | |
import android.util.AttributeSet | |
import android.widget.SeekBar | |
import android.widget.TextView | |
import androidx.preference.Preference | |
import androidx.preference.PreferenceViewHolder |
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 android.app.Application | |
import android.arch.lifecycle.LiveData | |
import android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.Network | |
import android.net.NetworkInfo | |
import android.net.NetworkRequest | |
import android.os.Build | |
import android.support.annotation.RequiresPermission | |
import android.support.annotation.VisibleForTesting |
NewerOlder