未申报 - "首次使用功能"

Rag*_*har 0 iphone methods function objective-c ios

我是Objective-C的新手,虽然我在Android方面非常出色.我正在尝试调用一个方法,但它让我"首次使用函数".我知道我犯了一个愚蠢的错误,但专家可以很容易地搞清楚.

RootViewController.h

#import <UIKit/UIKit.h>
#import "ContentViewController.h"

@interface RootViewController : UITableViewController {
    ContentViewController *contentViewController;
}

@property (nonatomic, retain) ContentViewController *contentViewController;

- (NSString*)getContentFileName:(NSString*)title; //<--- This function declartion

@end
Run Code Online (Sandbox Code Playgroud)

RootViewController.m

#import "RootViewController.h"
#import "HAWATAppDelegate.h"
#import "ContentViewController.h"

@implementation RootViewController
@synthesize contentViewController;

...
more methods
...

#pragma mark -
#pragma mark Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    HAWATAppDelegate *appDelegate = (HAWATAppDelegate *)[[UIApplication sharedApplication] delegate];
    NSString *title = (NSString *) [appDelegate.titles objectAtIndex:indexPath.row];

    NSString *fileName = getContentFileName:title; //<--- Here is the error

    ...
}

- (NSString*) getContentFileName:(NSString*)title {
    return [title lowercaseString];
}

@end
Run Code Online (Sandbox Code Playgroud)

必须有一件我想念的简单事.请告诉我.提前致谢.

Emp*_*ack 5

我的天啊!!那应该是[self getContentFileName:title];