WWDC 2007 2008 2009 2010 2011 2012 2013 2014 2015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MacCatalystFastQuitHelper | |
// | |
// Copyright © 2022 Jonny Kuang. MIT | |
// | |
import UIKit | |
enum MacCatalystFastQuitHelper { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSLayoutConstraint+.swift | |
// SpringUI | |
// | |
// Created by Jonny Kuang on 11/21/21. | |
// Copyright © 2021 Jonny Kuang. All rights reserved. (MIT license) | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
@discardableResult | |
public func swizzleInstanceMethod(class aClass: AnyClass?, originalSelector: Selector, swizzledSelector: Selector) -> Bool { | |
swizzleMethod(class: aClass, originalSelector: originalSelector, swizzledSelector: swizzledSelector, isClassMethod: false) | |
} | |
@discardableResult | |
public func swizzleClassMethod(class aClass: AnyClass?, originalSelector: Selector, swizzledSelector: Selector) -> Bool { | |
swizzleMethod(class: aClass, originalSelector: originalSelector, swizzledSelector: swizzledSelector, isClassMethod: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let overrideCatalystScaleFactor: Void = { | |
guard let sceneViewClass = NSClassFromString("UINSSceneView") as? NSObject.Type else { | |
return | |
} | |
if sceneViewClass.instancesRespond(to: NSSelectorFromString("scaleFactor")) { | |
// old | |
swizzleInstanceMethod( | |
class: sceneViewClass, | |
originalSelector: NSSelectorFromString("scaleFactor"), | |
swizzledSelector: #selector(swizzle_scaleFactor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JonnyKeyValueObserver.swift | |
// | |
// Copyright (c) 2020 Junyu Kuang <lightscreen.app@gmail.com> | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIImage+NSToolbar.swift | |
// MobileReaderUI | |
// | |
// Created by Jonny Kuang on 10/12/19. | |
// Copyright © 2019 Junyu Kuang <lightscreen.app@gmail.com>. All rights reserved. | |
// | |
#if targetEnvironment(macCatalyst) | |
extension UIImage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// UIKitAccentColor | |
// | |
// Created by Jonny Kuang on 10/20/19. | |
// Copyright © 2019 Jonny Kuang. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIResponder+performWindowDrag.swift | |
// JonnyUtility | |
// | |
// Created by Jonny Kuang on 10/7/19. | |
// Copyright © 2019 Junyu Kuang <lightscreen.app@gmail.com>. All rights reserved. | |
// | |
import UIKit |
NewerOlder