0
我想將以下控件添加到viewcontroller內的UIView。該控件似乎沒有出現在視圖內部。不能將dznsegmentedcontrol添加到UIView
https://www.cocoacontrols.com/controls/dznsegmentedcontrol
NSArray *items = @[@"Kicks", @"Re-kicks", @"Interested"];
DZNSegmentedControl *control = [[DZNSegmentedControl alloc] initWithItems:items];
control.tintColor = [UIColor blueColor];
control.delegate = self;
control.selectedSegmentIndex = 2;
[control addTarget:self action:@selector(selectedSegment:) forControlEvents:UIControlEventValueChanged];
[cell.segmentView addSubview:control];
「這似乎並不奏效」不是一個問題。請說出你的期望和實際發生的情況。 – matt