Problem with accessing variables/functions from subclass Objective C
        Posted  
        
            by Mitul Ruparelia
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mitul Ruparelia
        
        
        
        Published on 2010-01-10T13:56:40Z
        Indexed on 
            2010/04/01
            5:03 UTC
        
        
        Read the original article
        Hit count: 1013
        
Hi, I am having a problem with accessing public variable 'activity', which is a UIActivityIndicatorView type, see class declaration below in QuickStartViewController.h:
@interface QuickStartViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate> {
@public
IBOutlet UIActivityIndicatorView *activity;
}
@property (nonatomic, retain) UIActivityIndicatorView *activity;
@end
The function is called from another class:
#import "QuickStartViewController.h"
@interface NumberValidator : QuickStartViewController....
See below:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
[activity startAnimating];
NSLog(@"This function is called, but [activity startAnimating] still doesn't work...");
}
Note: [activity startAnimating] works fine when called within the QuickStartViewController class
Do you have any suggestions as to why [activity startAnimating] is not working?
© Stack Overflow or respective owner