Hi,
Make a property on your second view controller (FaceBookViewController) like this in the .h file :
@interface FaceBookViewController {
...
NSString *facebookTypeRequest;
...
}
@property (nonatomic, copy) NSString *facebookTypeRequest;
and in the .m file put
@implementation FaceBookViewController
@synthesize facebookTypeReqeust;
and remember to put in your dealloc method
- (void) dealloc {
[facebookTypeRequest release];
// release other properties here as well
[super dealloc];
}
Then, you can just set it like this :
self.FacebookTypeRequest = @"favoris";
FaceBookViewController *viewcontrol = [[FaceBookViewController alloc] initWithNibName:@"FaceBookViewController" bundle:nil];
viewcontrol.title = @"FaceBook";
viewcontrol.facebookTypeRequest = self.FacebookTypeRequest; //!< This is the line :)
[self.navigationController pushViewController:viewcontrol animated:YES];
[viewcontrol release];
Now, inside your FaceBookViewController you have the facebookTypeRequest.
Hope that helps.
NB It's generally bad practice to use captial letters to start the name of a property i.e. self.FaceboookTypeReqeust should really be self.facebookTypeRequest.