there is two views first one have a button i want to show the tiltle of the button on the second view ?how can i do it?
A:
one way is to store it in application delegate's variable. I don;t know whether it belongs to best practices or not.
or you can create a object of second view from first while adding it as a subview and can set variable in second view's variable.
like
if(self.view2ViewController == nil) {
View2ViewController *view2 = [[View2ViewController alloc] initWithNibName:@”View2″ bundle:[NSBundle mainBundle]];
view2.passedString = self.myName;
self.view2ViewController = view2;
[view2 release];
}
org.life.java
2010-08-07 14:21:20
A:
you can make object of second view and can pass string to it
view2object.view2string=@"anything" or label.text;
pankaj kainthla
2010-09-07 07:22:15