Skip to content

Instantly share code, notes, and snippets.

View srstanic's full-sized avatar

Srđan Stanić srstanic

View GitHub Profile
#import <Foundation/Foundation.h>
@interface NSBundle (Language)
+(void)setLanguage:(NSString*)language;
@end
@insidegui
insidegui / EncodableValue.swift
Created January 15, 2017 02:40
A better way to "store value types" in NSUserDefaults or NSUbiquitousKeyValueStore
/**
A better way to "store value types" in NSUserDefaults or NSUbiquitousKeyValueStore
*/
import Foundation
/// ValueCoder is a class that can encode values of a specific type via NSCoding
protocol ValueCoder: NSObjectProtocol, NSCoding {
/// The type this coder can encode/decode
associatedtype ValueType