uiactivityindicatorview

Why won't my UIActivityIndicatorView stop animating?

早过忘川 提交于 2020-01-02 07:06:32
问题 I am trying to manage the activity indicator from my App Delegate, that way any of my views can put the indicator up. So, I am adding it as a subview to 'window' and start/stop as follows: - (void)didStartActivity { if( activityIndicator == nil ) { activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; activityIndicator.hidesWhenStopped = YES; activityIndicator.center = window.center; activityIndicator.transform =

Can’t get a spinner to appear

南楼画角 提交于 2020-01-01 12:32:09
问题 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

Activity indicator with custom image

纵然是瞬间 提交于 2019-12-31 08:49:29
问题 I am loading a UIWebView and in the meantime I wan't to show a blank page with this activity indicator spinning (siri activity indicator). From what I have understand you can not change the image, but can't I use that image and create an animation with it rotating 360° and looping? Or will that drain the battery? something like this?: - (void)webViewDidStartLoad:(UIWebView *)webView { //set up animation [self.view addSubview:self.loadingImage]; //start animation } - (void)webViewDidFinishLoad

Cant Get the activity indicator to show on iPhone app

别来无恙 提交于 2019-12-30 14:54:43
问题 I have a view which is created in IB. inside it I have a scroll view created programmatically. Within the scroll view I connect to a web service and fetch the content and the image. I want to show an activity indicator while doing this. So I have: - (void)viewDidLoad { [super viewDidLoad]; activityIndicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; activityIndicator.frame = CGRectMake(0.0, 0.0, 40.0, 40.0); activityIndicator.center =

Center a UIActivityIndicatorView for a UITableViewController in the window, not in the table view

痴心易碎 提交于 2019-12-25 09:09:37
问题 I have a UIActivityIndicatorView to my table view in the interface designer. I am trying to center it in the middle of the screens using the following: override func viewWillLayoutSubviews() { self.activityView.center = self.view.center } But it always seems to be sitting too 'low' on the page, it appears to be centered in the middle of the UITableView, not in the middle of the window like I want (ie. It is getting pushed down by the navigation bar etc) 回答1: The solution was to set the

Activity Indicator above Button prevents Click Recognition

帅比萌擦擦* 提交于 2019-12-23 17:51:05
问题 I have an UIButton " bn " and an UIActivityIndicator " ai " which is above the button ( ai.center = bn.center ). As long as ai is visible and animating, I can't press the Button underneath ai's frame but out of the range I can. Do I have to add GestureRecognition to ai or is there a smarter way to click on the " ai ". Kind regards. $h@rky 回答1: Can you simply set ai.userInteractionEnabled = NO; ? I'm surprised it is enabled anyway, on an activity indicator - is this a standard component or

sendAsynchronousRequest makes UI freezes

限于喜欢 提交于 2019-12-23 10:17:25
问题 downloadImages is a button and whenever I press on it, a spinner should start rolling, an async request should ping Google (to make sure there is a connection) and after a response is received, I start to synchronically downloading images. Somehow the spinner won't go and it seems as if the request is sync and not async. - (IBAction)downloadImages:(id)sender { NSString *ping=@"http://www.google.com/"; GlobalVars *globals = [GlobalVars sharedInstance]; [self startSpinner:@"Please Wait."];

How to put activityindicator middle of a tableview

混江龙づ霸主 提交于 2019-12-23 10:17:02
问题 I have put activity indicator spinner.center = CGPointMake( [UIScreen mainScreen].bounds.size.width/2,[UIScreen mainScreen].bounds.size.height/2); [self.view addSubview:spinner]; But this is not properly centered in the table view. Because table view can scroll. How can i put a spinner in the center of the screen. 回答1: try with bellow code:- spinner.center = CGPointMake( [UIScreen mainScreen].bounds.size.width/2,[UIScreen mainScreen].bounds.size.height/2); yourAppdelegateClass *appDelegate =

View does not appear because of iOS 7

对着背影说爱祢 提交于 2019-12-22 18:04:13
问题 I tried my app on my iPhone with iOS 7 and everything works perfectly except one thing. On iOS 6 versions, when I executed the following code, the loading view (with the activityindicator) appeared and disappeared at the end of the loading. On iOS 7, the view does not appear at all during the loading. self.loadingView.alpha = 1.0; [self performSelector:@selector(accessServices) withObject:nil afterDelay:0.0f]; AccessServices method : - (void)accessServices { // Getting JSON stuff // The code

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

做~自己de王妃 提交于 2019-12-21 07:12:27
问题 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