Re: UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
Ah yes! I just used UITapGestureRecognizer and voila! It's working! Much 
cleaner this way.
Thanks!

-Carl


> On Oct 14, 2022, at 1:45 PM, Richard Somers  wrote:
> 
> Why not use a gesture recognizer with the UIActivityIndicatorView to send an 
> action to a target object?
> 
> Richard
> 
> 
>> On Oct 14, 2022, at 1:37 PM, Carl Hoefs via Cocoa-dev 
>>  wrote:
>> 
>> The idea just occurred to me to place a clear UIButton atop the spinner and 
>> have that send the action. That will work but just seems kinda hacky...
>> 
>>> On Oct 14, 2022, at 12:30 PM, Carl Hoefs via Cocoa-dev 
>>>  wrote:
>>> 
>>> Got an iPhone app enhancement request today to be able to tap the spinning 
>>> activity indicator (UIActivityIndicatorView) to pop up some info on the 
>>> status of the busy activity. 
>>> 
>>> UIActivityIndicatorView isn't like a UIButton which has sent actions, so is 
>>> there a way to do this? 
>>> 
>>> -Carl
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
The idea just occurred to me to place a clear UIButton atop the spinner and 
have that send the action. That will work but just seems kinda hacky...

> On Oct 14, 2022, at 12:30 PM, Carl Hoefs via Cocoa-dev 
>  wrote:
> 
> Got an iPhone app enhancement request today to be able to tap the spinning 
> activity indicator (UIActivityIndicatorView) to pop up some info on the 
> status of the busy activity. 
> 
> UIActivityIndicatorView isn't like a UIButton which has sent actions, so is 
> there a way to do this? 
> 
> -Carl
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
> 
> This email sent to newsli...@autonomy.caltech.edu

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
Got an iPhone app enhancement request today to be able to tap the spinning 
activity indicator (UIActivityIndicatorView) to pop up some info on the status 
of the busy activity. 

UIActivityIndicatorView isn't like a UIButton which has sent actions, so is 
there a way to do this? 

-Carl

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


[RESOLVED] Re: What's the right way to use UIActivityIndicatorView? After it's stopped

2015-01-27 Thread Aaron Lewis
Hi Gordon,

Thanks for the heading up. It worked.

On Mon, Jan 26, 2015 at 11:23 PM, Gordon Apple  wrote:
> You can stack views and controls however you like. I do it all the time. You
> need to pay attention to the list of views, not just the visuals in iB. Just
> use an outlet or binding to hide the ones you don’t want showing. Set the
> activity indicator to hide when not active. When you stop animation, unhide
> the other control.
>
>
> On 1/25/15 3:00 PM, "cocoa-dev-requ...@lists.apple.com"
>  wrote:
>
> I'm trying to show another UI Control when the stopAnimation method is
> called. But in xcode if I drag the UIActivityIndicatorView first, any other
> UI Control seems to be replacing it. Now it looked like I had to do create
> the other UI Control and add it manually when the animation is stopped. That
> is wrong right? What's the suggestion
>
>



-- 
Best Regards,
Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: What's the right way to use UIActivityIndicatorView? After it's stopped

2015-01-26 Thread Gordon Apple
You can stack views and controls however you like. I do it all the time. You
need to pay attention to the list of views, not just the visuals in iB. Just
use an outlet or binding to hide the ones you don¹t want showing. Set the
activity indicator to hide when not active. When you stop animation, unhide
the other control.


On 1/25/15 3:00 PM, "cocoa-dev-requ...@lists.apple.com"
 wrote:

> I'm trying to show another UI Control when the stopAnimation method is called.
> But in xcode if I drag the UIActivityIndicatorView first, any other UI Control
> seems to be replacing it. Now it looked like I had to do create the other UI
> Control and add it manually when the animation is stopped. That is wrong
> right? What's the suggestion


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

What's the right way to use UIActivityIndicatorView? After it's stopped

2015-01-25 Thread Aaron Lewis
Hi,

I'm trying to show another UI Control when the stopAnimation method is called.

But in xcode if I drag the UIActivityIndicatorView first, any other UI
Control seems to be replacing it.

Now it looked like I had to do create the other UI Control and add it
manually when the animation is stopped.

That is wrong right? What's the suggestion

-- 
Best Regards,
Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

