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 UIKit | |
import SwiftUI | |
class KeyboardViewController: UIInputViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
struct ContentView: View { | |
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
var LinkGrabber = { | |
textarea: null, | |
/* Textarea Management */ | |
attach_ta: function(){ | |
if(LinkGrabber.textarea != null) return; | |
var textarea = LinkGrabber.textarea = document.createElement("textarea"); | |
textarea.setAttribute("style", "position: fixed; width: 100%; margin: 0; top: 0; bottom: 0; right: 0; left: 0; z-index: 99999999"); |
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
class DelegateForwarder<T: NSObjectProtocol>: NSObject { | |
// MARK: - Properties | |
weak var internalDelegate: T? | |
weak var externalDelegate: T? | |
var asConforming: T { |
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 SwiftUI | |
/// A protocol that enables types whose members are made up of `Animatable` or `VectorArithmetic`-conforming properties | |
/// to become `Animatable` themselves by specifying those members. | |
/// | |
/// Here's an example of how to use this protocol: | |
/// | |
/// ``` | |
/// struct CornerRadii: AnimatableMemberHaving { | |
/// |
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 <UIKit/UIKit.h> | |
@interface NumberPadDoneBtn : UIView | |
@end | |
@interface NumberPadButton : UIButton | |
@end |
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 | |
import Cocoa | |
private enum Constants { | |
static let crlf: Character = "\r\n" | |
} | |
/* |
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 JavaScriptCore; | |
/// Retaining MOJavaScriptObject retains your JSContext/JSObject as well | |
@interface MOJavaScriptObject : NSObject | |
@property (readonly) JSObjectRef JSObject; | |
@property (readonly) JSContextRef JSContext; |
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
- (void) viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
if(!self.navigationItem.titleView){ | |
self.navigationItem.titleView = ({ | |
UILabel *titleView = [UILabel new]; | |
titleView.numberOfLines = 0; | |
titleView.textAlignment = NSTextAlignmentCenter; | |
titleView.attributedText = [[NSAttributedString alloc] initWithString:@"2\nLINES" attributes: | |
self.navigationController.navigationBar.titleTextAttributes |
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 sketch = require('sketch') | |
let settingsAttribute = getSettingsAttributeForKey_Value(kLowerCaseType, kLowerCaseSmallCapsSelector) | |
applySubstringFontModification() | |
//getFontAttributesForSelectedRange() | |
function applySubstringFontModification() { | |
let document = sketch.getSelectedDocument() | |
let textLayer = document.selectedLayers.layers[0] |
NewerOlder