0

これが私のコードです

NSInteger selectedRow = selectedStationPath.row;
            UITableViewCell *cellz = [tabView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:selectedRow inSection:0]];
            UIColor *color = [[UIColor alloc] initWithRed:0.0 green:0.5 blue:1.0 alpha:0.2];
            cellz.contentView.backgroundColor=color;
            NSLog([NSString stringWithFormat:@"%i",selectedRow]);

selectedStationPathはグローバルNSIndexPathです...代わりに数字を入れるselectedRowindexPathForRow機能します。NSLog はselectedRow正しく印刷されますが、 に入れるselectedRowindexPathForRow、NSLog が印刷しているにもかかわらず機能しませんselectedRow...

4

0 に答える 0