uistoryboard

Deinit not called on Show Detail segue

两盒软妹~` 提交于 2019-12-24 11:22:44
问题 I encountered this issue on a larger Swift project, but was able to replicate it with a very basic project. I have the following view controller class: class ViewController: UIViewController { deinit { println("Deinitializing") } override func viewDidAppear(animated: Bool) { NSTimer.scheduledTimerWithTimeInterval(0.1, target: self, selector: "segue", userInfo: nil, repeats: false) } func segue() { self.performSegueWithIdentifier("segue", sender: self) } } My storyboard is configured so there

Custom UIStoryboard using Swift

你说的曾经没有我的故事 提交于 2019-12-24 10:36:00
问题 Has anyone managed to create a custom UIStoryboard using Swift. If you jump to the definition of UIStoryboard it only has one initialiser. However it seems to return a UIStoryboard. init(name: String!, bundle storyboardBundleOrNil: NSBundle!) -> UIStoryboard I though initialisers did not return a type. Anyway, when I attempt to call this super initialiser from my subclass initialiser I get the following error Must call a designated initialiser of the superclass 'UIStoryboard' Has anyone

iOS Scroll View Allows Scrolling Past Content

百般思念 提交于 2019-12-24 06:28:55
问题 I'm trying to work on optimizing my app for landscape and smaller screens. I'm mostly using scroll views to achieve this. In one of my views I have a container view. This container view looks perfect when I toggle between devices in the storyboard. The container view is mapped to a view controller that has a scroll view that has top, bottom, leading, and trailing space set to superview 0. So it should fill the container. The actual view controller is set to Freeform Simulated Size with a

Custom Segue push weird behavior

眉间皱痕 提交于 2019-12-24 00:14:06
问题 I am trying a simple project (storyboard) where the user swipes from right to left to get to the next view and so on and to go back the user swipes from left to right. I want to achieve the transition to follow the swipe (L-->R or R-->L). I have found this: -(void)perform { UIViewController *sourceViewController = (UIViewController*)[self sourceViewController]; UIViewController *destinationController = (UIViewController*)[self destinationViewController]; CATransition* transition =

What is the mean of this error?

非 Y 不嫁゛ 提交于 2019-12-23 23:14:47
问题 My application is working very well for first time in the sumilator, when I rerun my app in simulator and press some button, I get this type of error. I am using Local DB, so I thought maybe it is reason for taking this error message? * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'UIViewController-Lat-JX-Ucy' and directory 'MainStoryboard_iPad.storyboardc'' * First throw call stack:

Why is my segue causing an “unrecognized selector sent to instance” NSInvalidArgumentException?

限于喜欢 提交于 2019-12-23 20:56:03
问题 Trying to move from my first ViewController to my second ViewController (both using same storyboard), using a segue. My first ViewController has two buttons, one that says "Male", one that says "Female" (I know, not everyone associates with one of these two), and I want either, once clicked, to move to the second ViewController. I drag/dropped the button into my code to get the following: @IBAction func femaleButton(_ sender: AnyObject) { Globals.onboardingList.append("girl") print("it's a

Does dequeueReusableCellWithIdentifier work with ARC?

不打扰是莪最后的温柔 提交于 2019-12-23 17:27:56
问题 In iOS5, using ARC and prototype cells for tableView on storyboard, can I replace the code below: static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } // Configure the cell... return cell; With this simple code?: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];

Set up side drawer controller

我怕爱的太早我们不能终老 提交于 2019-12-23 16:15:46
问题 basically i use MMDrawerviewController for side drawer and my setup for storyboard prototype is like below and my code is as successful login is UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; MenuVC *menuViewController = [storyboard instantiateViewControllerWithIdentifier:@"MenuVC"]; UIViewController *centerViewController = [storyboard instantiateViewControllerWithIdentifier:@"VC1"]; MMDrawerController *drawer = [[MMDrawerController alloc]

How and where would you use instantiateViewControllerWithIdentifier

可紊 提交于 2019-12-23 13:01:19
问题 UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil]; MenuScreenViewController *controller = (MenuScreenViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"<Controller ID>"]; Where exactly do i write this code if i have to make sure that the current view is instantiated with the identifier? Which means if i write any code on this class it has to appear when this viewcontroller loads? Also how would i use it? I dont want to

Storyboard Illegal Configuration iOS 7

风流意气都作罢 提交于 2019-12-23 12:23:08
问题 I have moved from Xcode 4.6.2 to Xcode 5 GM and received such error: Interface Builder does not support UITableView sizes larger than 10,000 by 10,000. Does any body have the same problem ? 回答1: It seems my problem was in one of my tables. There was a table in another table with such horrible sizes, that's why I didn't see it before. So I just remove it from there and everything looks fine. Thank's everyone for help. 来源: https://stackoverflow.com/questions/18823356/storyboard-illegal