storyboard

Xcode how to change which viewController loads first at start-up

给你一囗甜甜゛ 提交于 2019-12-12 10:47:19
问题 I am using storyboards, xcode 4.6.1. I have created an app, but now I want to go back and add a new view controller to the beginning. How do I assign this view controller to be the first one to load up at run-time? 回答1: Choose your viewcontroller in storyboard , click show the attributes inspector and choose initial scene: is initial view controller 回答2: Xcode 10.3 Show Inspectors -> Show the Attributes inspector -> Is Initial View Controller It will update the Initial view controller in the

Unwind Segue from Modal/Popover resulting in Unbalanced calls to begin/end appearance transitions

戏子无情 提交于 2019-12-12 10:38:58
问题 I have the following setup: Nav Controller -> VC1 -Push--> VC2 -PopOver or Modal Segue--> VC3. VC3 is unwinding back to VC1. When the Segue from VC2 to VC3 is PopOver and Modal, the unwind ends in a warning: Unbalanced calls to begin/end appearance transitions for UIViewController" If the Segue from VC to VC is push, the warning is gone. Any idea how to get rid of the warning or why its even showing? 回答1: It's a bug. Ignore it (or, if you want to be a good citizen, file a bug report with

How to resize App for Iphone 5?

久未见 提交于 2019-12-12 10:22:40
问题 I'm creating a universal app. Everything is looking great on the ipad/iphone but when I switch my storyboard view to the iphone 5 or run the simulator as the iphone 5, there is an inch or so at the bottom of just whitespace. I've tried turning on autolayout and using that, but with no luck. I've also tried to create -568h@2x.png versions of my images to see if it will auto-resize with those, but it doesn't. Does anyone have any other ideas I could perhaps try? Thank you! 回答1: I found the way

Gap between navigation bar and subview ios?

依然范特西╮ 提交于 2019-12-12 09:59:36
问题 I understand there is this question: Adding subview leaves gap between subview and navigation bar However, there is no answer, and I do my method a different way, so that might make it a bit different. Anyways, I as well have a gap between the navigation bar and subview when I add a subview to my navigation controller, which also has a tab bar controller. I am using storyboards. I am adding the subview using UIViewController.view type via storyboard id. My code: [self.view addSubview:[[self

How to load a scene in a storyboard from a view controller

半城伤御伤魂 提交于 2019-12-12 09:47:19
问题 I am developing an application that loads a web page (using UIWebView) using Storyboard (I do know nothing about previous xib neither). I have already created a view controller for that UIWebView and everything works fine. The thing is: since previous versions of iOS don't allow to upload files, I need to make a new view (scene I thought it is called) that allows the user to pick and post a picture. I am able to develop both views separately and they work as expected but now I need to connect

how To add subview in table view using story board

六眼飞鱼酱① 提交于 2019-12-12 08:59:50
问题 I am using story board. I want to add a subview when a element is selected on table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [arr count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc]

Activate Storyboard on Visibility Changed

天涯浪子 提交于 2019-12-12 08:25:42
问题 Currently I have an Image that I pulse when it is loaded. I want to rather activate the Storyboard when I change the Visibility of the Image. But I see that Image.Triggers have to be EventTriggers . Which event do I need to hook into? <Image.Triggers> <EventTrigger RoutedEvent="Image.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName="MandateErrorImage" Storyboard.TargetProperty="Opacity" From="1.0" To="0.1" Duration="0:0:0.5" AutoReverse="True" RepeatBehavior="0:0

How to make a login screen like Facebook app?

夙愿已清 提交于 2019-12-12 08:15:19
问题 How can I make a login screen like the Facebook app with "Email" and "Password" textfields? Facebook Login I'm really new to iOS programming, sorry if this is an easy question. 回答1: First of all you have to understand UIView s and UIViewController s creation and management. Then, you could ask your self if you want to create the interface through xib files or programatically. The first way is quite simple. By means of drag and drop operations you could create a user interface in a short time.

unit test cellForRowAtIndexPath when using storyBoards

喜欢而已 提交于 2019-12-12 08:14:28
问题 If I'm dequeuing a cell from an identifier in a storyboard, how in a unit testing way can I call cellForRowAtIndexPath and not have the cell be nil? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { MyCustomTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCustomCell]; cell.guestNameText.text = self.details.guestName; return cell; } Not working, put a break point above after dequeReusableCell is called and cell is nil:

Get tabbarcontroller from another view on my storyboard

我只是一个虾纸丫 提交于 2019-12-12 07:59:48
问题 In my Delegate i am trying to select my TabBarController so that i can style it with a different background. However the problem is that my TabBarController is not located on the rootView.. My current code: UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController; UITabBar *tabBar = tabBarController.tabBar; UITabBarItem *tabBarItem1 = [tabBar.items objectAtIndex:0]; UITabBarItem *tabBarItem2 = [tabBar.items objectAtIndex:1]; In my interface builder i have my