This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
I hereby claim:
To claim this, I am signing this object:
| import UIKit | |
| class TouchForwardingView: UIView { | |
| var passthroughViews: [UIView] = [] | |
| override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | |
| guard let hitView = super.hitTest(point, with: event) else { return nil } | |
| guard hitView == self else { return hitView } | |
| public extension UIEdgeInsets { | |
| public var vertical: CGFloat { | |
| get { return 0 } // meaningless but not fatal | |
| set { (top, bottom) = (newValue, newValue) } | |
| } | |
| public var horizontal: CGFloat { | |
| get { return 0 } // meaningless but not fatal | |
| set { (left, right) = (newValue, newValue) } | |
| } |
| [ | |
| { | |
| "name": "Admir Rocks", | |
| "category": "Featured", | |
| "city": "Huddik", | |
| "state": "Norrland", | |
| "id": 1000, | |
| "park": "Joshua Tree National Park", | |
| "coordinates": { | |
| "longitude": -116.166868, |
| import Combine | |
| import CoreData | |
| extension NSManagedObjectContext { | |
| func changesPublisher<Object: NSManagedObject>(for fetchRequest: NSFetchRequest<Object>) | |
| -> ManagedObjectChangesPublisher<Object> | |
| { | |
| ManagedObjectChangesPublisher(fetchRequest: fetchRequest, context: self) | |
| } | |
| } |
| import SwiftUI | |
| import WebKit | |
| import Combine | |
| class WebViewData: ObservableObject { | |
| @Published var loading: Bool = false | |
| @Published var scrollPercent: Float = 0 | |
| @Published var url: URL? = nil | |
| @Published var urlBar: String = "https://nasa.gov" | |
| /* | |
| Notes: | |
| The font modifier requires the following gist: | |
| https://gist.github.com/shaps80/2d21b2ab92ea4fddd7b545d77a47024b | |
| */ |
| // | |
| // BottomSheetView.swift | |
| // | |
| // Created by Majid Jabrayilov | |
| // Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
| // | |
| import SwiftUI | |
| fileprivate enum Constants { | |
| static let radius: CGFloat = 16 |
| import Combine | |
| import ComposableArchitecture | |
| import UserNotifications | |
| public struct UserNotificationClient { | |
| public var add: (UNNotificationRequest) -> Effect<Void, Error> | |
| public var delegate: Effect<DelegateEvent, Never> | |
| public var getNotificationSettings: Effect<Notification.Settings, Never> | |
| public var removeDeliveredNotificationsWithIdentifiers: ([String]) -> Effect<Never, Never> | |
| public var removePendingNotificationRequestsWithIdentifiers: ([String]) -> Effect<Never, Never> |