storyboard

Crash with instantiateViewControllerWithIdentifier

我与影子孤独终老i 提交于 2019-12-12 03:19:44
问题 I'm trying to get a UISplitViewController to work using a storyboard, but when I try to instantiate my master ViewController my app crashes with a cryptic EXC_BAD_ACCESS and a disassembly. I have a property, splitNavVc on my subclass of UISplitViewController, in my storyboard I have the setup below. splitNavVc is on the left hand side and is a subclass of UINavigationController. The problem is, after trying to instantiate the splitNavVc when the view loads, the app crashes. To instantiate it,

official alternative to implement Splitview as a subview for an IPad App?

喜夏-厌秋 提交于 2019-12-12 03:19:04
问题 I'm developing an app in IOS using Storyboard for the Ipad. I want to add UISplitViewController as a subview of my app. I want to generate this kind of output (see below image). when user click on FirstView's 'Next' button, a second view-splitview should appear. Output: But Apple's guidelines says that we can't push UISplitViewController as a subview of module. if we use a UISplitViewController, it has to be visible at all the times in our app. so when i tried to add any splitviewcontroller

NSTableViewCell setSelected?

寵の児 提交于 2019-12-12 03:17:31
问题 How do I communicate between my NSViewController and the NSTableViewCell when I select that cell on my tableView? On iOS you could use setSelected but in OSX it is totally different. The NSTableCellView class doesn't have any function like that. I might be missing something simple. How do I talk with that cell? I have a custom class cell and on my tableView controller, I got: func tableView(tableView: NSTableView, shouldSelectRow row: Int) -> Bool { let previousSelected = NSIndexSet(index:

How to move this ColorPicker from iPhone to a portion of iPad scene?

点点圈 提交于 2019-12-12 03:13:40
问题 I found a ColorPicker (ILColorPicker) that takes the whole screen on an iPhone. I want to use it in my iPad app (XCode4 using StoryBoards)... it's asking me to "In your view controller's XIB, add a UIView and then set it's class to ILColorPickerView ". I don't want to use the entire scene, just a small part of it... is there another way I can accomplish this? (using Layers, frames, etc)? 回答1: You could programmatically create a popover (UIPopoverViewController), and put the color picker as

How to add data to tableview using a delegate?

醉酒当歌 提交于 2019-12-12 03:05:45
问题 I'm building an app for fun with a initial view controller of a tableview, where you are able to see the details of the cells, and add new data to the tableview. First off, here is the project, so you can load it and have a look. http://dawtano.com/xc-project.zip It's a bit of a complex project and I think much of the code is obsolete, but the initial app is working, so I don't want to clean it up just yet. The app is built around storyboard and consists of: DataModel (containing the initial

iad iPhone 5 Storyboard implementation

末鹿安然 提交于 2019-12-12 03:05:43
问题 I have a paid app on the app store, and I'm trying to make a free version of the same app with ads. I was thinking about using iAds. I implemented the following code: -(void)bannerViewDidLoadAd:(ADBannerView *)banner { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.01]; [banner setAlpha:1]; [UIView commitAnimations]; CGRect adFrame = adView.frame; adFrame.origin.y = self.view.frame.size.height; adView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; } -

How to unload view and recreate it using storyboard when didReceiveMemoryWarning

给你一囗甜甜゛ 提交于 2019-12-12 03:05:13
问题 I used this tutorial http://www.wannabegeek.com/?p=168 for swiping between different view controllers (which are on my storyboard). Now I want to unload the views from the view controllers when a didReceiveMemoryWarning is received. I've tried this: - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. self.view = nil; } And when I receive a memory warning, the view shows black. How can I recover the view from my storyboard? 回答1:

how to attach a class to a view in the main story board

笑着哭i 提交于 2019-12-12 03:04:35
问题 I am new to XCode 4.2 , and I am trying to find a way to attach a class (.h and .m files) to a view in my main storyBoard ... how can I do that ? Thanks 回答1: if it's a subclass of UIViewController, you can assign in interface builder in xcode. Open the .xib, select your view, open the properties and assign a custom class Here is a screenshot : http://i.stack.imgur.com/fl4up.jpg 来源: https://stackoverflow.com/questions/8855526/how-to-attach-a-class-to-a-view-in-the-main-story-board

How to pass selected row string in table view to another ViewController page? (Swift 2)

爷,独闯天下 提交于 2019-12-12 02:49:33
问题 I am running Xcode 7.3 and using Swift 2.2. I am having trouble passing data from my first view controller to the second view controller. I've created a variable string in my first view controller that holds the selected row in the tableview and it works. I have also created another variable string in my second view controller that should hold the name of the selected row, then pass the text to a label. import UIKit import Parse import ParseUI class FruitListPage: UIViewController,

How to push Storyboard from loginviewcontroller which is an xib

不羁的心 提交于 2019-12-12 02:48:30
问题 I am having Loginview controller,I have created it with Xib and i want to push mainstoryboard on clicking loginbutton. LoginViewController *lObjloginview = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; UINavigationController *lObjtempview = [[UINavigationController alloc] initWithRootViewController:lObjloginview]; self.window.rootViewController = lObjtempview; [self.window makeKeyAndVisible]; This will add loginview from xib.but after pressing loginbutton I