Closed mriccasyncpoint closed 12 years ago
Hi, I'm not sure what you're asking for, a ODRefreshControlDelegate, which is not needed since it's a UIControl, or an enable property, which is already there, but since it's related to touch events, has no point?
If you want to disable it temporarily, you can simply remove the observer and hide it...
Maybe I'm being dense here, but how would I go about let's say
I've looked at your demos, etc and I tried using selectors and everything. Could you implement a function that is
+(void) totallyEndRefresh {
}
and then call [refreshControl totallyEndRefresh] from anywhere (I'm also using SVProgressHUD in my project and it's just that)? I'm new to Obj C, so please let me know.
[
Mhm, I'm not sure I understand what your trying to do, but this control is not similar to SVProgressHUD, because it's not used just to show there's a loading in progress, but to trigger the loading itself. It would make little sense to totally hide the control after the loading is done, since the user would not be able to trigger it anymore.
As for fetching and hiding, you do something like this:
I guess if you really wanted to hide it forever after the refresh, you could perform a selector / dispatch after 0.4 seconds, the duration of the hiding animation.
I guess this is exactly the error I am trying to solve: http://cl.ly/image/31453Y031m2D
I cannot call the refreshControl from any other method
That simply mean that you didn't save any reference to the refresh control anywhere. There are many ways you could do that, for example you can declare an instance variable in your @interface:
@interface MyViewController : UIViewController { ODRefreshControl *refreshControl; }
and use that variable instead of creating a new one when you alloc the control:
refreshControl = [[ODRefreshControl alloc] etc.....
Or, you could declare a property in your @interface
@property (nonatomic) ODRefreshControl *refreshControl;
synthesize it in you @implementation:
@implementation MyViewController @synthesize refreshControl
and use the property:
self.refreshControl = [[ODRefreshControl alloc] etc....
Thank you very much for helping me out Fabio!
Hi, can you add the delegate for enable/disable it??!