开发者

NSLog import and library [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