storyboard

How to call different Storyboards in iOS?

元气小坏坏 提交于 2019-12-13 07:08:08
问题 I am using two storyboard first one for iphone Main.storyboard and second one is Main_iPad.storyboard and i wants to call separately for iPad and iPhone i am using this code: if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil]; EABaseRootVC *loginController = [storyboard instantiateViewControllerWithIdentifier:@"root2"]; UINavigationController *navController=[[UINavigationController alloc

Multiple segues not passing Object data between themselves

走远了吗. 提交于 2019-12-13 06:48:24
问题 I have started a project that was initially completed following Appcoda's tutorial about using view controllers to pass data between scenes (Find it here: http://www.appcoda.com/storyboards-ios-tutorial-pass-data-between-view-controller-with-segue/) Basically it takes table data from the first scene and the segue connects to another controller that displays the recipe image, prep time, and ingredients. However I wanted to take it one step further and add another view controller that will show

Implement UITableView from different ControllerClass as Subview

醉酒当歌 提交于 2019-12-13 06:26:11
问题 I'm trying to implement a TableView from a different (Table)ViewController into a Scrollview. I'm literally trying for hours now and I can't figure out the problem. The error I get is: -[UISectionRowData numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x687fdb0 2012-05-07 16:47:18.966 Test2[12212:f803] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UISectionRowData numberOfSectionsInTableView:]: unrecognized selector sent to instance

Reference to source view controller and destination view controller at the same time

左心房为你撑大大i 提交于 2019-12-13 05:46:46
问题 I have a series of UIViewControllers throughout my application. Most of them have the navigation bar but some of them hide it. The problem is that sometimes as you transition between a view with or without navbars to another view with or without navbars there is a black box that replaces the navbar during the transition. This problem was discussed here: Hiding a UINavigationController's UIToolbar during viewWillDisappear: This solution is fine and it does get rid of the black box, but I

Storyboard ui elements don't appear in Xcode 5

北城以北 提交于 2019-12-13 05:16:18
问题 I have transitioned my iPad application from iOS 6 to iOS 7 and I had to turn off auto layout or the whole application would crash when I selected to view the storyboard. Now that I can view it, all the uielements don't appear in the each storyboard screen. The screens are there but they are blank (white). The editor shows that they are there but I cannot view them at all. 回答1: Try changing the width and height/ x and y coordinate of the views. That fixed the same problem for me. 来源: https:/

Data disappears when switching between view controllers

时间秒杀一切 提交于 2019-12-13 05:12:27
问题 I am writing an iPhone application using the storyboards for an initial mockup. The problem I have right now is switching view controllers. I have a table view controller and another view controller. All I want to do is use a back button to go back to the original screen, and I can do that, except the data disappears. The storyboard that I have is shown below. I have the Back button going back to the original navigation controller. I have also had it going back to the Card view controller. I

How to Convert iPhone app to support iPad

大憨熊 提交于 2019-12-13 05:05:15
问题 I have existing iPhone app. Now i want it to give support for iPad app i Followed the below link (Converting Storyboard from iPhone to iPad). After implementing the suggestions given by tharkay. I run the app in iPad only Navigation bar coming properly but all components(like buttons, labels)are not resizing those are coming as iPhone size. Can anybody help me to solve the problem? 回答1: Under your Project->Targets->General->Deployment Info make sure that in your iPad tab the right Main

Creating Navigation Bar programmatically with storyboard

筅森魡賤 提交于 2019-12-13 04:49:06
问题 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]]; UINavigationController *navVC = [UINavigationController new]; ViewController *VC1 = [ViewController new]; [window makeKeyAndVisible]; [navVC setViewControllers:[NSArray arrayWithObject:VC1] animated:NO]; [window setRootViewController:navVC]; return window; } When calling this method, I get my Nav Bar but I don't

StoryBoard issue in Xcode 6.1

醉酒当歌 提交于 2019-12-13 04:48:40
问题 I am having the project which is successfully done the project in Xcode 5.1 using story board, I am running the project in Xcode 6.1 now its showing the error in Xcode 6.1 . I am getting the error as Main_iPhone.storyboard: error: Illegal Configuration: Static table views are only valid when embedded in UITableViewController instances How to resolve this error and make the project run in 64 bit and support to iOS8 Hoping for the right answers. 回答1: Xcode 6 supports static tableviews only

identify a storyboard uibutton for editting in code

丶灬走出姿态 提交于 2019-12-13 04:36:32
问题 update 1 I fixed the problem of the loop not stopping by putting the condition in dealCard instead of in startPause . update 1 update 0 - (IBAction)startPause: (UIButton *)sender{ NSString *buttonTitle = sender.currentTitle; if ([buttonTitle isEqualToString: @"Pause"]) { [self.myButton setTitle:@"Resume" forState:UIControlStateNormal]; [timer invalidate]; } else { [self.myButton setTitle:@"Pause" forState:UIControlStateNormal]; if ([self.deal length]>cardNum) { timer = [NSTimer