Problem in inserting segmented control to header view

后端 未结 2 1093
庸人自扰
庸人自扰 2021-01-21 15:50

I\'m trying to add a UISegmentedControl in my tableview. I have two sections in my tableview and I want the segmented control to be placed in the 2nd section. In my implementati

2条回答
  •  庸人自扰
    2021-01-21 16:43

    Had you ever found the answer to this? I implemented virtually the same thing and it worked fine. My guess is that you have sized you control bigger than the bounds of the view.

    CGRectMake(0, 0, tableView.bounds.size.width+10, 20)
    

    I believe this will cause a control not to receive touch events in all cases.

提交回复
热议问题