0
我在這個事件中嘗試過,我需要滾動事件,也需要按鈕單擊事件。在這裏我使用了多個uiview,並且我放置了按鈕(需要動作滾動和按鈕動作)任何一個都可以給出解決方案?啓用分頁功能的UIScrollView?
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
if ([self pointInside:point withEvent:event]) {
return _scrollView;
}
return nil;
}
在該上述代碼滾動動作發生,但按鈕動作沒有發生。
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
if ([self pointInside:point withEvent:event]) {
return nil;
}
return nil;
}
在該上述代碼按鈕動作時發生,但滾動正在發生僅限於其視圖和不能能滾動其他scrollviews。
我已經在視點與右和左視圖展示中心在邊框同樣的觀點需要的UIView重量230 .incX + = 320; –
編輯我的答案,其過於簡單,只是根據您的使用設置滾動視圖的框架和incX的,它會工作正常。 – superGokuN