Objective c 即使在ios 14中,分段控制也不工作或不触发任何

Objective c 即使在ios 14中,分段控制也不工作或不触发任何,objective-c,xcode,uisegmentedcontrol,Objective C,Xcode,Uisegmentedcontrol,我在objective C中编程创建了UISegment控件。它在ios 12-13.2中运行得非常好,在ios 14中突然停止工作。有人能告诉我ios 14中的Segment控件的工作原理吗 CGRect segmentCtrlFrame = CGRectMake(20, 20, [UIScreen mainScreen].bounds.size.width - 40, 30); UISegmentedControl *appUsageSegmentCtrl = [[UISe

我在objective C中编程创建了UISegment控件。它在ios 12-13.2中运行得非常好,在ios 14中突然停止工作。有人能告诉我ios 14中的Segment控件的工作原理吗

 CGRect segmentCtrlFrame = CGRectMake(20, 20, [UIScreen mainScreen].bounds.size.width - 40, 30);
        UISegmentedControl *appUsageSegmentCtrl = [[UISegmentedControl alloc]initWithItems:self.appUsageOptionsArray];
        appUsageSegmentCtrl.frame = segmentCtrlFrame;
        [appUsageSegmentCtrl setTintColor:SEGMENT_CONTROL_COLOR];
        [appUsageSegmentCtrl addTarget:self action:@selector(appUsageChanged:) forControlEvents:UIControlEventValueChanged];
        [cell addSubview:appUsageSegmentCtrl];
        cell.selectionStyle = UITableViewCellSeparatorStyleNone;
        appUsageSegmentCtrl.selectedSegmentIndex = self.selectedAppUsage;
        if (@available(iOS 13, *)) {
             [appUsageSegmentCtrl setSelectedSegmentTintColor:SEGMENT_CONTROL_COLOR];
        }
        [appUsageSegmentCtrl setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]} forState: UIControlStateSelected];
        

你能定义“不工作”吗?你具体经历了什么行为?分段控制?叫cell的家伙是什么?@Rob在ios 13-13.2中我可以更改分段并选择索引。但在ios 13.3及更高版本中,我们不能更改分段。我的意思是不能选择分段。@ElTomato单元格是tableview单元格。分段包含在table view cel中。