I have a textfield on UIScrollview
.
When the user taps outside of UITextfield
, I use UIScrollViewKeyboardDismissModeInteractive
to dismiss the keyboard. But it is not dismissing the keyboard.
What is wrong with my code?
m_scrollProfile = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 300, 300)];
m_scrollProfile.backgroundColor = kBGWhiteColor;
m_scrollProfile.userInteractionEnabled = YES;
[self.m_bgImageView addSubview:m_scrollProfile];
m_scrollProfile.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;