Skip to content

Instantly share code, notes, and snippets.

View leapingbytes's full-sized avatar

Andrei Tchijov leapingbytes

View GitHub Profile
@leapingbytes
leapingbytes / LBAlertView.h
Created August 25, 2013 22:10
Subclass for UIAlertView which allows to use blocks instead of delegate
#import <UIKit/UIKit.h>
typedef void (^LB_ALERT_BLOC)(UIAlertView* alertView, int buttonIndex);
@interface LBAlertView: UIAlertView<UIAlertViewDelegate>
@property(strong, nonatomic) LB_ALERT_BLOC onClickBlock_;
- (void) setOnClickBlock: (LB_ALERT_BLOC) aBlock;
@leapingbytes
leapingbytes / d007_module.class.inc
Last active December 21, 2015 07:29
Base classes for OO-Drupal 7 - DOO7 See the corresponding blog post at https://www.leapingbytes.com/blog/doo7_you_can_teach_old_dog_new_tricks
<?php
/** @file
* Base classes for OO-Drupal 7 - DOO7 :)
*
* @author atchijov
*
*/
/**
* Poor man mixins.
#import <Foundation/Foundation.h>
@interface NSString (LBToolbox)
- (CGSize) sizeWithWidth: (CGFloat) width andFont: (UIFont*) font;
@end
@leapingbytes
leapingbytes / LBGradientButton.h
Created February 2, 2012 14:37
LBGradientButton
//
// TBRButton.h
// TBR
//
// Created by andrei tchijov on 2/7/11.
// Copyright 2011 Leaping Bytes, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>