开发者

how to use value of local variable in another method?

- (void)viewDidLoad {


}

-(id)initwithinfo2:(NSInteger)pass_wordID2
{
    NSLog(@"pass_wordID:%d",pass_wordID2);


}

I want to use pass开发者_运维技巧_wordID2 in viewDidLoad. How ?


Make an Instance Varibale in the *.h file. Than do it like this in initWithInfo2:

yourInstanceVariable = pass_wordID2;

Than you can use yourInstanceVariable in viewDidLoad. ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