LoginSignup
8
4

More than 5 years have passed since last update.

Objective-C : クラスの名前をNSStringで取得する

Last updated at Posted at 2014-01-07

メモ。

// objectという名前のクラス不明のオブジェクトがあるとき
NSString * className = NSStringFromClass([object class]);
NSLog(@"クラス名は %@", className);

参照元こちら。
http://program.station.ez-net.jp/special/handbook/objective-c/id/instanse.asp

8
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4