0
나는 내가 오류가 여기에정의의 UIViewController로 프로젝트를 빌드 할 수 없습니다
"_OBJC_CLASS_$_TimeLineCreater", referenced from:
objc-class-ref in TimeLineViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
입니다 목적 C.에서 프로젝트를 빌드 할 때 이봐, 난는 오류가 발생한하는 .m 파일에 오류가있다 얻고있다 :
#import "TimeLineViewController.h"
@implementation TimeLineViewController
@synthesize myPopover;
@synthesize appDelegate;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
[super viewDidLoad];
//THIS IS WHERE THE ERROR OCCURS, WHEN I TRY TO ADD THIS UIVIEWCONTROLLER
TimeLineCreater *timeline = [[TimeLineCreater alloc]init];
[self.view addSubview:timeline.view];
}
정말 어떻게 해결해야할지 모르겠다. 다른 질문에서 몇 가지 제안을 시도했지만 운이 없었습니다. 어떤 아이디어? 여기에 추가 도움이 필요
는 TimeLineCreater의 .H와하는 .m 파일
.H
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
@interface TimeLineCreator : UIViewController{
AppDelegate * _appDelegate;
NSMutableArray *teamMembers;
NSMutableArray *projects;
NSMutableArray *tasks;
//Parameter ints (ints that are passed in)
int timeLineType;
int horizontalLineWidth;
int horizontalLineHeight;
int vertialLineWidth;
int verticalLineHeight;
int numberOfObjectsOnLine;
int spaceBetweenObjects;
int objectsStartingPoint;
UILabel *nameOfTimeLine;
UILabel *taskNameLabel;
UILabel *dateDueLabel;
IBOutlet UIScrollView *timeLineScrollView;
}
@property(nonatomic, retain) AppDelegate * appDelegate;
@property int timeLineType;
@property int horizontalLineWidth;
@property int horizontalLineHeight;
@property int vertialLineWidth;
@property int verticalLineHeight;
@property int numberOfObjectsOnLine;
@property int spaceBetweenObjects;
@property int objectsStartingPoint;
@property(nonatomic, retain) UILabel * nameOfTimeLine;
@property(nonatomic, retain) UILabel * taskNameLabel;
@property(nonatomic, retain) UILabel * dateDueLabel;
하는 .m
#import "TimeLineCreator.h"
@implementation TimeLineCreator
@synthesize appDelegate;
@synthesize timeLineType;
@synthesize horizontalLineWidth;
@synthesize horizontalLineHeight;
@synthesize vertialLineWidth;
@synthesize verticalLineHeight;
@synthesize taskNameLabel;
@synthesize nameOfTimeLine;
@synthesize numberOfObjectsOnLine;
@synthesize dateDueLabel;
@synthesize spaceBetweenObjects;
@synthesize objectsStartingPoint;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
projects = [[NSMutableArray alloc] initWithArray:self.appDelegate.projects];
teamMembers = [[NSMutableArray alloc] initWithArray:self.appDelegate.teamMembers];
tasks = [[NSMutableArray alloc] initWithArray:self.appDelegate.tasks];
if(objectsStartingPoint == 0){
objectsStartingPoint = 30;
}
NSLog(@"objectStartingPoint is %i", objectsStartingPoint);
horizontalLineWidth = objectsStartingPoint + (numberOfObjectsOnLine *spaceBetweenObjects);
}
이전에 TimeLineCreater라는 다른 클래스를 만들고 삭제했습니다. 나는 그것이 단지 파일에 있었기 때문에 나는 그것에 대한 참조만을 삭제했다고 생각한다. 도와 주셔서 감사합니다 – Rob