Re: [問題] Custom UIImagePickerController
※ 引述《s8911124 (-.-)》之銘言:
: 第一種:
: 直接把不需要接收touch事件的view
: view.userInteractionEnabled = NO;
: 第二種:
: 如果你的view有時候要接收touch有時候不接收,
: 你要在 pickerctl.view的 uiview class裡面覆寫
: //Returns the farthest descendant of the receiver in the view hierarchy
: (including itself) that contains a specified point.
: - (UIView *)hitTest:(CGPoint)point withEvent(UIEvent *)event
: {
: UIView *hitView = [super hitTest:point withEvent:event];
: //如果你覺得這個hitview要能回應 touch 的事件,就把它傳出去
: 否則就return nil, 系統會在往parent view送。
: }
魯蛇我簡化一下我想做到的功能:
1. A 是 B的 subview, 並且A 和 B的frame 完全一樣大小 ( A完全把B蓋住 )
2. A 需要對 touch 事件有反應, 並且 "同時" B也要有反應
在s8911124的第二種方式下, A 跟 B只能同時有一個有反應,
但是魯蛇我想要兩個"同時"都有反應
請問這樣可以做到嘛 ????
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.219.69.157
※ 編輯: sinread 來自: 61.219.69.157 (09/26 11:18)
推
09/26 19:19, , 1F
09/26 19:19, 1F
討論串 (同標題文章)
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章