Xcode 4.4 で数学ベースのアプリケーションを作成しました。ストーリーボードの助けを借りてタブバーベースのアプリを使用しています。
私はすべての数学関数を、 CalculationMethods
NSObject のサブクラスと呼ばれる別のクラスに記述しました。
私のViewController:
// FirstViewController.h
#import <UIKit/UIKit.h>
#import "CalculationMethods.h"
@interface FirstViewController : UIViewController
@end
// FirstViewController.m
#import "FirstViewController.h"
#import "CalculationMethods.h"
@interface FirstViewController ()
@end
@implementation FirstViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSLog(@"%f",[self julianDateFinder: [self currentDayMonthAndYearFinder]]);
}
@end
ご覧のとおり、CalculationMethod.h ファイルを FirstViewController.h と FirstViewController.m ファイルの両方に含めましたが、 や などのそのクラスのメソッドを使用するjulianDateFinder
と、次のようcurrentDayMonthAndYearFinder
に Xcode エラーが発生します。
「'FirstViewController' の表示されない @interface は、セレクター 'CurrentDayMonthAndYearFinder' を宣言します」
私はiOSとXCodeが初めてです。誰でもエラーの解決を手伝ってもらえますか?