开发者

how can i access a value on a cell in tableview from different class?

开发者 https://www.devze.com 2022-12-25 17:43 出处:网络
I can hold the value of touched cell but I cannot pass that value to another class or call from that class.

I can hold the value of touched cell but I cannot pass that value to another class or call from that class.

SearchTableViewController.m

**deneme= [[NSMutableArray alloc]init];
deneme=[tableData objectAtIndex:indexPath.row];

NSLog(@"my row = %@", deneme); //I can hold one of the selected or touched rows in table

HistoryTableViewController.m

**SearchTableViewController *obj 开发者_高级运维= (SearchTableViewController *)[self.tabBarController.viewControllers objectAtIndex:11];
NSLog(@"my 2nd row= %@", [obj deneme]); //It doesn't retrieve here


I solved that problem estimately few weeks ago. I identified AppDelegate *appdelegate vs vs thing and I call it with writing appdelegate.anything from different ViewController classes.

It was just a piece of cake that I could not recognize for a while .. :(

0

精彩评论

暂无评论...
验证码 换一张
取 消