iOS – Simple trick to allow typing string instead of NSString

So it drives me crazy to type string in C#, then try to type NSString in objective-c. This is a simple fix and for a while, I didn’t think about it, then it hit me: typedef.

I opened the -Prefix.pch file and added the following line:

typedef NSString string

Yes, it was that easy. Now I can type string instead of NSString.

One Comment

Leave a Reply

How to post code in comments?

*