iOS
を使用してアプリケーションでツリーを作成していますCFTree
。「宣言されていない識別子 ' CFTree
' の使用」というエラーが表示されます。私は何が欠けていますか?私のコード:
#import "ViewController.h"
#import <CoreFoundation/CoreFoundation.h>
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
CFTree tree = CreateMyTree(kCFAllocatorDefault);
}
static CFTreeRef CreateMyTree(CFAllocatorRef allocator) {
NSString *info = @"Bhushan is great";
CFTreeContext ctx;
ctx.version = 0;
ctx.info = (__bridge void *)(info);
ctx.retain = CFRetain;
ctx.release = CFRelease;
ctx.copyDescription = NULL;
return CFTreeCreate(allocator, &ctx);
}