Skip to content

Instantly share code, notes, and snippets.

// implement a menu with custom commands in UICollectionView
import UIKit
extension UIResponder {
var responderChain: AnySequence<UIResponder> {
var responder: UIResponder? = self
return AnySequence { () -> AnyGenerator<UIResponder> in
return anyGenerator {
// Unobfuscate the iRealPro data format
//
// information and test data taken from:
// https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua
// https://github.com/ironss/accompaniser/blob/59fd4cfb45447ac77ae7cc2bfca2e25bc9ce218d/test/test_irealb_parser.lua
// ********
import Darwin
#!/usr/local/bin/macruby
# This example is done with MacRuby and the UIKit framework for Mac OS X
# http://chameleonproject.org/
# https://github.com/BigZaphod/Chameleon/
framework 'Cocoa'
framework "UIKit" # garbage collected version, the current version of Chameleon ist not known to be GC-safe
###################