Questions tagged [subviews]

Use this tag for questions related to extracting/manipulating/removing subviews. Subviews are parts of the hierarchy of a view, like the UIView iOS class.

subviews means the views which are holding/added over a 'View'.

as stated in ( iOS ) What is superview and what is subviews

Users use this tag for questions regarding listing/extracting all the subviews of a View, removing/deleting subviews of a View, altering/disabling the functionality of a subview of a View, reordering the subviews of a View, etc. .

182 questions
2
votes
1 answer

How do I move UIView to front of ViewController Swift 3?

I am trying to build a sign up page with the option to use phone or email. In order to be able to send it to the server all of my views have to be in one view controller. So I am trying to figure out how I can move one view to the front of the…
Seti
  • 21
  • 1
2
votes
3 answers

UIScrollView with horizontal paging using UIView as Subviews

I have seen answers for this following question. I am new to swift programming and I am trying to implement a similar feature. I just wondered if you had any guidance on how to achieve this in swift 3 Xcode 8. I have been searching around for a…
user8263946
  • 31
  • 1
  • 1
  • 4
2
votes
2 answers

iOS: Programmatically calling Container View

Before the Main View Controller is called, through a delegate I'll notify Main View Controller whether to call TVC1 or TVC2 in Container View. Question: How can I programmatically tell the Container View in Main View Controller to call TVC1 or…
user1107173
  • 10,334
  • 16
  • 72
  • 117
2
votes
1 answer

Subview will not become first responder

In my view controller I have initialized a new UIView Subclass called HypnosisView and added it to the root view of the ViewController. And in viewDidLoad I set the view to become the first responder like so: - (void)viewDidLoad { [super…
Nearpoint
  • 7,202
  • 13
  • 46
  • 74
2
votes
3 answers

UIScrollView is not scrolling the content of another subview

Hi everyone. I dragged a UIScrollView to my storyboard, then I added a UIView on top of that UIScrollView. This UIView loads another subview dynamically depending on what the server throws to this app. The problem is the UIScrollView is not…
2
votes
0 answers

I'm trying to add a subview with a button to the window view, but the button on the subview is sending a deallocated instance

I'm trying to create an custom alert-like view that is to display while data is loading, I've also got a cancel button on it in-case the loading takes too long. I'm creating it in a ViewController and adding it as a subview to the window (not View…
2
votes
0 answers

What is the best practice to auto resize the "ContentSize" of an UIScrollView?

I have to display a few views in a UIScrollView and I want it to fit the subviews. Are there any methods that could help me? It doesn't seem hard for a UIView to resize itself according to its children but I can't find any method do such a thing. I…
2
votes
1 answer

MPMoviePlayerController: Adding Subviews behind the control elements

I add subviews to my MPMoviePlayerController depending on the current playback time to realize an interactive video. At this point everything is working fine, except one thing: The control elements of the MPMoviePlayerController appear under my…
2
votes
3 answers

Resize custom UITableViewCell and its Subviews

I have created Custom UITableViewCell using XIB file and got it working in UITableView. I have designed custom cell and it's subviews in portrait sizes but when I rotate device in landscap mode I want to resize cell and it's subviews. I have written…
Paresh Masani
  • 7,474
  • 12
  • 73
  • 139
2
votes
1 answer

Multiple UIView's overlapping

I am creating multiple custom UIView's in a custom UIView. The creation of the custom sub-views is ok. They look like this: The draw method is quite straightforward: [[UIColor brownColor] set]; CGContextRef ctx =…
Rui Peres
  • 25,741
  • 9
  • 87
  • 137
2
votes
3 answers

Why remove subview?

I realise if I remove subviews accordingly from my application, the memory management seems better ( I have a lot of subviews inside my application). So my question is it is a must to remove all subviews that you have created or its optional (when…
1
vote
1 answer

adding subviews in awakeFromNib

Why does adding a subview in the awakeFromNib method cause it to go into a infinate loop? Where should subviews be added? thanks. - (void)awakeFromNib { outlineViewController = [[OutlineViewController alloc] initWithNibName:nil bundle:nil]; …
mfc
  • 3,018
  • 5
  • 31
  • 43
1
vote
2 answers

UITableViewCell from contentView subview

I have created the cells with labels and using checkaMarksAccessory. The few last cells have UITextFields which can user modifi, and those have selector on UIControlEventEditingDidEnd where i want change the state of the cell to checked. How can i…
kubo
  • 492
  • 7
  • 19
1
vote
1 answer

ARC - use strong or weak when adding a uiview as subview to another uiview

I am creating an ipad app where I add many UIImageviews over other UIViews and UIImageviews. I am not sure whether to use strong or weak while adding UIImageviews as subviews . I have created a project without ARC and now I am looking forward to…
user1085093
  • 507
  • 1
  • 5
  • 9
1
vote
3 answers

Adding and removing subviews in series

I am having difficulty managing the views in my app, and would appreciate anyone providing some clarification. In my mind, the program is structured as a hierarchy in the following manner. BNG_AppViewController:UIViewController -calls- …
GWTiger
  • 13
  • 4
1 2
3
12 13