문제

I have a UISegmentedControl in an XIB file. I have placed it within a UIBarButtonItem, which in turn is placed inside a UIToolBar. The problem I am having is that the UISegmentedControl is not responding to touches even though I have connected to an IBAction method. Any idea what might be the problem?

도움이 되었습니까?

해결책

I would check the following items:

  1. Right click the element to make sure the IBAction connected
  2. Make you don't have heavy operations on the main thread that may be causing the view to lag
  3. Make you don't a clear view over the UISegmentedControl

다른 팁

Make certain that ".userInteractionEnabled" on your segmented control is set to "YES".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top