我在scrollview中有我的標籤和文本框。當用戶在滾動視圖內滑動時關閉鍵盤
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];
tapGesture.numberOfTouchesRequired = 1;
tapGesture.cancelsTouchesInView = NO;
[scrollBill addGestureRecognizer:tapGesture];
我可以通過點擊滾動視圖來關閉鍵盤。但是,當用戶在滾動視圖上輕掃或輕敲時,如何關閉鍵盤?
它工作正常 – user3823935 2014-12-06 06:41:49
能時,有沒有UIScrollView中這樣做嗎? – Chucky 2017-01-25 16:12:01