How to correctly subclass UIControl?

后端 未结 7 529
北海茫月
北海茫月 2020-12-04 09:26

I don\'t want UIButton or anything like that. I want to subclass UIControl directly and make my own, very special control.

But for some rea

相关标签:
7条回答
  • 2020-12-04 09:59

    I was having trouble with a UIControl not responding to beginTrackingWithTouch and continueTrackingWithTouch.

    I found my problem was when I did initWithFrame:CGRectMake() I made the frame to small (the area that reacts) and had only a couple point spot where it did work. I made the frame the same size as the control and then anytime I pressed on anywhere in the control it responded.

    0 讨论(0)
提交回复
热议问题