tags:

views:

39

answers:

3

how to get objects values from uiviewcontroller classes iphone.

I am using this

SecondViewController *newObject=[[SecondViewController alloc]init];

But newobject has textview , its value is zero. How could i access that textview iphone.

A: 

you have to make the textview as a property to be able to access it outside.

CiNN
A: 

Looks like the initialization process is incorrect: If you use NIB file for you view then you should use

- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle

to initialize your controller. If you create your view programmatically, you must override controller's -loadView method. (see UIViewController reference for details)

Edit: Make sure that your textview is connected to some controller's outlet in the nib file.

Vladimir
Nice mind reading.
Jordan
A: 

I am also tried this,

SecondView *newObject=[[SecondView alloc]initWithNibName:@"second" bundle:[NSBundle mainBundle]];

But nothing works.