Skip to content

Instantly share code, notes, and snippets.

@Miiha
Miiha / button
Last active May 5, 2023 07:29
Theming iOS Apps
Button("Some Button") {}
@Miiha
Miiha / Interface.swift
Last active July 14, 2021 06:25
UNUserNotificationCenter modelled with simple data types using pointfree.co's approach of designing dependencies.
import Foundation
import UserNotifications
import Combine
import CoreLocation
public struct UserNotificationClient {
public var add: (UNNotificationRequest) -> AnyPublisher<Void, Error>
public var getAuthStatus: () -> AnyPublisher<UNAuthorizationStatus, Never>
public var getDeliveredNotifications: () -> AnyPublisher<[Notification], Never>
public var getNotificationCategories: () -> AnyPublisher<Set<UNNotificationCategory>, Never>
set fish_greeting (set_color red)' ___
___======____='(set_color yellow)'---='(set_color red)')
/T \_'(set_color yellow)'--==='(set_color red)')
L \ '(set_color yellow)'(@) '(set_color red)'\~ \_'(set_color yellow)'-=='(set_color red)')
\ / )J'(set_color yellow)'~~ '(set_color red)'\\'(set_color yellow)'-='(set_color red)')
\\\\___/ )JJ'(set_color yellow)'~~ '(set_color red)'\)
\_____/JJJ'(set_color yellow)'~~ '(set_color red)'\
/ \ , \\'(set_color red)'J'(set_color yellow)'~~~~ \
(-\)'(set_color red)'\='(set_color yellow)'| \~~~ L__
('(set_color red)'\\'(set_color yellow)'\\) ( -\)_ ==__