添加一個點擊手勢?
然后 執(zhí)行下面的代碼
self.menuView 就是彈出試圖的白色view 這了改成自己的view?
/* 響應(yīng)空白處事件 */
-(void)HomeMenuPopViewTapAction:(UITapGestureRecognizer *)tap{
? ? CGPoint point = [tap locationInView:self.menuView];
? ? point = [self.menuView.layer convertPoint:point ?fromLayer:self.layer];
? ? /* 判斷點擊的 點 是不是在白色view上 */
? ? if([self.menuView.layercontainsPoint:point]) {
? ? ? ? return;
? ? }else{
? ? ? ?//這里寫隱藏彈出試圖的方法
? ? }
}