Skip to content

Instantly share code, notes, and snippets.

View benzamin's full-sized avatar

Benzamin Basher benzamin

View GitHub Profile
@benzamin
benzamin / BBFileManager.h
Last active December 22, 2020 00:48
Utility Class for basic file caching and file manipulation of documentsdirectory if iOS.
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface BBFileManager : NSObject
//-------------------- File caching ------------------
/**
* Caches a NSDictionary in the cache for a certain period of time
* @param dict The NSDictionary which need to be cached
@benzamin
benzamin / BBExtensions.swift
Last active January 16, 2019 09:51
UtilityFiles
//
// BBExtensions.swift
// Benzamin Basher
//
// Created by Digital & ABS Planning on 8/20/18.
// Copyright © 2018 RedGreen Studio. All rights reserved.
//
import UIKit
import Foundation
@benzamin
benzamin / MyViewController.h
Created May 14, 2017 08:23
Automatic view pushing when keyboard covers a text field depending on the position of the textfield in the window.
#import <UIKit/UIKit.h>
@interface MyViewController : UIViewController
@end
@benzamin
benzamin / DispatchGroup.h
Last active January 29, 2017 09:21
Using dispatch_group to execute code synchronously, this sample singletone class might help to implement it easily.
#import <Foundation/Foundation.h>
@interface DispatchGroupManager : NSObject
{
}
/**
* Singleton constructor
* @return Singleton instance of DispatchGroup.
*/