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 | |
struct ContentView: View { | |
@State private var selection: Int = 0 | |
var body: some View { | |
CustomPicker(selection: $selection) { | |
// ForEach(0..<10) { | |
// Text("\($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
protocol Tappable : AnyObject { | |
func handleTap(gr : UITapGestureRecognizer) | |
} | |
extension UITapGestureRecognizer { | |
convenience init(target : Tappable) { | |
self.init(target: target, action: "handleTap:") | |
} | |
} |
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
protocol Raisable { | |
func raise(exponent : Self) -> Self | |
} | |
extension Raisable where Self : SignedNumberType { | |
func raise(exponent : Self) { | |
return pow(self, exponent) | |
} | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am alexanderedge on github. | |
* I am alexanderedge (https://keybase.io/alexanderedge) on keybase. | |
* I have a public key whose fingerprint is CD91 F7A8 42E6 9523 9D81 8BAD 1235 714B ECC8 4438 | |
To claim this, I am signing this object: |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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
// | |
// AGEColor.h | |
// | |
// Copyright (c) 2013 Alexander Edge (http://www.alexedge.co.uk) | |
// | |
// 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 <objc/runtime.h> | |
- (NSString *)description{ | |
NSMutableString *objectDescription = [NSMutableString stringWithFormat:@"<%@: %p ",NSStringFromClass([self class]),self]; | |
unsigned int outCount, i; | |
objc_property_t *properties = class_copyPropertyList([self class], &outCount); | |