546 questions
-3 votes
1 answer
82 views
Show cameraView from subView
This question is about displaying a camera view in a subview as opposed to the main self.view. According to AI, it should be possible to display it in a subview as long as the subview is in the view ...
0 votes
1 answer
89 views
Subview on UIButton always appears behind the label and image
I have a label which is supposed to be a badge for unread notifications count, but since refactoring to use UIButton.Configuration the label always gets rendered behind the button label and image, no ...
-1 votes
1 answer
139 views
Setup the constrains between the UIView and UIViewController
I want to add view controller as subview inside the UIView . I have given the required constrains but I am not figure it out why it overlapping . Here is minimal code for it. I have given the top , ...
0 votes
2 answers
127 views
Adding two UIView vertically
I have two UIView and I want to add detailsView as subview with other view. I am getting following error: Cannot convert value of type 'MovieDetailsDisplayViewController.detailsView.Type' to expected ...
1 vote
1 answer
129 views
Adding two view controller content into single view
I am trying add two view controller content into single view. Here How I am trying to do it . First create one single view controller and then add the require view into private function then call into ...
0 votes
1 answer
639 views
Adding SwiftUI View to UIKit two UIViews VIA addSubView. One is adding but second is not [duplicate]
I am adding SwiftUI View 'TestView' to contentView1 and contentView2. But it is adding to contentView2 only. anyone please help me understand that why SwiftUI View isn't adding to contentView1. I have ...
0 votes
1 answer
551 views
UIView which is added as subview in UIWindow is not visible in the presented view controller
I'm showing a UIView as subview in all view controllers using below function. func showSubViewInAllScreens() { let mySubView = MySubView() guard let window = UIApplication.shared.windows....
0 votes
1 answer
495 views
How to put UIView inside UIScrollView in Swift?
I am trying to add a UIView into a UIScrollView without storyboard. I made some code with the given two files(CalcTypeView.siwft and CalcTypeViewController.swift) as below. However, as shown in the ...
0 votes
2 answers
1k views
swift Stack insertSubview & auto refresh layout problem
I would like to click and add subview at: index 3 position. But the constraint not update automatically. how can i refresh the layout when adding subview to uistack? Thank you for your help very much @...
0 votes
0 answers
69 views
Causing a subview to scroll with its superview
Had to cover a subclass of PDFView with an NSView to draw lines and texts, as PDFPage or PDFAnnotation don't seem to work at all. Successfully added the subview, showed a random text, but the problem ...
0 votes
1 answer
2k views
Adding subviews programmatically in presented view controller
Problem Subview added programmatically to containerView ( UIView, which is connected with @IBOutlet on storyboard ) inside presented HistogramViewController (ViewController) is out of proper layout. ...
0 votes
1 answer
75 views
How to hide NavigationBar from sub view?
I am facing an issue of NavigationBar, I dont want it in subview (child view), I also used setNavigationBarHidden() method to hide but it is not working. class VehicleSavingPopupViewController: ...
1 vote
0 answers
140 views
UIButton extension addSubview not working
Trying to make a UIButton that when long pressed, exposes four subviews (UIButtons - north, east, south & west) that user can then slide finger to and lift for 4 separate actions. extension ...
0 votes
2 answers
466 views
Subview UIImage disappears on UIImageView
I have a UIImageView which has another added UIImageView on top as subview, seen below: self.imageView.image = UIImage(named: "original_image.png") let demoStampImage = UIImage(named: "...
0 votes
1 answer
82 views
How can I add a UISwitch to a specific UIScrollView?
how can I add a UISwitch to a specific UIScrollView? As I guess it can be done with a tag, but I am having difficulties. EDIT: The problem was solved in the usual way, lol My example code with ...