DownloadQueenViewController.m 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // DownloadQueenViewController.m
  3. // TumblrDownloader
  4. //
  5. // Created by HonorLee on 16/1/17.
  6. // Copyright © 2016年 HonorLee. All rights reserved.
  7. //
  8. #import "DownloadQueenViewController.h"
  9. @interface DownloadQueenViewController ()
  10. @end
  11. @implementation DownloadQueenViewController
  12. @synthesize DownloadTableView;
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. // Do any additional setup after loading the view.
  16. DownloadTableView.dataSource = self;
  17. DownloadTableView.delegate = self;
  18. }
  19. - (void)didReceiveMemoryWarning {
  20. [super didReceiveMemoryWarning];
  21. // Dispose of any resources that can be recreated.
  22. }
  23. #pragma TableView
  24. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  25. return 1;
  26. }
  27. -(void)tableView:(UITableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender{
  28. }
  29. -(NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{
  30. return 1;
  31. }
  32. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  33. UITableViewCell *cell = [DownloadTableView dequeueReusableCellWithIdentifier:@"DownloadQueenCell"];
  34. [cell setFrame:CGRectMake(0, 0, DownloadTableView.frame.size.width, 40)];
  35. UIProgressView *progressView = [[UIProgressView alloc]initWithFrame:CGRectMake(0, 0, cell.frame.size.width, cell.frame.size.height)];
  36. [cell addSubview:progressView];
  37. [progressView setTransform:CGAffineTransformMakeScale(1, 44)];
  38. [progressView setTintColor:[UIColor colorWithRed:249/255.0 green:249/255.0 blue:249/255.0 alpha:1]];
  39. [progressView setProgressViewStyle:UIProgressViewStyleBar];
  40. [progressView setProgress:0.7 animated:YES];
  41. return cell;
  42. }
  43. @end