uitextview

Blur UITextView's text

自古美人都是妖i 提交于 2020-11-29 19:22:03
问题 I'm using VisualEffectView GitHub library to blur the text of UItextView but I want to blur text, not the whole view. As you see in the image when applying an effect, we are able to see the edges of the view. Can anyone help me out with how to achieve this by using the VisualEffectView library or any other techniques? Any help would be appreciated. Code: var visualEffectViewDescription = VisualEffectView() visualEffectViewDescription.frame = self.descriptionOfWorkout.bounds

Setting becomeFirstResponder on viewController nested in PageViewController

你离开我真会死。 提交于 2020-06-28 06:22:15
问题 I have a pageViewController that has two child view controllers that you can swipe between. One of them has a textView that I want to be the first responder when you scroll onto that page, then lose focus when you scroll away. Right now I have this: override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) composeTextView.delegate = self composeTextView.becomeFirstResponder() } The keyboard shows up as soon as you start to scroll onto the view. But as soon as the