Re: [問題] Custom UIImagePickerController

看板MacDev作者 (電腦真耗錢)時間11年前 (2013/09/26 11:17), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串5/8 (看更多)
※ 引述《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
答案是不行,AVFoundation 是唯一解。
09/26 19:19, 1F
文章代碼(AID): #1IGwTYug (MacDev)
討論串 (同標題文章)
文章代碼(AID): #1IGwTYug (MacDev)