Questions tagged [view-hierarchy]

A view hierarchy defines the relationships of the views to one another.

A view hierarchy defines the relationships of the views to one another.

52 questions
2
votes
1 answer

Set autolayout constraints programmatically

I can't figure out how to fix this: I want to create a match game, where the size of the cards depends on the device. I thought I would create a contentView which I pinned to top and bottom of the rootView with a margin of 20 and alligned it to its…
2
votes
3 answers

What is the best practice: Multiple UIViews or Multiple UIViewControllers

I plan to develop an check list app that consists of multiple pages. Each page is going to display a list of simple Yes/No questions and a "Next" button at the bottom of the page. In terms of the app design I see two options One UIViewController…
David
  • 3,388
  • 2
  • 21
  • 25
2
votes
2 answers

android view hierarchy does not capture the custom view widget tree structure

I am trying to use DDMS hierarchy viewer to capture the virtual view hierarchy (tree structure of the custom view widget). This custom view widget is from android's sample code ApiDemos which has the accessibilityNodeProvider implemented. the thing…
2
votes
1 answer

Android: On touch event not received by parent view

I have a relative layout R1 as a custom view for an expandable list view. Now inside R1, i have one Image view I1 and another relative layout R2, both being siblings. I have set on click listeners for both R2 and I1. And all works fine. But i…
1
vote
0 answers

Xcode debug cannot capture view hierarchy on macbook M1

In one project, 'capture view hierarchy' and 'pause program execution' buttons are simply not working. 1 out of 20 times it's showing blank screen saying Unable to capture view hierarchy, but other times no response. Capturing memory graph button is…
hikmat_11
  • 87
  • 6
1
vote
0 answers

Simultaneous Gestures not working for a ZoomableScrollView in SwiftUI

Using Swift5.3.2, iOS14.4.1, Xcode12.4, I am trying to use the .simultaneousGesture modifier in SwiftUI. As far as I understood, this modifier should make sure that gestures (such as tap, longpress, magnification etc) should be able to co-exist…
iKK
  • 6,394
  • 10
  • 58
  • 131
1
vote
1 answer

How to find where UIView has been created in code - swift - Programmatically

If I see a UIView in Debug View Hierarchy and I don't know where it comes from, Is there a way to see where it has been programmatically created in code? This question describes and explains the reverse case (you have the code of the view and you…
StackGU
  • 868
  • 9
  • 22
1
vote
1 answer

Customizing UINavigationBar not working because of weird UINavigationBar view hierarchy

My app has many ViewControllers that are pushed on navigation stack. I have configured UINavigationBar appearance globally in AppDelegate as below. let appearance = UINavigationBar.appearance() appearance.barTintColor = myColor appearance.tintColor…
1
vote
0 answers

Access to UITransitionView's From UIWindow

In my application I have a UINavigationController, After authentication I run perform segue(Push replace) for navigating to UINavigationController, when app goes to background I present Authentication page again, I do this in a classed I named it…
Hamed
  • 1,678
  • 18
  • 30
1
vote
0 answers

Error obtaining UI hierarchy and Screen not available

I use Android Device Monitor to check my Android App view hierarchy. Run the app in android studio's device simulator. Open the Android Device Monitor. Then choose my App and Dump View Hierarchy for UI Automator, but I get this, I also try to…
LF00
  • 27,015
  • 29
  • 156
  • 295
1
vote
1 answer

Blank screen first time launching app xcode

I am having a little issue with logging into an app the first time with a blank screen and I am getting the warning "Attempt to present on whose view is not in the window hierarchy!" After I close and relaunch, the views appear fine. I believe it…
user3708224
  • 1,229
  • 4
  • 19
  • 37
1
vote
2 answers

How to get selected child in GridLayout similar to GridView

I want to achieve the following abilities: Select only one child View inside a GridLayout each time by long clicking it. A click on the GridLayout or any ancestor parent in the visual hierarchy will deselected selected child View if one already…
Eido95
  • 1,313
  • 1
  • 15
  • 29
1
vote
1 answer

Root VC being deallocated by a second modal

Recently I have developed a custom modal animation using the UIViewControllerTransitioningDelegate where the calling view controller should be visible after the transition, i.e. its modal is over context. The problem arises when the presented view…
Lucas Fonseca
  • 181
  • 2
  • 8
1
vote
0 answers

A view that can be moved and resized on android

I'm making an app that should allow users to dynamically put ImageViews into existence, move them where they please, resize them and mess around with the layer stacking of said views. The layer stacking I do have some rough idea of how to implement,…
Larpus
  • 301
  • 1
  • 3
  • 17
1
vote
0 answers

Android Fragments: restore programmatically added views

I have two fragments: fragmentA and fragmentB In fragmentA, some views have been programmatically added If from fragmentA I go to fragmentB and then I come back to fragmentA, all the programmatically added views are not there anymore Which is the…
Daniele B
  • 19,801
  • 29
  • 115
  • 173