uicontainerview

Swift; delegate embedded view controller and parent

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 16:52:48
Sorry in advance that I can’t explain myself very well. I’m really new to programming and the topic of delegation still eludes me. I had some great help with this once before, but now I am trying to use a delegate in a different situation and I can’t get it right. I pieced together a bit of code that doesn’t work, and no matter how much I search I can’t find a way to fix it. I have a view controller (MainController) with and embedded view controller (EmbeddedController) in a container view. I am trying to have a button in the embedded controller manipulate the container view (containerView).

In a container view, a navigation controller's navigation bar not resizing to include status bar

不羁岁月 提交于 2019-12-05 16:13:33
I have created an application which needs to have a bar above the navigation bar and other views. To accomplish this, I am using a view controller with a view for the top bar, and then a container view for everything else. Sometimes, the top bar needs to be hidden. I'm using autolayout to hide the top bar (set its height to 0), and the container view expands to fill the screen (container top equal to the top bar bottom). The container view contains a navigation controller because I need a navigation bar below the top bar sometimes. When I start the app, this all works fine as shown below: As

Using container view as a Dashboard

北慕城南 提交于 2019-12-04 19:05:10
i have used container view on the right side and i used another view controller as a child view controller to this container view. i want to change the data appearing in that container view. FYI i m loading the EKEventViewController in that container view. So obviously the tableview contains the events from the calendar. I've seen many tutorials but i m unable to change the content in the container view. Any help is appreciated. here is some of the code i used. in contentVC since i use tableview, i wrote the code in didSelectRowAtIndexPath: method [self.view addSubView:containerView]; [self

ViewController as Overlay on MapView in Swift (like Google Maps Application User Interface)

一笑奈何 提交于 2019-12-04 17:14:32
I'm building a small app with Swift where I want to achieve following: - MapView with several Annotations - Click on one of the annotations shows some Details in an overlay that is moving in from the bottom and fill approx. half of the screen - The upper half of the display still shows the MapView. A click on the map closes the details Now I've read a lot about different possibilities. First I've tried using a ContainerView with something like this: @IBOutlet weak var detailsContainerYPosition: NSLayoutConstraint! func mapView(mapView: MKMapView!, didSelectAnnotationView view: MKAnnotationView

iOS 7: Custom container view controller with UINavigationController as a child view controller

倾然丶 夕夏残阳落幕 提交于 2019-12-04 12:50:00
I would like to write a custom full-screen container view controller with the intention of putting a UINavigationController in it as a child view controller. The view of the UINavigationController will fill up the view of the container view controller so that it looks like the UINavigationController is the root view controller. (One would want to do something like this to, say, create the sliding sidebar menu UI popularized by Facebook.) What I've done works EXCEPT there is a glitch when presenting another view controller that hides the status bar when the iPhone is in landscape orientation.

UIView vs Container View

此生再无相见时 提交于 2019-12-04 09:21:43
问题 So here is the problem I am trying to solve. In each viewController I am trying to insert ads and the actual control elements. I finished couple of tutorial on raywenderlinch.com to understand that how people professionally put ads in their app. They used UIViews to have two views under mainview of view controller. So I completely understood that one subview hold the ads and another is holding actual app contents. if Ad is loaded take up the screen or else let other view have all available

Access container view child properties swift

落爺英雄遲暮 提交于 2019-12-03 22:21:58
What I want to achieve: User presses the button in the ViewController then, the color of the button placed in the container view should change its color to red. How can I get access of the button placed in the container view, from the ViewController? Step by step: Name the segue between your view controller and container view controller. Add a property to your view controller which will contain the container view controller. In your view controller implement a method prepareForSegue(_:sender:) . In the method check if segue.identifier equals the identifier you specified in step 1. If true,

iOS: Container view - animate push transition when changing child view controllers

ぃ、小莉子 提交于 2019-12-03 16:34:24
Apple discusses how to have a container view controller transition between two child view controllers in this document . I would like to animate a simple push vertical slide up identical to UIModalTransitionStyleCoverVertical in UIModalTransitionStyle . However, transitionFromViewController only allows use of UIViewAnimationOptions , not transition styles. So how would one animate sliding a view up? It's odd that to transition between child view controllers you can't call a simple push method similar in UINavigationController to animate the transition. Load child view, set frame with origin.y

UITableView content overlaps Status Bar when UISearchBar is active

喜欢而已 提交于 2019-12-03 10:35:23
问题 I have a UITableViewController with a UISearchBar and UISearchDisplayController. That exists inside a Container View in a UIViewController which is in a UINavigationController. I made this image to help describe the structure: This is what it really looks like: When I tap the Search Bar, I have to hide the Nav Bar. Normally, this would happen on its own, but since my UITableViewController is inside a Container View, I have to handle that change myself. This is what it looks like then, note

Hide a view container with a button in the ViewContainer

邮差的信 提交于 2019-12-03 07:26:13
问题 I have a View . In this view, I have a Container View . And in the ContainerView I have a button. When I am touching the button of the ContainerView, I want the ContainerView become hidden. I want to do something like that : class ContainerView: UIViewController { @IBAction func closeContainerViewButton(sender: AnyObject) { //I try this : self.hidden = false //or this : self.setVisibility(self.INVISIBLE) } } Any idea how do it? 回答1: There are serval ways but here is the easiest one, not