NSLog import and library [closed]
I can't believe how much trou开发者_运维百科ble I am having finding this:
I want to use NSLog()
what do I have to #import
and what library do I link to?
thanks in advance,
Jay
Go to http://developer.apple.com and in the search box type NSLog(). This takes you to the Foundation functions which documents this.
So the #import
you are looking for is:
#import <Foundation/Foundation.h>
or, if you are on Xcode 5 and have module support turned on:
@import Foundation;
NSLog
is apart of the Foundation framework.
Just like the rest of the NS
classes and functions, you do not need to #import
anything if you have the standard build setup such that the foundation classes are implicitly imported.
精彩评论