пусть для рассмотрения кода
one.h
#import "historyViewController.h"
int isItfsa;
one.m
-(IBAction)homeHistory:(id)sender{
isItfsa = 0;
historyViewController *hisVController = [[historyViewController alloc]initWithNibName:@"historyViewController" bundle:nil];
[self presentModalViewController:hisVController animated:YES];
[hisVController release];
}
Но когда я получаю, он печатает не // 0
, а во 2-м классе two.m
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
NSLog(@"isItfsa=%@",isItfsa); //isItfsa=null
}
это ноль печати, но почему?и как я могу передать значение из одного класса в другой класс с помощью метода.