Questions tagged [isuserinteractionenabled]
15 questions
2
votes
0 answers
How to connect label and tap gesture?
I made a label and used tapgesturerecogniser to make it work on tap. But when I click on the label, it does not work, however label is being displayed just fine. I am adding them in a scrollview.
Below is my…

vgvishesh23113
- 309
- 3
- 12
2
votes
1 answer
iOS Swift 4: UIView in UIScrollView
I have a UIImageView with a tap gesture recognizer as a subview of a UIScrollView.
A.) If the UIImageView isUserInteractionEnabled=false the scroll view works fine (pinch zoom, scroll) but doesn't recognize the tap gesture on the image.
B.) If…

Dávid Mohácsi
- 21
- 2
1
vote
1 answer
navigationController?.navigationBar.isUserInteractionEnabled not working as expected
For the following viewController hierarchy, isUserInteractionEnabled doesn't appear to be working as expected.
NavigationController(ViewController A) --- pushes to ---> NavigationController(ViewController B)
In ViewController A's viewDidAppear…

aak
- 67
- 6
1
vote
0 answers
return tableView didSelectRowAt while cell's content view user interaction is enabled
I have made a custom xib UITableViewCell with a UIButton inside. The contentView within the cell has, and must have .isUserInteractionEnabled = True. The problem I am facing is that when using
func tableView(_ tableView: UITableView, didSelectRowAt…

dre_84w934
- 678
- 8
- 27
1
vote
1 answer
SpriteKit isUserInteractionEnabled=false Blocks Touches
I am building a SpriteKit game. The game scene is the parent of a transparent layer above it whose role is to display occasional messages to the player. I want this layer to be transparent and inert most of the time, and of course, never receive…

zeeple
- 5,509
- 12
- 43
- 71
0
votes
1 answer
Failed to disable UserInteraction on UIView added on UIWindow
So here is the problem. I have created a custom loader which shows a basic "loading" text in the middle with dimmed background. The HUD shows just fine but despite of setting isUserInteractionEnabled to false I still can click on the UI where I have…

Poles
- 3,585
- 9
- 43
- 91
0
votes
0 answers
Prevent User interactions only on UIView and not on Subviews - Swift - Programmatically
I have a UIView subclass that I created in this way:
class UpperView : UIView{
var currentColor : UIColor = .white
private var lineArray: [[CGPoint]] = [[CGPoint]]()
override func touchesBegan(_ touches: Set, with event: UIEvent?) {
…

StackGU
- 868
- 9
- 22
0
votes
1 answer
Why doesn't my UILabel in a nested view receive touch events / How can I test the Responder Chain?
I have found lots of similar questions about not receiving touch events and I understand that in some cases, writing a custom hitTest function may be required - but I also read that the responder chain will traverse views and viewControllers that…

Jim
- 55
- 1
- 7
0
votes
1 answer
swift isUserInteractionEnabled = false not working inside UITapGestureRecognizer
I have a problem where I have a UIScrollView and a Header (UIView) inside my main View and my Header is over my UIScrollView as such:
UIView.
|
|- UIScrollView.
|
|- Header. (UIView)
I want my header to be able to detect taps on it, but I also want…

ERP
- 325
- 2
- 11
0
votes
1 answer
using a func resign first responder from a array of textviews
My code uses the didTapAdd func to add a endless amount of textviews to a view controller. The problem is I cant move it because it is a textview. This would work perfectly if it was a label or imageview. Somehow I want to do something like a on off…
user12418101
0
votes
0 answers
UIGestureRecognizer is not working, even though i enable isUserInteractionEnabled
lazy var profileImageView: UIImageView = {
let imageView = UIImageView()
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.image = UIImage(named: "1")
imageView.contentMode = .scaleAspectFill
…

Frank Ding
- 11
- 1
- 2
0
votes
1 answer
Swift: Last cell in tableView gets userInteraction disabled when it shouldn't
I have a tableview with two sections and I want the user interaction of the textView inside the cells of the second section to be disabled (those are completed, users are not meant to be able to edit their text). And the code below from cellForRowAt…

CristianMoisei
- 2,071
- 2
- 22
- 28
0
votes
0 answers
Custom Subview added on TabBarController is not tappable
I have a custom view that I'm trying to add as a footer to my TabBarController, meaning resting right on top of the TabBar. I'm able to make the custom view show up, however, nothing on the custom view is tappable. It's like the custom view has…

Ovais Panjwani
- 11
- 2
0
votes
1 answer
UIImageView isUserInteractionEnabled = true doesn't work
The following DateField class has a date field and an icon on it. For some reason fieldIcon.isUserInteractionEnabled = true has zero affect and doesn't pass user tap to the field. Am I missing something?
import UIKit
import SnapKit
protocol…

thedp
- 8,350
- 16
- 53
- 95
0
votes
1 answer
How can I change isUserInteractionEnable in other CollectionView for all item with specific section?
How can I change isUserInteractionEnable in other CollectionView for all item with specific section?
Below is my code:
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
// avoids the double…

Sergio
- 13
- 3