I am newbie to Objective C. I want to pass the value of the text field from one screen to other screen and want to display it in 2nd screen.
Asked
Active
Viewed 1,935 times
1 Answers
3
Way 1:
- If its key data that is needed application wise store it in app delegate
Way 2:
- When you switch UI , you create new object of secondView's controller use setter getters to set it in second controller.
For example:
WelcomeView *welcome= [[WelcomeView alloc] initWithFrame: rect];
[welcome setParam:someParam];
[mainView addSubview: welcome];
-
thanks for the reply.But can u please elobrate as i m newbie to xcode so just not having much idea.I want to do it thought way 2 by using geter seter method – ios developer May 16 '11 at 12:56
-
check update. I am not sure about syntax at `setParam` please verify it – jmj May 16 '11 at 13:01