uistoryboard

Linking child view controllers to a parent view controller within storyboard

落爺英雄遲暮 提交于 2019-11-27 03:58:36
问题 Can you associate child view controllers to a custom container view controller in Storyboard? I can link child view controllers to a tab view controller, and I can link one view controller to a navigation controller. What must I do to the container VC to accept child VCs? 回答1: As something of a combo of Caleb and Matt's answers, I did: -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"cpdc_check_embed"]) { self.checkVC = segue

Retrieve custom prototype cell height from storyboard?

拟墨画扇 提交于 2019-11-27 03:57:13
问题 When using "Dynamic Prototypes" for specifying UITableView content on the storyboard, there is a "Row Height" property that can be set to Custom. When instantiating cells, this custom row height is not taken into account. This makes sense, since which prototype cell I use is decided by my application code at the time when the cell is to be instantiated. To instantiate all cells when calculating layout would introduce a performance penalty, so I understand why that cannot be done. The question

Prototype Cells in a nib instead of a storyboard

試著忘記壹切 提交于 2019-11-27 02:53:53
For better re-usability I want to create a table view outside of my Storyboard. Now when I create a UITableView based ViewController with Nib in Xcode I get the default TableView in the nib file. However, I am not able in Interface Builder to add prototype cells like I am in my Storyboard. Is it currently not possible to add prototype cells in a nib or am I missing something. Thanks very much for any help. iOS 5 includes a new method on UITableView: registerNib:forCellReuseIdentifier: To use it, put a UITableViewCell in a nib. It has to be the only root object in the nib. You can register the

iOS 7 | Navigation bar / Toolbar buttons very close to status bar

一个人想着一个人 提交于 2019-11-27 02:46:14
I have a problem when dragging a navigation bar or toolbar (storyboard) to my view controller. UINavigationBar: As you can see in the image above, the right button is almost overlapping the status bar. With a UIToolbar it happens the same: This view controllers are intended to be used as a Modal, that's the reason I'm not using a UINavigationController. In another section I use a UINavigationController and it appears as I expect: How can I drag a UINavigationBar / UIToolbar to a view controller without overlapping the status bar? The navigation bars or toolbars have to be at (0, viewController

storyboard instantiateViewControllerWithIdentifier not setting IBOutlets

﹥>﹥吖頭↗ 提交于 2019-11-27 01:45:34
问题 I am using storyboard instantiateViewControllerWithIdentifier: and I'm noticing that all the IBOutlets I have wired up are still nil. However, the IBActions I have wired up work. The view and controller are linked (i.e controller.view is not nil), and if I show the view it displays what I am expecting. What am I missing? Here's my setup: I've got a View Controller defined in my storyboard. I have given it an identifier which is the same identifier I use when invoking

Storyboards and custom container view controllers

十年热恋 提交于 2019-11-27 01:37:12
问题 I'm creating a custom container view as per the apple spec. I would like to use the storyboard to connect three static child UIViewControllers. Is there an easy way in the storyboard to connect via a Relationship as seen for the UINavigationController in the storyboard? Based on my research, it seems like this isn't possible. 回答1: It IS possible to link a container view controller to a child. In fact, it's trivially easy to do so. You bring up the Object library, type "Container" into the

Pop the current view using Segues/Storyboard on iOS 5

回眸只為那壹抹淺笑 提交于 2019-11-27 01:08:16
问题 I am creating an app using iOS 5 SDK. I managed to push views using the Storyboard's Segues, but I cannot find the proper way to pop the current view and go back to the previous one. I am not using any navigationController (the app doesn't have any top or bottom bars). I don't think using modal or push segue the other way would be the solution as it instantiates a new controller. Do I have to use a custom Segue with the opposite animation and deletion of the view at the end ? Or is there a

Storyboard navigation controller and tab bar controller

前提是你 提交于 2019-11-27 01:07:32
问题 I am trying to get the following setup in Storyboard. Where I have a table view in the beginning, and when I tap a cell it needs to transition to the tab bar controller, which works. But now I want a title and an extra navigation bar button in the the 2 most right controllers. But I can't seem to drag a button to there or when setting the title, nothing shows up. How can I achieve this setup in storyboard? edit: Updated question, based on answer below. When I have this new setup (thus with an

iOS: present view controller programmatically

不羁岁月 提交于 2019-11-27 00:14:28
问题 I'm using the presentViewController:animated:completion: method to go to another view controller. This is my code: AddTaskViewController *add = [[AddTaskViewController alloc] init]; [self presentViewController:add animated:YES completion:nil]; This code goes to the other UIViewController but the other controller is empty. I've always been using storyboards but now I need this to be done in code. 回答1: If you're using a storyboard, you probably shouldn't be using alloc and init to create a new

How to set the UITableView Section title programmatically (iPhone/iPad)?

孤人 提交于 2019-11-26 23:57:15
问题 I've created a UITableView in Interface Builder using storyboards . The UITableView is setup with static cells and a number of different sections. The issue I'm having is that I'm trying to setup my app in several different languages. To do this I need to be able to change the UITableView section titles somehow. Please can someone help me out? Ideally I'd like to approach the issue using IBOutlets however I suspect this isn't even possible in this case. Any advice and suggestions would be