Skip to content

Instantly share code, notes, and snippets.

View igiu1988's full-sized avatar
🐈
Rise

Wang Yang igiu1988

🐈
Rise
View GitHub Profile
@colinmcardell
colinmcardell / NSLog replacement (DLog, ALog, ULog).
Created March 7, 2013 21:08
Replacement for NSLog similar to http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ This is plenty available elsewhere with a number of variations...
// DLog will output like NSLog only when the DEBUG variable is set
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(...)
#endif
// ALog will always output like NSLog
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
@n-b
n-b / NBResponderChainUtilities.h
Last active August 3, 2021 10:08
Chain Responder Debugging Methods
//
// NBResponderChainUtilities.h
//
// Created by Nicolas @ bou.io on 19/04/13.
//
#import <UIKit/UIKit.h>
@interface UIView (NBResponderChainUtilities)
- (UIView*) nb_firstResponder; // Recurse into subviews to find one that responds YES to -isFirstResponder