Skip to content

Instantly share code, notes, and snippets.

View steventroughtonsmith's full-sized avatar

Steven Troughton-Smith steventroughtonsmith

View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / apple_eu_dma_compliance_workshop_whisper_transcript.txt
Created March 19, 2024 04:42
Apple/EU DMA Compliance Workshop whisper-generated transcript March 18 2024
Good morning everybody.
I hope you are ready to start.
We still still new participants entering into the room but I think we can start.
So welcome to everybody to our first DMA compliance workshop after compliance day.
So today's edition is with Apple and thanks a lot to Apple for coming here today to explain and discuss our DMA compliance solutions.
@steventroughtonsmith
steventroughtonsmith / V3DViewContainer.swift
Created February 2, 2024 17:14
UIKit proxy for visionOS 3D transforms and effects
//
// V3DViewContainer.swift
// Vision3DUIKit
//
// Created by Steven Troughton-Smith on 02/02/2024.
//
import UIKit
import SwiftUI
@steventroughtonsmith
steventroughtonsmith / VisionViewPlaygroundApp.swift
Created September 21, 2023 19:22
Trivial visionOS non-rectangular window content layout example
//
// VisionViewPlaygroundApp.swift
// VisionViewPlayground
//
// Created by Steven Troughton-Smith on 21/09/2023.
//
import SwiftUI
@main
@steventroughtonsmith
steventroughtonsmith / VTBMainViewController.swift
Created July 21, 2023 16:31
visionOS Freeform-style bottom toolbar ornament
//
// VTBMainViewController.swift
// VisionToolbar
//
// Created by Steven Troughton-Smith on 21/07/2023.
//
//
import UIKit
import SwiftUI
@steventroughtonsmith
steventroughtonsmith / PSTLMacOS11AwarePopUpButton.swift
Created October 23, 2022 00:09
macOS 11-compatible Mac Catalyst PopUp Button (Private API)
class PSTLMacOS11AwarePopUpButton: UIButton {
var selectedPopUpIndex = 0 {
didSet {
sendActions(for: .valueChanged)
}
}
override var menu: UIMenu? {
set {
/* Button title must match first menu item */
@steventroughtonsmith
steventroughtonsmith / RCGRightClickInteraction.swift
Last active July 27, 2022 15:48
UIKit right-click interaction
//
// RCGRightClickGestureRecognizer.swift
// RightClickGestureRecognizer
//
// Created by Steven Troughton-Smith on 27/07/2022.
//
import UIKit
class RCGRightClickInteraction: UIContextMenuInteraction {
@steventroughtonsmith
steventroughtonsmith / UICollectionView+Swizzles.swift
Created April 22, 2022 15:06
UICollectionView _shouldBecomeFocusedOnSelection Mac Catalyst
//
// MRDSwizzleController.swift
// MobileRadio
//
// Created by Steven Troughton-Smith on 22/12/2021.
// Copyright © 2021 High Caffeine Content. All rights reserved.
//
import UIKit
//
// main.m
// tbdswizzler
//
// Created by Steven Troughton-Smith on 10/12/2016.
// Copyright © 2016 High Caffeine Content. All rights reserved.
//
#import <Foundation/Foundation.h>
@steventroughtonsmith
steventroughtonsmith / palettes.txt
Created June 9, 2020 19:24
Pastel 1.0 default palettes
{
"Autumn Approaches" => {
"colors" => [
0 => "#220204"
1 => "#9f311b"
2 => "#e17817"
3 => "#6a1d18"
4 => "#d64019"
]
}
@steventroughtonsmith
steventroughtonsmith / PSTLDraggableColorSwatchView.h
Last active May 6, 2021 00:47
Color Swatch view for Mac Catalyst that implements inter-app drag & drop
//
// PSTLDraggableColorSwatchView.h
// Pastel
//
// Created by Steven Troughton-Smith on 06/03/2020.
// Copyright © 2020 Steven Troughton-Smith. All rights reserved.
//
@import UIKit;