Ios 当我试图编译时,xcode项目出现了几个错误

Ios 当我试图编译时,xcode项目出现了几个错误,ios,xcode,Ios,Xcode,我不熟悉iphone编程。我有一个.m文件中的代码(片段)。当我尝试使用xcode项目时,我遇到了几个我不理解的错误 -(BOOL)setUp:(BOOL)startImmediate { [self saveDownloadInfo]; if (startImmediate) { bar = [UIDownloadBar initWithProgressBarFrame:CGRectMake(0, 17.0, 50, 11.0)

我不熟悉iphone编程。我有一个.m文件中的代码(片段)。当我尝试使用xcode项目时,我遇到了几个我不理解的错误

-(BOOL)setUp:(BOOL)startImmediate
{
[self saveDownloadInfo];
if (startImmediate)
{
    bar = [UIDownloadBar initWithProgressBarFrame:CGRectMake(0, 17.0, 50, 11.0)
                                delegate:self];

    [bar setProgressViewStyle:UIProgressViewStyleBar];
    [bar beginDownloadWithURL:[NSURL URLWithString:[self FileUrl]] timeout:600 fileName:[self     FileTitle]];
}
else
{
    bar = [UIDownloadBar initWithProgressBarFrame:CGRectMake(140.0, 36.0, 130.0, 11.0)
                                                 delegate:self];

    [bar setProgressViewStyle:UIProgressViewStyleDefault];

    [bar beginDownloadWithURL:[NSURL URLWithString:[self FileUrl]] timeout:600 fileName:[self FileTitle]];
}
if ([self.orgYTLink length] >0)  bar.orgYTLink = self.orgYTLink;
return YES;
}

-(void)setUpWithPausedDownload:(long long)expectedBytes ReceivedBytes:(float)bytesReceived
{
bar = [UIDownloadBar initWithProgressBarFrame:CGRectMake(140.0, 36, 130.0, 11.0)
                                             delegate:self];

[bar setProgressViewStyle:UIProgressViewStyleDefault];
bar.expectedBytes = expectedBytes;
bar.bytesReceived = bytesReceived;
if (expectedBytes >0) // The download was indeed paused rather than just queued in which case it should have been 0
{
    [bar forceStop];
    // Read the contents of file into the receivedData
//      bar.receivedData = [self loadQueuedOrPausedItemContents];
    bar.progress = ((bytesReceived/(float)expectedBytes)*100)/100;
}
bar.orgYTLink = self.orgYTLink;
}
错误报告:

知道为什么它会给我这个错误吗?
提前谢谢。

看起来您还没有导入
UIKit
。添加
@import-UIKit在文件的顶部。您好,我还有一些问题。当我添加@import-UIKit时;我变成了一个错误:当模块被禁用时使用“@import”。当我添加#import时,xCode告诉我找不到错误“UIKit”文件。我能做什么?