i created a clock by SubClassing the NSView. now i want create many clocks programatically and pass the time zone value to each and every clock. how can i pass the desired timeZone value to the subClassed NSview.
Asked
Active
Viewed 151 times
1 Answers
0
Just create a variable in the .h of the class:
@property (nonatomic, strong) NSString *timeZone
And reference it where you create the clock:
myNewClock.timezone = "GMT"

Antonio MG
- 20,382
- 3
- 43
- 62
-
the property was not setting while the view was running but it accepts at the time of initiation of object – Muruganandham K Jul 16 '13 at 09:35
-
You need to set the property when you create the view – Antonio MG Jul 16 '13 at 09:36
-
i set property as `@property (nonatomic, strong) NSString *tZone;` in subclass header file – Muruganandham K Jul 16 '13 at 09:40
-
I dont understand your question, can you edit your main question and add the code? – Antonio MG Jul 16 '13 at 09:57