在另一个viewController的自定义单元格中更新进度视图

这是我的自定义单元格代码:

#import <UIKit/UIKit.h> @interface ShareCell : UITableViewCell @property (strong, nonatomic) IBOutlet UILabel *lblTitle; @property (strong, nonatomic) IBOutlet UIProgressView *progressView; @property (strong, nonatomic) IBOutlet UIButton *btnCancel; @end 

如何在我的视图控制器的自定义单元格中调用更新进度视图事件。感谢高级

我想你需要下面的链接,并在cellforrowatindexpath方法中创build一个UIProgressView。 https://github.com/lightdesign/LDProgressView

 I made a Timer for updating progressView in Cell. you call your method when wants to Update.In viewDidLoad from you want to update progressView. NSTimer* myTimer = [NSTimer scheduledTimerWithTimeInterval: 10.0 target: self selector: @selector(callAfterTenSecond:) userInfo: nil repeats: YES]; [myTimer fire]; That method Gets call.calling method of TableCell.with posting notification. -(void) callAfterTenSecond:(NSTimer*) t { [[NSNotificationCenter defaultCenter] postNotificationName:@"notificationName" object:_cell]; } while Creating Cell add observer. TableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; [cell addObserver]; In tableViewCell. -(void)addObserver { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(somethingHappens:) name:@"notificationName" object:nil]; } That method gets call when you post notification. -(void) somethingHappens:(NSNotification*) notification { _progress.progress+=0.1; }