1

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.

Paul R
  • 208,748
  • 37
  • 389
  • 560
ios developer
  • 3,363
  • 3
  • 51
  • 111

1 Answers1

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];
Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438
  • 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