Commits

José Manuel Sánchez Peñarroja committed 2d0260f

Fixed issue with progress

Comments (0)

Files changed (3)

Example/Example.xcworkspace/xcuserdata/josanchez.xcuserdatad/UserInterfaceState.xcuserstate

Binary file modified.

bmf/ios/subspecs/m13/BMFM13ProgressView.m

 				self.progressView.alpha = 1;
 			}
 			else {
-				self.progressView.alpha = 0;
-				if (self.progress.completedUnitCount==self.progress.totalUnitCount) {
+				if (self.progress.fractionCompleted==1) {
 					if (self.progress.failedError) {
 						[self.progressView performAction:M13ProgressViewActionFailure animated:YES];
 					}

bmf/shared/data/BMFProgress.m

 				});
 				
 				for (BMFProgress *child in children) {
-					total += child.totalUnitCount;
-					completed += child.completedUnitCount;
+					CGFloat childTotal = child.estimatedTime*1000;
+					
+					total += childTotal;
+					completed += child.fractionCompleted*childTotal;
+					
+//					total += child.totalUnitCount;
+//					completed += child.completedUnitCount;
 				}
 				
 				if (_totalUnitCount!=total)	self.totalUnitCount = total;