UIActivityIndicatorView stops animating when table view cell moves

2013-04-19 Thread Rick Mann
I have a UIActivityIndicatorView in a UITableViewCell that's set up in a 
dynamic-content cell prototype in a storyboard.

It works fine, in that it's animating when displayed, unless the cell is 
removed and re-inserted. Then it stops animating (still shows).

I never actually tell it to stop. Any ideas?

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UIActivityIndicatorView

2013-01-15 Thread Luca Ciciriello
Understood, thanks.

Luca.

On Jan 15, 2013, at 4:31 PM, Uli Kusterer  wrote:

> On Jan 15, 2013, at 3:18 PM, Luca Ciciriello  
> wrote:
>> I use an activity indicator in order to show, in my UIViewController, a 
>> "work in progress" activity.
>> 
>> here my code 
>> 
>> - (void)myMethod
>> {
>>  [[self activityElab] setHidden:NO];
>>  [[self activityElab] startAnimating];
>> 
>>  // here I call a very CPU-intensive method. 
>> 
>>  [[self activityElab] setHidden:YES];
>>  [[self activityElab] stopAnimating];
>> }
>> 
>> My problem is that nothing appear (activity indicator) when myMethod is 
>> called. Now if I remove (comment) the call to my "intensive activity" method 
>> all is working fine.
>> 
>> Any idea? I've tested this code both on the simulator and on a device (iPad) 
>> with  iOS 5.0 and iOS 6.0
>> My environment is Xcode 4.5.2 on OS X 10.8.2.
> 
> 
> That won't work. Views are only redrawn once your method returns. So while 
> your activity indicator is shown and hidden, nobody will ever see it. If you 
> do activities that take a long time, you'd better split them up into smaller 
> NSOperations which let the main thread redraw the UI in between each 
> operation. Or if you have to, use a separate thread, but that's hard to get 
> right, and easy to get wrong in a way that causes random hard-to-find crashes.
> 
> Cheers,
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> http://www.zathras.de
> 
> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UIActivityIndicatorView

2013-01-15 Thread Uli Kusterer
On Jan 15, 2013, at 3:18 PM, Luca Ciciriello  
wrote:
> I use an activity indicator in order to show, in my UIViewController, a "work 
> in progress" activity.
> 
> here my code 
> 
> - (void)myMethod
> {
>   [[self activityElab] setHidden:NO];
>   [[self activityElab] startAnimating];
> 
>   // here I call a very CPU-intensive method. 
> 
>   [[self activityElab] setHidden:YES];
>   [[self activityElab] stopAnimating];
> }
> 
> My problem is that nothing appear (activity indicator) when myMethod is 
> called. Now if I remove (comment) the call to my "intensive activity" method 
> all is working fine.
> 
> Any idea? I've tested this code both on the simulator and on a device (iPad) 
> with  iOS 5.0 and iOS 6.0
> My environment is Xcode 4.5.2 on OS X 10.8.2.


 That won't work. Views are only redrawn once your method returns. So while 
your activity indicator is shown and hidden, nobody will ever see it. If you do 
activities that take a long time, you'd better split them up into smaller 
NSOperations which let the main thread redraw the UI in between each operation. 
Or if you have to, use a separate thread, but that's hard to get right, and 
easy to get wrong in a way that causes random hard-to-find crashes.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


UIActivityIndicatorView

2013-01-15 Thread Luca Ciciriello
Hi all.

I use an activity indicator in order to show, in my UIViewController, a "work 
in progress" activity.

here my code 

- (void)myMethod
{
[[self activityElab] setHidden:NO];
[[self activityElab] startAnimating];

// here I call a very CPU-intensive method. 

[[self activityElab] setHidden:YES];
[[self activityElab] stopAnimating];
}

My problem is that nothing appear (activity indicator) when myMethod is called. 
Now if I remove (comment) the call to my "intensive activity" method all is 
working fine.

Any idea? I've tested this code both on the simulator and on a device (iPad) 
with  iOS 5.0 and iOS 6.0
My environment is Xcode 4.5.2 on OS X 10.8.2.

Thanks in advance.

Luca.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Philip Vallone
Thanks. Works like a charm. 

Regards,

Phil

Sent from Phil's iPhone

On Apr 28, 2011, at 1:38 PM, Matt Neuburg  wrote:

