How to use the variable declared in one class in another class in Obj C.

Posted by srikanth rongali on Stack Overflow See other posts from Stack Overflow or by srikanth rongali
Published on 2010-03-19T06:15:10Z Indexed on 2010/03/19 6:21 UTC
Read the original article Hit count: 203

I have a NSDate *date1 in class1 implementation file(I initialized it as Global variable). I have NSDate *date2 in class 2 implementation file (initialized it as Global variable). I need to calculate the NSTimeInterval between the two dates in class 2. But I could not do it. I could not access date1 in this class. It is giving error as (date2 undeclared). Please give me help in how to call other class variables in this class.

Thank you.

© Stack Overflow or respective owner

Related posts about cocoa-touch

Related posts about cocos2d-iphone