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
// | |
// SparkleCommands.swift | |
// Past for iChat | |
// | |
// Created by Helge Heß on 08.04.21. | |
// | |
import SwiftUI | |
#if SPARKLE && canImport(Sparkle) |
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
/* | |
* Device tree overlay for mcp251x/mcp2517fd on spi0.0 | |
*/ | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709"; | |
/* disable spi-dev for spi0.0 */ |
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 | |
// Note: There are some issues with using these modifiers inside of ButtonStyles on macOS. Please see https://twitter.com/noahsark769/status/1288256379640139776?s=20 for more info. | |
struct ConditionalContent<TrueContent: View, FalseContent: View>: View { | |
let value: Bool | |
let trueContent: () -> TrueContent | |
let falseContent: () -> FalseContent | |
@ViewBuilder var body: some 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
import SwiftUI | |
import PlaygroundSupport | |
struct Desktop: View { | |
var body: some View { | |
ZStack { | |
// Image(uiImage: #imageLiteral(resourceName: "IMG_6281.JPG")) | |
Color(UIColor.systemBlue) | |
macOS() | |
} |
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
// Image+Trim.swift | |
// | |
// Copyright © 2020 Christopher Zielinski. | |
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177 | |
// | |
// 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
#import "AMAsynchronousOperation.h" | |
@interface AMAsynchronousOperation () | |
@property (nonatomic, assign, readwrite) AMAsynchronousOperationState state; | |
@end | |
#ifndef AMAsynchronousOperation_FinishIfCancelled | |
#define AMAsynchronousOperation_FinishIfCancelled() \ |
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
// | |
// Debug.swift | |
// | |
// Created by Craig Hockenberry on 3/15/17. | |
// Updated by Craig Hockenberry on 2/20/24. | |
// Usage: | |
// | |
// SplineReticulationManager.swift: | |
// |
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
@_functionBuilder | |
struct AttributedStringBuilder { | |
static func buildBlock(_ segments: NSAttributedString...) -> NSAttributedString { | |
let string = NSMutableAttributedString() | |
segments.forEach { string.append($0) } | |
return string | |
} | |
} |
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
@implementation PSPDFTableViewCell // UITableViewCell subclass | |
/** | |
On iOS 10, constraints involving a UITableViewCell’s contentView’s layoutMarginsGuide are removed for some | |
reason before the cell appears, which breaks the layout. This layout guide is a working alternative. | |
*/ | |
- (UILayoutGuide *)pspdf_layoutMarginsGuide { | |
if (@available(iOS 11.0, *)) { | |
return self.contentView.layoutMarginsGuide; | |
} |