storyboard

MvvmCross and Xcode Storyboard

时间秒杀一切 提交于 2020-01-01 10:04:22
问题 The storyboard xcode are supported in mvvmcross v3? If yes, how? There is an example? Thanks 回答1: MvvmCross doesn't really fit that well with Storyboards The reason is because Storyboards have some logic in them (eg Segue navigation) which really belongs inside actions in the MvvmCross ViewModels. With that said... if you just want to take advantage of data-binding then you can... just: add the MvvmCross assembly references modify your Storyboard app so it runs some minimal setup code use the

Swift: Switch between NSViewController inside Container View / NSView

天涯浪子 提交于 2020-01-01 09:37:23
问题 I want to achieve a really simple task—changing the ViewController of a Container View by pressing a button: In my example the ViewController1 is embedded into the Container View using Interface Builder. By pressing the Button ViewController2 I want to change the view to the second ViewController. I’m confused because the Container View itself seems to be a NSView if I create an Outlet and as far as I know a NSView can’t contain a VC. Really appreciate your help! 回答1: Just note that in order

“Installed” option in Attributes Inspector

拈花ヽ惹草 提交于 2020-01-01 09:23:16
问题 In Attributes inspector there is an option Installed . I am unsure of it's meaning. Does it mean that the element will be present in any size class? 回答1: It is for adding that specific view to the corresponding size class. If the installed is checked it will be added to the view hierarchy of that size class, else it won't be added. You can check more about this option in Enable And Disable Views. 来源: https://stackoverflow.com/questions/33975427/installed-option-in-attributes-inspector

Storyboard crash - coding-compliant key sceneViewController

点点圈 提交于 2020-01-01 08:25:36
问题 I'm getting an intermittent crash using Storyboards in iOS 5. Every so often, I get a SIGABRT when I try to instantiate a new object with a view controller from my Storyboard. It seems like a very generic error, but I can't find anyone else that's seen this. Thanks for your help! SectionLandscapeViewController *sectionViewController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil] instantiateViewControllerWithIdentifier:@"SectionLandscapeViewController"]; And the crash...

instantiateViewControllerWithIdentifier and pass data

三世轮回 提交于 2020-01-01 05:15:36
问题 I am using Storyboard in my app and I want to pass data from one view to another view. Instead of using segues I am using instantiateViewControllerWithIdentifier . In this case I am instantiate from my first TableViewController to a NavigationController which has a second TableViewController attached because I need the navigation in the second TableViewController . Now I want to pass data from my first TableviewController , depending which row was clicked, to my second TableviewController .

Best practice on showing a one time login screen w/ storyboards

寵の児 提交于 2020-01-01 04:43:11
问题 I've seen similar questions here, but not with a clear answer. So I have one modal login view with the classic username/password form, a Facebook login button and a Sign Up button which I would like to show when the user starts the app for the very first time. From what I found there are two ways to implement this, with shortcumings. in AppDelegate's didFinishLaunchingWithOptions a conditional is set to check if the user is logged in. If not the rootViewController is set to the

iOS - Create UIView subclass for rounded rectangle

余生长醉 提交于 2020-01-01 04:41:15
问题 I'm trying to create & use a very simple UIView subclass for a rectangle with rounded corners. I've created a new class as follows : RoundedRect.h #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> @interface RoundedRect : UIView @end RoundedRect.m #import "RoundedRect.h" @implementation RoundedRect - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code [[self layer] setCornerRadius:10.0f]; [[self layer] setMasksToBounds:YES]; }

What are the advantages of iOS 5.0 storyboarding over traditional UI layout?

最后都变了- 提交于 2020-01-01 04:29:14
问题 I am a total beginner in iOS development. However, I've done Java, PHP and Javascript at work for severals years, so I am pretty experienced with OOP and design patterns. Xcode 4.2 adds the new storyboarding capability for laying out interfaces in iOS 5.0. Is storyboarding simply a wizard for beginner developers or does it have advantages for more experienced developers as well? My coworkers and I (both beginners in iOS development) are debating whether one should learn and program iOS using

Is there a way to select a segue anchor programmatically?

北城以北 提交于 2020-01-01 01:53:12
问题 Suppose I have a Storyboard containing a view that contains a button. When the user presses this button, a popover comes up. Thus, I need to set an anchor by dragging the segue to the button using Xcode (and then do performSegueWithIdentifier: ). So, my question is: is there a way to set this "anchor" programmatically? Thank you. 回答1: In my case I've added programmatically several UIBarButtonItem. The problem of only using an invisible view as an archor is that, if like in my case, the size

Mac App Storyboard - Access Document in NSViewController

三世轮回 提交于 2020-01-01 01:16:12
问题 I am currently fighting with NSDocument in a document based Storyboard based Cocoa Application (Objective C). Can anybody tell me how i can access the document in the NSViewController subclass? I've tried to access it the following way - but the document is null: [self.view.window.windowController document]; Thanks for your help! Best regards Martin 回答1: I was just wrestling with this myself. I started with the standard Yosemite template and was trying to use [self.view.window