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
  • 202,568
  • 34
  • 375
  • 539
ios developer
  • 3,263
  • 3
  • 48
  • 102

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
  • 232,312
  • 42
  • 391
  • 431
  • 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