> On Thu, 28 Apr 2011 06:26:17 -0400, Philip Vallone 
>  said:
>> Hi,
>> 
>> I have a UIViewController that can take a few seconds to load. The view 
>> searches an XML file and eventually displays the resuts.  I want to show a 
>> UIActivityIndicatorView while the view loads. Unfortunately they are on the 
>> same thread. How can I get the UIActivityIndicatorView to display befiore 
>> the view loads? With the below code, the UI freezes up (indicator never 
>> shows) until the search is done.
>> 
>> [self.activityIndicator startAnimating];   
>> 
>> TitleSearchResultsViewController *controller = 
>> [[TitleSearchResultsViewController alloc] 
>> initWithNibName:@"TitleSearchResultsViewController" bundle:nil];
>> [controller setTitle:@"Search Results"];
> 
> Use delayed performance. Here's sample code from one of my own apps:
> 
> - (void)tableView:(UITableView *)tableView 
> didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
>[act startAnimating];
>// jump out using delayed performance, to give us a chance to start 
> animating the UIActivityIndicatorView
>[self performSelector:@selector(showItemsForRow:) withObject:indexPath 
> afterDelay:0.1];
> }
> 
> And then showItemsForRow inits the view controller and loads its view in the 
> usual way. m.
> 
> --
> matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
> A fool + a tool + an autorelease pool = cool!
> Programming iOS 4!
> http://www.apeth.net/matt/default.html#iosbook
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Matt Neuburg
On Thu, 28 Apr 2011 06:26:17 -0400, Philip Vallone  
said:
>Hi,
>
>I have a UIViewController that can take a few seconds to load. The view 
>searches an XML file and eventually displays the resuts.  I want to show a 
>UIActivityIndicatorView while the view loads. Unfortunately they are on the 
>same thread. How can I get the UIActivityIndicatorView to display befiore the 
>view loads? With the below code, the UI freezes up (indicator never shows) 
>until the search is done.
>
>[self.activityIndicator startAnimating];   
>
>TitleSearchResultsViewController *controller = 
>[[TitleSearchResultsViewController alloc] 
>initWithNibName:@"TitleSearchResultsViewController" bundle:nil];
>[controller setTitle:@"Search Results"];

Use delayed performance. Here's sample code from one of my own apps:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath 
*)indexPath {
[act startAnimating];
// jump out using delayed performance, to give us a chance to start 
animating the UIActivityIndicatorView
[self performSelector:@selector(showItemsForRow:) withObject:indexPath 
afterDelay:0.1];
}

And then showItemsForRow inits the view controller and loads its view in the 
usual way. m.

--
matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Alexander Spohr

Am 28.04.2011 um 12:26 schrieb Philip Vallone:

> Hi,
> 
> I have a UIViewController that can take a few seconds to load. The view 
> searches an XML file and eventually displays the resuts.  I want to show a 
> UIActivityIndicatorView while the view loads. Unfortunately they are on the 
> same thread. How can I get the UIActivityIndicatorView to display befiore the 
> view loads?

You can not. The display will wait for the end of the runloop.

> With the below code, the UI freezes up (indicator never shows) until the 
> search is done.

Your UI would still freeze, even if you could get the indicator on screen.

> [self.activityIndicator startAnimating];   
> 
> TitleSearchResultsViewController *controller = 
> [[TitleSearchResultsViewController alloc] 
> initWithNibName:@"TitleSearchResultsViewController" bundle:nil];
> [controller setTitle:@"Search Results"];

Your controller needs to to its work in another thread and signal the main 
thread if it is done.

atze


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Philip Vallone
Hi,

I have a UIViewController that can take a few seconds to load. The view 
searches an XML file and eventually displays the resuts.  I want to show a 
UIActivityIndicatorView while the view loads. Unfortunately they are on the 
same thread. How can I get the UIActivityIndicatorView to display befiore the 
view loads? With the below code, the UI freezes up (indicator never shows) 
until the search is done.

[self.activityIndicator startAnimating];   

TitleSearchResultsViewController *controller = 
[[TitleSearchResultsViewController alloc] 
initWithNibName:@"TitleSearchResultsViewController" bundle:nil];
[controller setTitle:@"Search Results"];


Thanks,

Phil





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com