So I have an NSArray
"myArray" with NSNumber
s and NSString
s. I need them in another UIView
so i go like this:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
DetailViewController *details = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
details.subjectText = [[myArray objectAtIndex:indexPath.row] objectForKey:@"subject"];
The subjectText works. But how can I get the NSNumber
s out of it? (I actually need them as strings...) I would convert a NSString
out of a NSNumber
like this: NSString *blah = [NSNumber intValue]
. But I don't know how to set it up in the code above...
ベストアンサー1
Try:
NSString *myString = [NSNumber stringValue];