私はObjective-Cを初めて使っています。私はメソッドへの呼び出しをしようとしていますが、それは私に「関数での最初の使用」を与えます。私は愚かな間違いをしていることを知っていますが、専門家はそれを簡単に理解することができます。宣言されていない - '関数での最初の使用'
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
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
私が欠けている単純なことがなければなりません。私にお知らせください。前もって感謝します。
うわー!ありがとう@ EmptyStack。今すぐ動作します。 12分で回答を受け付けます) –
OOOOMMMMGGGG、勝者のチキンディナー。 –
@Ragunath Jawahar、ようこそ – EmptyStack