uiactivityindicatorview

Using UIActivityIndicatorView with UIWebView in Swift

心已入冬 提交于 2019-12-04 17:37:33
问题 I'm trying to display an Activity Indicator View in my app to users while a url is being loaded into a WebView. I've tried toying with activity.startAnimating/activity.stopAnimating and tried placing them in functions, etc. but have not had any luck. The best I have been able to get is the Activity Indicator to appear and animate, but then not stop animating or hide once my url is loaded, so it continues spinning on top of the web page. In other situations, when trying to move around activity

Displaying activity indicator on WKWebView using swift

点点圈 提交于 2019-12-04 15:34:37
问题 I am working on the following code and trying to show an activity indicator in the view whilst the page is loading.. I tried to implement the WKNavigationDelegate methods but I am failing as nothing shows. Any suggestions on how to fix this? I am not setting the SupportWebView view delegate anywhere but I wouldn't know how to do it in swift.. import UIKit import WebKit class SupportWebView: UIViewController, WKNavigationDelegate { @IBOutlet var containerView : UIView? = nil var webView:

Can’t get a spinner to appear

爱⌒轻易说出口 提交于 2019-12-04 10:17:52
I would like to use a spinner. But, this code below does not display a spinner and I'm not sure why. How to make this work? BTW, It is being called from a submit button I created. //spinner declared in .h file UIActivityIndicatorView *aSpinner; //throw up spinner from submit btn we created aSpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleWhiteLarge]; [self.view addSubview:aSpinner]; [aSpinner release]; [aSpinner startAnimating]; //send blocking request [request startSynchronous]; //get rid of spinner when finished delegate is fired - (void

How to add activity indicator to the image in UITableView?

一个人想着一个人 提交于 2019-12-04 06:25:41
问题 I have created the Custom tableView and using custom tableView class in Other class to Show the tableView .. I am Loading the image from Server and displaying it in the tableViewRow .. each image is different in it.. On Screen only 7 out of 10 images will come, and when I scroll down the first 3 images are repeating for some time and when those images get load its showing proper images.. but initially till new images will come its showing old images, I want to put a activity indicator to show

UIActivityIndicatorView not showing until after loading done

白昼怎懂夜的黑 提交于 2019-12-04 03:48:38
I have a button on the currently navigated to viewcontroller, connected to an IBAction. In the IBAction I create a UIActivityIndicatorView as usual, with [self.view addSubView], then load some pictures. I've tried setNeedsDisplay on the indicator view, the view controller, and the window, but it still loads the pictures before showing the indicator, which of course is quite useless to me. So I'm looking for a way to either force an instant redraw (which when I think a little more about it is unlikely to make work), or a way to load the pictures after the indicator has appeared, or a way to

How to position activity indicator to the center of its superview using Auto Layout programmatically?

老子叫甜甜 提交于 2019-12-03 22:34:22
Why the following code does not work for positioning activity indicator to the center of its superview: UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; [self.mysuperview addSubview:activityIndicator]; [activityIndicator addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"|-(>=20)-[view(==100)]-(>=20)-|" options:NSLayoutFormatAlignAllCenterX | NSLayoutFormatAlignAllCenterY metrics:nil views:@{@"view" : self.mysuperview}]]; Activity indicator is positioned somewhere at the top left

iphone - programmatically change navigation bar button to activity indicator

假装没事ソ 提交于 2019-12-03 22:11:49
I have added a refresh UIBarButtonItem to my navigation bar on my iPhone app. When the user taps the button I'd like the refresh button to change to the animated activity indicator and once the operation (in this case a download) is complete switch the activity indicator back to the refresh button. I have added the refresh button using IB. Then on the button tap I create a new activity indicator and keep an pointer to the original refresh button. Like so: refreshButtonItem = self.navigationItem.leftBarButtonItem; if (activityButtonItem == nil) { activityIndicator = [[UIActivityIndicatorView

How do I put a UIActivityIndicatorView in a UIAlertController?

纵饮孤独 提交于 2019-12-03 21:19:47
问题 We're moving away from MBProgressHUD because it's too glitchy in our app, and doesn't have features such as blocking user input or providing a Cancel button. So, I've attempted to implement Swipesight's How to display activity indicator in center of UIAlertController?, and I ran into improper positioning of the indicator: It is green because our app's tint is green. As you can see, it's not in the white rectangle part of the controller, but the grey background. This uses something similar to

Add activity indicator at bottom of UITableView? [closed]

我与影子孤独终老i 提交于 2019-12-03 18:57:22
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I have UITableview with pagination like first will get 20 objects from server and will populate in UITableView then when it reaches last row need to make another service call to get next 20 objects. My problem is I need to add activity indicator at bottom of my table and

Adding Activity Indicator to UIAlertView

霸气de小男生 提交于 2019-12-03 12:37:02
问题 I'm trying to add UIActivityIndicatorView to UIAlertView but couldn't get it done. I have seen posts on this implementation and found out that it works only for versions below iOS7. Below is the code I've tried... var alert: UIAlertView = UIAlertView(title: "Title", message: "Please wait...", delegate: nil, cancelButtonTitle: "Cancel"); var loadingIndicator: UIActivityIndicatorView = UIActivityIndicatorView(frame: CGRectMake(0.0, 0.0, 10.0, 10.0)) as UIActivityIndicatorView loadingIndicator