Skip to content

Instantly share code, notes, and snippets.

View helje5's full-sized avatar

Helge Heß helje5

View GitHub Profile
//
// main.swift
// TestRecursiveNSArchive
//
// Created by Helge Hess on 09.12.17.
// Copyright © 2017 ZeeZide GmbH. All rights reserved.
//
import Foundation
@helje5
helje5 / ZzViewHolder.swift
Last active September 13, 2019 01:32
NSDictionaryOfVariableBindings for Swift
/**
* NSDictionaryOfVariableBindings for Swift
*
* In Objective-C you could use macros to quickly get a Dictionary of views,
* keyed on their names in the sourcecode. Like so:
*
* UILabel *label = [UILabel autolayoutView];
* NSDictionary *views = NSDictionaryOfVariableBindings(label);
*
* Which you could then use in, for example, VFL:
### Keybase proof
I hereby claim:
* I am helje5 on github.
* I am helge (https://keybase.io/helge) on keybase.
* I have a public key whose fingerprint is F122 BE44 B11D 97AC B1A2 3231 1809 11CB 8B32 F5FA
To claim this, I am signing this object: