Questions tagged [view-hierarchy]

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

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
30votes
0answers
7kviews

SwiftUI UITableView was told to layout its visible cells and other contents without in view hierarchy

I have a list in a view (lets call it view A) where I push a view B via NavigationLink from view A and manipulate the CurrentSubjectValue to the initial view A. The moment the data is added and the ...
user avatar
  • 1,178
7votes
0answers
2kviews

Child view controller should have parent view controller but actual parent is (UIViewControllerHierarchyInconsistency)

I have an app which has UITabbarController as the initial window(after logging-in i set it as rootViewController) This tabbarController has 4 different tabs in it which are all UIViewControllers ...
user avatar
  • 71
3votes
1answer
107views

viewWillAppear not called apparently due to my view hierarchy

This appears to be a well documented problem, yet the solutions online have not worked. Here's just a sample list of posts that failed to provide me with a working answer: ViewWillAppear not ...
user avatar
  • 2,767
3votes
0answers
653views

FrameLayout not respecting draw order

I've this layout hierarchy: <FrameLayout> <ScrollView>...</ScrollView> <LinearLayout>...</LinearLayout> <LinearLayout>...</LinearLayout> </...
user avatar
  • 11.2k
3votes
2answers
1kviews

SwiftUI - How to change hierarchical position of View?

Here's a basic example of what doesn't work: import SwiftUI struct Test : View { @State var swapped = false var body: some View { if swapped { Color.green } Color.blue....
user avatar
2votes
1answer
816views

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 ...
user avatar
  • 73
1vote
0answers
168views

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, ...
user avatar
  • 5,407
1vote
1answer
193views

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() ...
user avatar
1vote
0answers
456views

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 ...
user avatar
  • 1,631
1vote
0answers
444views

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 ...
user avatar
  • 24.2k
1vote
0answers
45views

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 ...
user avatar
  • 291
1vote
0answers
187views

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 ...
user avatar
  • 18.1k
1vote
0answers
670views

StackOverflowError because of too deep view-hierarchy in Android

we get in the Play Store some crash reports of this kind: java.lang.StackOverflowError at android.graphics.Paint.getTextRunAdvances(Paint.java:1753) at android.graphics.Paint.getTextRunAdvances(Paint....
user avatar
0votes
0answers
154views

TabView disconnects when rotating to Landscape due to SwiftUI's re-render of parent-Views

Using Swift5.3.2, iOS14.4.1, XCode12.4, As the following code shows, I am working with a quite complex TabView in Page-Mode in SwiftUI. i.e. using iOS14's new possibility to show Pages: .tabViewStyle(...
user avatar
  • 5,407
0votes
1answer
60views

Warning: Attempt to present ViewController on ViewController whose view is not in the window hierarchy (w/ UIAlertController)

I'm building a chat app where there are two types of views to be modally presented over the chat screen: a UIAlertController for users to select media to send, and a popover if the current user wants ...
user avatar
  • 11
0votes
3answers
85views

Component child selector with extended template

I want to create component with view hierarchy outside of Router and RouterModule Example: comp-parent.ts @Component({ selector: 'comp-parent', template: ` <p>parent works</p&...
user avatar
0votes
1answer
130views

NavigationController and View Hierarchy issue

I have 1 (rootViewController) view controller which is embedded in navigation controller. Then i pushed another view controller (secondViewController), which has search controller in title view. When ...
user avatar
0votes
0answers
176views

Presenting new view controller - View is not in the window hierarchy

I am receiving a warning: "Warning: Attempt to present on whose view is not in the window hierarchy!" I think I have a logic problem related to the presentation of the new view controller via a ...
user avatar
  • 361
0votes
0answers
489views

Xcode 9 Debug View Hierarchy extremely slow

Before Xcode 9, Debug View Hierarchy completely created a visual interactive representation of the UI in about two seconds. Now, in Xcode 9, it takes about 15 seconds. Is there any setting to make it ...
user avatar
0votes
1answer
224views

How to put layout between others layout in RelativeLayout?

I have a RelativeLayout. Inside it I have: An ImageView 120x120 dp in the right. 3 other layouts in the left: 1st layout (called Top) has alignParentTop=true 2nd layout (called Bottom) has ...
user avatar
  • 2,474
0votes
1answer
184views

How do I inspect the "Debug View Hierarchy" while iOS device is plugged?

I know that "Debug View Hierarchy" work on 32-bit Mac App Projects and it doesn't support every type of iOS Simulator. But I can use on some of iOS Simulator. Right now, I'm using ...
user avatar
0votes
0answers
110views

Why does my textField disappear?

I do some practice with iPhone4S about UITextField on iOS 7.1.2. Interface: The interface of the first version is simple, which just has a custom UITextField named MyUITextField and a UIButtom ...
user avatar
  • 1
0votes
2answers
65views

Detect a touch on a subview in a main controller

I have a main view controller class which contains a UIScrollView and a number of subviews like cards. Each card is an object and it is covered with a UIButton. I want to detect a tap on the UIButton ...
user avatar
-1votes
1answer
76views

Change Frame of Subview in Superview

I have a ViewController that adds an UIView, SpeciesImageView as a subview in viewDidLoad and set constraints in viewWillLayoutSubviews. SpeciesImageView does not have a nib file. When we create ...
user avatar
  • 1,712
-1votes
1answer
50views

How do I keep my navigation Bar and tableView separate as opposed to having my navBar on top of my tableView

I want it so that my navBar doesn't sit on top of my table view but instead is separate from it, so each tableView cell is displayed in equal proportions. As it is, I can't seem to change it, I have ...
user avatar