당신은 모든 ASIHTTPRequest 라이브러리를 가져 u는 당신이 진행 표시 줄 및 사용을 사용하면 프로토콜 파일 가져 오기를 사용해야합니다 울부 짖는 소리의 inbuilt 방법 ...
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *[email protected]"http://dulemba.com/Visits/Cover-GGCC(2mb).jpg";
proTo = [[protocol_file alloc]initWithURL:[NSURL URLWithString:url] delegate:self];
imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 10, 300, 250)];
[self.view addSubview:imageView];
lbl=[[UILabel alloc]initWithFrame:CGRectMake(0, 250, 200, 100)];
[self.view addSubview:lbl];
lblPers=[[UILabel alloc]initWithFrame:CGRectMake(100, 250, 200, 100)];
[self.view addSubview:lblPers];
progressBar = [[UIProgressView alloc] initWithFrame:CGRectMake(0, 280, 300, 90)];
[self.view addSubview:progressBar];
}
-(void)imgDownload:(UIImage *)data{
imageView.image=data;
NSLog(@"image");}
-(void)setLblvalue:(float)val{
lblPers.text=[[NSString alloc]initWithFormat:@"%0.2f %%",val];
}
-(void)setProgValu:(float)val{
progressBar.progress=val;
// NSLog (@ "progress % f", val); }
-(void)setPersent:(float)val{
lbl.text = [[NSString alloc] initWithFormat:@"%0.2f MB",val];
}