scrollView 自己繼承 了 touch 的響應 事件,要重新自定義 scrollView 的 響應事件。ui
因此添加一個手勢事件:spa
-(void)addGestureRecognizer3d
{繼承
UITapGestureRecognizer * sigleTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleTapGesture)];事件
sigleTap.numberOfTapsRequired = 1;get
[myScrollView addGestureRecognizer:sigleTap];it
}io
-(void)handleTapGestureselect
{scroll
[myTextField resignFirstResponder];
}