Skip to content

Instantly share code, notes, and snippets.

Avatar

Jordan Singer jordansinger

View GitHub Profile
View AppleMaps-part2.swift
// San Francisco: 37.7749, -122.4194
// New York: 40.7128, -74.0060
import SwiftUI
import MapKit // be sure to import MapKit
import PlaygroundSupport
struct ContentView: View {
@State var latitude = 37.7749
@State var longitude = -122.4194
View AppleTVControlCenter.swift
import SwiftUI
import PlaygroundSupport
struct AppleTV: View {
var body: some View {
ZStack {
// Image(uiImage: #imageLiteral(resourceName: "IMG_6281.JPG"))
// .resizable()
// .aspectRatio(contentMode: .fill)
Color.gray
View AppleMaps.swift
import SwiftUI
import MapKit // be sure to import MapKit
import PlaygroundSupport
struct ContentView: View {
var body: some View {
ZStack {
MapView()
VStack {
@jordansinger
jordansinger / iPod.swift
Created Jul 27, 2020
Swift Playgrounds iPod Classic
View iPod.swift
import SwiftUI
import PlaygroundSupport
struct iPod: View {
var body: some View {
VStack(spacing: 40) {
Screen()
ClickWheel()
Spacer()
}
View Sunset.swift
import SwiftUI
import PlaygroundSupport
struct Sunset: View {
@State var backgroundColor = Color.blue
@State var sunSetted = false
let sunGradient = [Color.yellow, Color.orange]
let moonGradient = [Color.gray, Color.black]
@State var alignment = Alignment.top
View Gradient.swift
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var gradientAngle: Double = 0
var colors = [
Color(UIColor.systemRed),
Color(UIColor.systemOrange),
Color(UIColor.systemYellow),
Color(UIColor.systemGreen),
View ShareSheet.swift
import SwiftUI
import PlaygroundSupport
struct ShareSheet: View {
var body: some View {
VStack(spacing: 0) {
SheetHeaderView()
.padding()
Divider()
View SearchBar.swift
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var text = ""
var body: some View {
SearchBar(text: $text)
}
}
View Remote.swift
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
VStack(spacing: 24) {
Text("Apple TV")
.font(.headline)
Rectangle()
View SignUp.swift
import SwiftUI
import PlaygroundSupport
struct SignUpView: View {
@State var username = ""
@State var password = ""
var body: some View {
NavigationView {
You can’t perform that action at this time.