Last active
December 15, 2015 12:38
-
-
Save satoshin2071/5261187 to your computer and use it in GitHub Desktop.
NSLogまとめ
This file contains 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
//そのobjがどのクラスに属するか | |
NSLog(@"%@",NSStringFromClass([obj class])); | |
//frame | |
NSLog(@"%@",NSStringFromCGRect(startFrame)); | |
//メソッド名とクラス名と行番号 | |
NSLog(@"%s #%04d", __PRETTY_FUNCTION__, __LINE__); | |
//インスタンスのクラス名 | |
NSLog(@"%@", NSStringFromClass([self class])); | |
//メソッド名 | |
NSLog(@"%@", NSStringFromSelector(_cmd)); | |
//メソッド名とそのメソッドが属するクラス名 | |
NSLog(@"%s", __func__); | |
NSLog(@"%s", __FUNCTION__); | |
NSLog(@"%s", __PRETTY_FUNCTION__); | |
//ソースファイル名 | |
NSLog(@"%s", __FILE__); | |
//ソースファイル内の行番号 | |
NSLog(@"%d", __LINE__); | |
//コールスタック | |
NSLog(@"%@", [NSThread callStackSymbols]); | |
//NSLog() で UIView 階層 | |
NSLog(@"%@", [self.view recursiveDescription]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment