ios - xcode project several errors when i try to compile -
i new iphone programming. have code (snippet) .m file. when seek xcode project several errors not understand.
-(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; homecoming 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) // download indeed paused rather queued in case should have been 0 { [bar forcestop]; // read contents of file receiveddata // bar.receiveddata = [self loadqueuedorpauseditemcontents]; bar.progress = ((bytesreceived/(float)expectedbytes)*100)/100; } bar.orgytlink = self.orgytlink; } error reports:
any thought why give me errors? give thanks in advance.
ios xcode
No comments:
Post a Comment