http://www.starfelix.com/blog/2014/03/17/lldbdiao-shi-ming-ling-chu-tan/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIViewController *)viewController { | |
for (UIView* next = [self superview]; next; next = next.superview) { | |
UIResponder *nextResponder = [next nextResponder]; | |
if ([nextResponder isKindOfClass:[UIViewController class]]) { | |
return (UIViewController *)nextResponder; | |
} | |
} | |
return nil; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureHandler:)]; | |
[panGesture setMinimumNumberOfTouches:1]; | |
[self.currentlistPageController.listPageView.planTableView addGestureRecognizer:panGesture]; | |
- (void)panGestureHandler:(UIPanGestureRecognizer *)sender { | |
static double transitionOriginX; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create | |
NSFileManager * fileManager = [NSFileManager defaultManager]; | |
if ([fileManager fileExistsAtPath:self.dbPath] == NO) { | |
// create it | |
FMDatabase * db = [FMDatabase databaseWithPath:self.dbPath]; | |
if ([db open]) { | |
NSString * sql = @"CREATE TABLE 'User' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , 'name' VARCHAR(30), 'password' VARCHAR(30))"; | |
BOOL res = [db executeUpdate:sql]; | |
if (!res) { | |
debugLog(@"error when creating db table"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeNavigationBarAlpha:) name:@"changeNavigationBarAlpha" object:nil]; | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeNavigationBarAlpha" object:[NSString stringWithFormat:@"%f",a]]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callBack1:) name:@"PosterOne" object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callBack2:) name:@"PosterTwo" object:nil]; | |
-(void)callBack1:(NSNotification*)notification{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.git-tower.com/blog/content/posts/git-cheat-sheet-cn/git-cheat-sheet-large01-cn.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURL *url = [NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]; | |
if ([[UIApplication sharedApplication] canOpenURL:url]) | |
{ | |
[[UIApplication sharedApplication] openURL:url]; | |
} | |
About — prefs:root=General&path=About | |
Accessibility — prefs:root=General&path=ACCESSIBILITY | |
Airplane Mode On — prefs:root=AIRPLANE_MODE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iOS 事件处理机制与图像渲染过程 | |
iOS RunLoop都干了什么 | |
iOS 为什么必须在主线程中操作UI | |
事件响应 | |
CALayer | |
CADisplayLink 和 NSTimer | |
iOS 渲染过程 | |
渲染时机 | |
CPU 和 GPU渲染 | |
Core Animation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define instance_interface(className, instanceMothed) \ | |
\ | |
+(instancetype)instanceMothed; | |
//实现方法 | |
#define instance_implementation(className, instanceMothed) \ | |
\ | |
static className *_instance;\ | |
\ |
OlderNewer