この質問はよく聞かれることを知っています。私はそれについてたくさん読んだことがありますが、まだうまくいきません。FirstClass と SecondClass の 2 つのクラスがあるとします。FirstClass にはラベルがあり、SecondClass はそのラベルのテキストを取得したいと考えています。これが私がやったことです:
//FirstClass
@interface FirstClass : UIViewController
{
@public
    UILabel *theLabel;
}
@property (strong, nonatomic) UILabel *theLabel;
@implementation FirstClass
@synthesize theLabel;
//SecondClass
#import "MainGameDisplay.h"
@interface SecondClass : UIViewController
{
    MainGameDisplay *mainGame;
}
@property (strong, nonatomic) UILabel *theSecondLabel;
@implementation SecondClass
-(void) thisMethodIsCalled {
    mainGame = [[FirstClass alloc] init];
    self.theSecondLabel.text = mainGame.theLabel.text;
    NSLog(@"%@",mainGame.theLabel.text); //Output is '(Null)'
}
theLabel.Text は毎秒変更されているため nil ではなく、SecondClass ビューが読み込まれている間、バックグラウンドで実行されている他のコントローラーにもラベルが表示されます。私が完全に間違っている場合は、誰かが書き込み方向を教えてください。または、これがどのように行われるかについての例を示してください。ありがとうございました。
編集:
@Implementation FirstClass
@synthesize theLabel;
- (void)viewDidLoad {
    [self superview];
    [self startTickCount];
}
-(void) startTickCount {
            timer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(timeChanger) userInfo:nil repeats:YES];
}
-(void) timeChanger {
        theDay++;
        NSLog(@"%@",self.theLabel.text);
        if (theDay <= 9)
            self.theLabel.text = [NSString stringWithFormat: @"0%i", theDay];
        else
            self.theLabel.text = [NSString stringWithFormat: @"%i", theDay];
        if (theDay > 27)
            [self monthChanger];
}
それだけです。NSLog は期待どおりに日を出力します。