Skip to content

Instantly share code, notes, and snippets.

View tarrouye's full-sized avatar
🤧
*achoo*

Théo Arrouye tarrouye

🤧
*achoo*
View GitHub Profile
//
// ScrollIntoSheet.swift
// (c) Théo Arrouye 2024
//
//
import SwiftUI
struct ScrollIntoSheetView: View {
let backgroundColor: Color = .black
@tarrouye
tarrouye / Example.swift
Created November 19, 2024 20:19
Transmission Hero Move Example
import SwiftUI
import Transmission // https://github.com/nathantannar4/Transmission
struct HeroMoveExample: View {
let colors: [Color] = [.blue, .red, .green, .orange]
var body: some View {
NavigationStack {
ScrollView(.vertical) {
ForEach(colors, id: \.hashValue) { color in
@tarrouye
tarrouye / AMAlbumDetailsView.swift
Created October 5, 2024 23:49
Sample code replicating the album details / track list screen from Apple Music
struct AMAlbumDetailsView: View {
let albumArt: Image
let title: String
let artist: String
let genre: String
let releaseYear: String
let quality: String
let tracks: [String]
@State private var playingTrack: String?
@tarrouye
tarrouye / Scratchpad.swift
Last active March 15, 2025 08:10
Apple Music Profile Effect
import SwiftUI
struct AppleMusicProfile: View {
let profileImage: Image
let name: String
let username: String
var body: some View {
ZStack {
// (1) Blurred profile image for background
@tarrouye
tarrouye / UIApplication+Safari.swift
Last active June 28, 2023 22:51
Present SFSafariViewController as a NavigationController from SwiftUI.
//
// UIApplication+Safari.swift
// DoraDora
//
// Created by Théo Arrouye on 5/12/23.
//
import SafariServices
import UIKit
@tarrouye
tarrouye / CharadeView.swift
Last active September 20, 2022 07:42
Simple SwiftUI Charades game
//
// CharadeView.swift
//
//
// Created by Théo Arrouye on 9/14/22.
//
import SwiftUI
// MARK: Custom Clip Shape
import SwiftUI
import PlaygroundSupport
import MapKit
struct MapView: UIViewRepresentable {
var locationManager = CLLocationManager()
func setupManager() {
locationManager.desiredAccuracy = kCLLocationAccuracyBest
import SwiftUI
import PlaygroundSupport
struct ToggleView: View {
@Binding var name: String
@Binding var symbolSystemName: String
@Binding var enabled : Bool
@Binding var highlightCol : UIColor
@Binding var expanded : Bool
@tarrouye
tarrouye / Gradientpuzzle.pde
Created December 13, 2017 05:50
Gradient Puzzle game for Processing
List<Integer> puzzle;
float pieceSize;
color[] cols;
boolean scrambled;
int selected;
boolean won;
boolean menu;
@tarrouye
tarrouye / Ladderman.pde
Last active April 3, 2018 15:46
Ladderman game for Processing\nEdited to removed highscore database dependency
float rows = 10.0;
PVector tileSize;
boolean[][] ladders;
int EASYMODE = 1;
int HARDMODE = 2;
int MODE = EASYMODE;
int score = 0;