I want to know how to access an @IBOutlet declared in a class from another class
for example, I have a class named myfirstview
class MyFirstView: UIV
Its not the recommended way to call a IBOutlet from another class. If u want to call or access a IBOutlet then you should set it as property and then access it.
For example:
//ViewControler.h
#import
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UILabel *label;
@end
//abc.m
#import
#import
@interface abc
@end
@implementation abc
- (void)viewDidLoad
{
[super viewDidLoad];
ViewController *viewCOntroller= [ViewController alloc] init];
viewCOntroller.label.text = @"Hello";
}