Skip to content

Instantly share code, notes, and snippets.

@andrewmcodes
andrewmcodes / iOS Shortcuts Catalog.md
Created June 11, 2021 21:47 — forked from brucebentley/iOS Shortcuts Catalog.md
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

@bwhiteley
bwhiteley / gist:049e4bede49e71a6d2e2
Last active March 17, 2024 13:10
Initialize Swift subclass of UIView, designed in .xib
// Create CustomView.xib, set File's Owner to CustomView.
// Link the top level view in the XIB to the contentView outlet.
class CustomView : UIView {
@IBOutlet private var contentView:UIView?
// other outlets
override init(frame: CGRect) { // for using CustomView in code
super.init(frame: frame)
self.commonInit()
@bryanluby
bryanluby / gist:fd5ac0a8c74c2c3241d9
Last active June 1, 2023 16:10
Switch on indexPath using tuple example in Swift.
switch (indexPath.section, indexPath.row) {
case (0, _): println("section 0")
case (1, _): println("section 1")
case (2, 0...2): println("section 2 0-2")
case (2, 3...5): println("section 2 3-5")
case (3, let row): println("\(row)")
default: println("")
}
@pi-chan
pi-chan / compareUIImage.m
Last active December 14, 2016 12:52
compare uiimage by md5 hash
- (void)md5HashFromUIImage:(UIImage*)image
hash:(unsigned char*)hash
{
CGDataProviderRef dataProvider = CGImageGetDataProvider(image.CGImage);
NSData *data = (NSData*)CFBridgingRelease(CGDataProviderCopyData(dataProvider));
CC_MD5([data bytes], [data length], hash);
}
- (BOOL)compareUIImages:(UIImage*)image1
image:(UIImage*)image2