uiprogressview

UIProgressView on UITableViewCell

坚强是说给别人听的谎言 提交于 2019-12-25 04:29:13
问题 I am using AFNetworking to download files from my server. It works fine. But I have one issue: My ProgressView updates wrong cell(UI, not data) when I scroll up or down. Here is my code: My Cell: AFHTTPRequestOperation *operation; @property (weak, nonatomic) IBOutlet DACircularProgressView *daProgressView; - (IBAction)pressDown:(id)sender { AFAPIEngineer *apiEngineer = [[AFAPIEngineer alloc] initWithBaseURL:[NSURL URLWithString:AF_API_HOST]]; operation = [apiEngineer downloadFile:

Swift - UIProgressView fills diagonally

霸气de小男生 提交于 2019-12-24 05:38:00
问题 So I set up a UIProgressView to fill after 3 seconds as well as increasing the height of the bar a bit. However when it fills up, it fills diagonally as opposed to just filling from one side to the other. The bar starts in the top right corner and then expands to fill the progress view just before it ends. This is the code I am using: import UIKit class LoadingScreen: UIViewController { @IBOutlet weak var progressView: UIProgressView! override func viewDidLoad() { super.viewDidLoad() UIView

iOS - UIProgressView only updating once

泄露秘密 提交于 2019-12-22 09:46:31
问题 I am loading data from an API and am using a UIProgressView to display how much has loaded. In my viewWillAppear I use Reachability to check that there is an internet connection. Then, if there is, the following line is called 10 times in a function. [self performSelectorInBackground:@selector(updateProgress) withObject:nil]; This then runs this method -(void)updateProgress { float currentProgress = myProgressBar.progress; NSLog(@"%0.2f", currentProgress); [loadingProg setProgress

UIProgressView not updating?

别等时光非礼了梦想. 提交于 2019-12-21 15:38:12
问题 I have started playing with UIProgressView in iOS5, but havent really had luck with it. I am having trouble updating view. I have set of sequential actions, after each i update progress. Problem is, progress view is not updated little by little but only after all have finished. It goes something like this: float cnt = 0.2; for (Photo *photo in [Photo photos]) { [photos addObject:[photo createJSON]]; [progressBar setProgress:cnt animated:YES]; cnt += 0.2; } Browsing stack overflow, i have

How to link Firebase download file with a progress view?

此生再无相见时 提交于 2019-12-21 06:48:56
问题 Below is the code I am using to download PDF files from Firebase storage. What I want to do is to link it with a download progress view with percentage instead of activity indicator. import Foundation import UIKit import Firebase import SwiftLoader class showPdfVC: UIViewController , UIWebViewDelegate,ReaderViewControllerDelegate{ var pdfbooks = UIWebView() var nIndex:NSInteger! var post: Post! var db : DBHelper = DBHelper() var book : BookModel? @IBAction func backbtn(_ sender: Any) { if let

Progress bar for AVAssetExportSession

北慕城南 提交于 2019-12-20 09:54:08
问题 I've got an app that exports an AVMutableComposition into a .mov file, and I'd like for the user to see the status of the export with a progress bar the same way that you would if you sent a text message or uploaded a file. I know how to create a progress bar when I know the duration of a task (such as playing an audio file), but since there's no set duration for the export I'm unsure how to proceed. I've got an activity indicator currently but it doesn't provide the best user experience.

Is it possible to add multiple colors in a UIProgressView?

僤鯓⒐⒋嵵緔 提交于 2019-12-19 10:38:07
问题 Basically, I want to create a custom progressview that will have different colors depending on the progress value. It should look like the following: [-----Red----][--Yellow--][-Green-] 回答1: Or you can look at this library https://github.com/YannickL/YLProgressBar 回答2: 1) Create an image that has the desired color gradient in some image editing program. 2) Put the image into your asset library. 3) Generate a UIImage instance from the respective image. UIImage *image = [UIImage imageNamed:@

Displaying download progress in reusable cells

99封情书 提交于 2019-12-19 04:39:05
问题 I am trying to display download progress in my collectionview cells. Im currently using the parse progressblock which has an instance of the cell and updates the progress bar. }, progressBlock: { (percent) in self.mainQueue.addOperation { // set the downloadProgess var to update from cellForItemAt // downloadProgress = (Float(percent) / Float(100)) if let downloadingCell = self.collectionView.cellForItem(at: self.indexPath) as? InnerCollectionCell { downloadingCell.progressBar.isHidden =

How to show ProgressBar With AFNetworking AFHTTPRequestOperationManager

丶灬走出姿态 提交于 2019-12-19 04:25:16
问题 I am trying to show the Progress Bar as I download a JSON from a url. The JSON is downloading correctly but I am not sure how to show the Progress Bar. I have tried using UIProgressView but it does not display on the screen. Any suggestions would be appreciated. CGFloat width = [UIScreen mainScreen].bounds.size.width; CGFloat height = [UIScreen mainScreen].bounds.size.height; CGRect rect = CGRectMake(width/2, height/2, width/5, height/5); UIProgressView *myProgressView = [[UIProgressView

UIWebView with Progress Bar

老子叫甜甜 提交于 2019-12-17 17:38:18
问题 Hi I'm new to programming and I'm trying to make my first app for iPhones on Xcode. My app contains of a button which opens a UIWebView when pressed and loads up a homepage. Now I also want to add a Progress View to the WebView like Safari also uses, which indicates the progress of loading the page. How can I do that? My code so far for loading the URL in the UIWebView: .h IBOutlet UIWebView *webView; .m - (void)viewDidLoad { [webView loadRequest:[NSURLRequest requestWithURL: [NSURL