我NSString
在 .h 文件中有一个声明。然后我在ViewDidload
. 在我的didSelectRowatIndex
事件中,想要将该值分配给先前 Viewcontroller 中的另一个字符串。
。H
`
NSString *strWifiId;
NSArray *arrstrWifiId;`
`
- (void)viewDidLoad {
arrstrWifiId=[arrWorkflow valueForKey:@"WFID"];
strWifiId=[NSString stringWithFormat:@"%@",[arrstrWifiId objectAtIndex:0] ];
}
`
`
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSArray *array = [self.navigationController viewControllers];
NSLog(@"navi array count ----- %d",[array count]);
UITableViewCell *selectedCell=[tableView cellForRowAtIndexPath:indexPath];
for (UIViewController* viewController in self.navigationController.viewControllers) {
if ([viewController isKindOfClass:[SendTimeChangeRequestViewController class]] ) {
SendTimeChangeRequestViewController *groupViewController = (SendTimeChangeRequestViewController*)viewController;
[groupViewController.btnwrkflwFirstApprove setTitle:selectedCell.textLabel.text forState:UIControlStateNormal];
groupViewController.pWorkFlowID=strWifiId;
NSLog(@"WFID---- %@",groupViewController.pWorkFlowID);
//NSLog(@"CELL TAG----- %@",groupViewController.pAuthEmployeeCode);
[self.navigationController popToViewController:groupViewController animated:YES];
}
}
`
这里NSLog
打印一些垃圾值。为什么那是 n 我该如何解决?
谢谢