Skip to content

Instantly share code, notes, and snippets.

View akashgupta88's full-sized avatar

Akash Gupta akashgupta88

  • Agoda
  • Bangkok, Thailand
View GitHub Profile
@akashgupta88
akashgupta88 / UIAlertController+Show.h
Last active November 1, 2015 19:07
A simple category which adds a familiar method (UIAlertView) for showing a UIAlertController instance from anywhere in your iOS project.
#import <UIKit/UIKit.h>
@interface UIAlertController (Show)
-(void)show;
-(void)showWithCompletion:(void(^)())completion;
-(void)showWithCompletion:(void(^)())completion failure:(void(^)())failure;
@akashgupta88
akashgupta88 / .gitignore for iOS projects
Last active November 1, 2015 19:06
The .gitignore which works for me in my iOS projects.
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
@akashgupta88
akashgupta88 / UIView+AddSubviewWithConstraints.h
Created November 1, 2015 19:10
For adding views instantiated from nibs quickly along with opinionated Autolayout Constraints.
#import <UIKit/UIKit.h>
@interface UIView (AddSubviewWithConstraints)
-(void)addSubview:(UIView *)view withConstraintInsets:(UIEdgeInsets)insets;
@end