As easy as
#define VariableName(arg) (@""#arg)
Then you do:
NSObject *obj;
NSString *str = VariableName(obj);
NSLog(@"STR %@", str);//obj
More Related Contents:
- How to convert an NSString into an NSNumber
- Objective-C: Reading a file line by line
- Converting a string to an NSDate
- Remove all but numbers from NSString
- Check that a input to UITextField is numeric only
- Number of occurrences of a substring in an NSString?
- Any way to bold part of a NSString?
- Calculating the number of days between two dates in Objective-C
- NSString (hex) to bytes
- String comparison in Objective-C
- Difference between NSString literals
- Convert NSArray to NSString in Objective-C
- NSString to CFStringRef and CFStringRef to NSString in ARC?
- How to add commas to number every 3 digits in Objective C?
- How to remove whitespace from right end of NSString?
- Remove characters from NSString?
- How to convert NSNumber to NSString
- Finding a substring in a NSString object
- How to make subscripts and superscripts using NSAttributedString?
- Reverse NSString text
- NSString is integer?
- Using NSRegularExpression to extract URLs on the iPhone
- How to get substring of NSString?
- Convert string to float in Objective-C
- Converting NSString to NSDictionary / JSON
- sizeWithFont method is deprecated. boundingRectWithSize returns an unexpected value
- NSString – Convert to pure alphabet only (i.e. remove accents+punctuation)
- String won’t url encode in iOS
- How to declare a two dimensional array of string type in Objective-C?
- How to get the width of an NSString?