Skip to content

Instantly share code, notes, and snippets.

// TappableUILabelDemoViewController.swift
// Label Link Test
// Created by Kyle Howells on 2024-03-20.
import UIKit
kylehowells / Tap links in UILabel.swift
Created March 20, 2024 01:24
Tap Links in UILabel
kylehowells / Speedo.swift
Created June 28, 2020 17:37
Scifi Style Speedometer Concept in SwiftUI
import SwiftUI
struct ContentView: View {
let backgroundGradient = Gradient(colors: [
Color(red: 65.0/255.0, green: 65.0/255.0, blue: 84.0/255.0, opacity: 1.0),
Color(red: 20.0/255.0, green: 20.0/255.0, blue: 24.0/255.0, opacity: 1.0)
let blueGradient = Gradient(colors: [

Getting a streamable link is done by the client.

You basically need to send the service a detailed list of the type of media you can play, and it will give you a transcode URL to call if it thinks you need transcoding in order to play this file.

If you don't and can play the file directly it won't give you a transcode URL.

POST <server_address>/Items/<item_id>/PlaybackInfo?UserId=<current_user_id>
kylehowells / gist:36b6f7e3f584590d0943
Created December 4, 2014 01:18
MRMediaRemoteGetNowPlayingInfo Keys
MRMediaRemoteGetNowPlayingInfo(dispatch_get_main_queue(), ^(CFDictionaryRef information) {});
/* [information allKeys]
kylehowells /
Created February 14, 2020 21:18
Automatically Corrects Insta360 Studio Snapshot Dates according to the filename.
import os
import re
import datetime
import piexif
filepath = os.path.abspath(".")
# Find files with `screenshot` in the name.
files = [f for f in os.listdir(filepath) if "screenshot" in f and f.endswith(".jpg")]
kylehowells / gist:8625390
Last active November 26, 2023 05:51
Pseudo code for creating a notification on iOS 7 in SpringBoard
-(BBBulletinRequest*)showTestBanner:(NSString*)something {
//r14 = self
//r15 = something
static NSInteger testCount = 0;
BBBulletinRequest *request = [[BBBulletinRequest alloc] init];
[request setBulletinID:something];
[request setTitle:something];
[request setMessage:[NSString stringWithFormat:@"Fake iTunes notification %ld", testCount]];
kylehowells / FileWatcher.cs
Created May 9, 2019 13:06
Monitor iOS files for changes using GCD dispatch_source_create DISPATCH_SOURCE_TYPE_VNODE in Xamarin
using System;
using ObjCRuntime;
using Foundation;
using CoreFoundation;
using System.IO;
namespace LoadRuntimeXAML.iOS
public class FileWatcher : IDisposable
kylehowells / CBManagerAuthorization+String.swift
Created March 9, 2023 01:18
Debug strings for CBManagerAuthorization
import Foundation
import CoreBluetooth
extension CBManagerAuthorization : CustomDebugStringConvertible {
public var debugDescription: String {
switch self {
case .allowedAlways: return "allowedAlways"
case .denied: return "denied"
case .notDetermined: return "notDetermined"
kylehowells / WaveView.swift
Created February 25, 2023 23:27
Animates a wave ripple along the top
import UIKit
// MARK: - WaveView
class WaveView: UIView {
private var shapeLayer: CAShapeLayer = CAShapeLayer()
// MARK: - Animation Properties