デリゲート クラスにゲッターとセッターを実装することで、これを実現できます。
デリゲート .h ファイル内
UIApplicationデリゲートを含める
@interface DevAppDelegate : NSObject <UIApplicationDelegate>
NSString * currentTitle;
- (void) setCurrentTitle:(NSString *) currentTitle;
- (NSString *) getCurrentTitle;
Delegate 実装クラス .m で
-(void) setCurrentLink:(NSString *) storydata{
currentLink = storydata;
}
-(NSString *) getCurrentLink{
if ( currentLink == nil ) {
currentLink = @"Display StoryLink";
}
return currentLink;
}
したがって、評価する変数は、文字列が必要なセッターメソッドとクラスによって現在のリンク文字列に設定されます。ゲッターメソッドを使用するだけです。