uistoryboard

Storyboard Could not instantiate class named UIStoryboardUnwindSegueTemplate crash

人盡茶涼 提交于 2019-12-01 06:46:57
I've just finished the Apple tutorial on Storyboard and ran the app on my iPhone 4 running iOS 5.1.1. On the simulator, when I press the add button, I get the modal view that slides up from the bottom, no crash. I can enter data, hit the done button and have my new entry shown. When performing the same action on my iPhone 4, tapping on the add button results in the app crashing, saying: * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIStoryboardUnwindSegueTemplate' This feels like a common problem but no Google

Managing two storyboards in App Delegate

随声附和 提交于 2019-12-01 06:02:34
问题 I have decided to avoid using auto-layout so I am instead currently trying to implement the code to make my app manage two different storyboards based on screen size. I have been following this tutorial: http://pinkstone.co.uk/how-to-load-a-different-storyboard-depending-on-screen-size-in-ios/ I am having issues trying to translate the Objective C code into Swift. Here is the code that I currently have in my AppDelegate: @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate

iOS: how to dismiss popovers [duplicate]

主宰稳场 提交于 2019-12-01 06:01:15
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to Dismiss a Storyboard Popover I have a iPad storyboard. A Bar Button Item in one View is Control-dragged to another view -- and a popover style is chosen. When I press the button the new popover view is shown in a popover, but I have two problems: When I press the button again, another instance of the popover view is displayed -- I can see, that the black border is getting darker and darker. If the popover

How to add an Array of pages to a UIPageViewController in iOS 5?

狂风中的少年 提交于 2019-12-01 05:49:02
问题 Does anyone know what am I missing in order to add manually my own view controllers to the UIPageViewController methods? I currently have this and I do not know how to proceed: NSDictionary *pageViewOptions = [NSDictionary dictionaryWithObjectsAndKeys:UIPageViewControllerOptionSpineLocationKey, [NSNumber numberWithInteger:UIPageViewControllerSpineLocationMin], nil]; self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl

How to set a max limit for an IBInspectable Int

情到浓时终转凉″ 提交于 2019-12-01 05:24:33
I am using an IBInspectable Int in Swift to choose between 4 four shapes (0-3), however it is possible in the storyboard editor to set a value greater than 3 and less than 0, which stops the IBDesignable system working. Is it possible to set a min and max limit of what values can be set in the storyboard editor? let SHAPE_CROSS = 0 let SHAPE_SQUARE = 1 let SHAPE_CIRCLE = 2 let SHAPE_TRIANGLE = 3 @IBInspectable var shapeType: Int = 0 @IBInspectable var shapeSize: CGFloat = 100.0 @IBInspectable var shapeColor: UIColor? There's no way to limit what a user can input in Storyboard. However, you

Storyboard Could not instantiate class named UIStoryboardUnwindSegueTemplate crash

隐身守侯 提交于 2019-12-01 05:05:52
问题 I've just finished the Apple tutorial on Storyboard and ran the app on my iPhone 4 running iOS 5.1.1. On the simulator, when I press the add button, I get the modal view that slides up from the bottom, no crash. I can enter data, hit the done button and have my new entry shown. When performing the same action on my iPhone 4, tapping on the add button results in the app crashing, saying: * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not

Clear Label text used in Storyboard

梦想的初衷 提交于 2019-12-01 04:20:25
问题 Wondering if anyone know hows to complete the following... In a Storyboard I set my Labels with dummy text, they are not Static text. For example 'User1 Username'. What I would to know if there is a setting to clear the value of this label when it is loaded by the view. I have some other code that runs off and collects the relevant information. However, it might take a few seconds so a HUD is shown to the user whilst it loads. Of course in the background of the HUD you can see the example

prepareForSegue equivalent in WatchKit

风流意气都作罢 提交于 2019-12-01 03:08:45
I have an interface with 2 buttons, both of them call the same interface but with different information. On the traditional interface I use prepareForSegue, but I don't know what's the equivalent one on the WatchKit. You can do this in two ways: In your storyboard you set an identifier in your segue: and then you can use contextForSegueWithIdentifier : - (id)contextForSegueWithIdentifier:(NSString *)segueIdentifier { if ([segueIdentifier isEqualToString:@"yourIdentifier"]) { return aDictionaryWithYourInformation; } } Or you can pass information with a context via code, with: [self

UIStoryboard load from app delegate

寵の児 提交于 2019-12-01 03:01:07
I am trying to load a UIStoryboard from the app delegate .m in this way: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIStoryboard *storybord = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]]; UIViewController *vc =[storybord instantiateInitialViewController]; [self.window addSubview:vc.view]; return YES; } What is the problem with this code?? any idea? - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIStoryboard *storyboard =

Setting a UITableView's contentInset through Storyboard in Xcode 6

随声附和 提交于 2019-12-01 02:41:00
On Xcode 6, it seems that the ability to set the content inset of a scroll view/table view through UIStoryboard has been taken away. See image below: the parameters on the left are from Xcode 6, whereas the parameters on the right are from Xcode 5 Does anyone know if the parameters have moved, or are we no longer able to set the content inset through UIStoryboard? I'd really like to keep this out of my code if possible.. Maksim Bazarov You can do that by using KVC Select table view Choose Identity Inspector Press "+" in "User defined runtime attributes" Add your inset as a Rect {{10,15},{25,10