Re: Help with Storyboard Problem
Re: Help with Storyboard Problem
- Subject: Re: Help with Storyboard Problem
- From: Dave <email@hidden>
- Date: Mon, 19 Jun 2017 21:02:30 +0200
A bit more on this:
I tried it with a NIB as so:
-(IBAction) startGameAction:(id) theSender
{
LTWBoardViewController* myGameViewController;
UIView* myView;
myGameViewController = [[LTWBoardViewController alloc]
initWithNibName:@"LTWBoardViewController" bundle:nil];
myView = myGameViewController.view;
}
And this doesn’t work either….. Even though it says in the docs that it should
All I want to do is to call one view controller from another, this used to be
soooooo simple!
If anyone could tell me how to present the view controller on the screen I’d be
really grateful.
All the Best
Dave
> On 19 Jun 2017, at 20:24, Dave <email@hidden> wrote:
>
> XCode 8.3.3.
>
> Hi All,
>
> I’m using storyboards on an iOS project and can’t seem to get it to work.
>
> I have two view controllers in the “Main.storyboard” file. The fist view
> controller has one button on it, that when clicked, I want it to go to the
> other view controller.
>
> I’ve tried using Segues but can’t get that to work so decided to to it
> manually.
>
> I have a method in the first view controller that is hooked to the button as
> so:
>
> -(IBAction) startGameAction:(id) theSender
> {
> LTWChaosBoardViewController* myGameViewController;
> UIView*
> myView;
>
> myGameViewController = [self.storyboard
> instantiateViewControllerWithIdentifier:@"LTWChaosBoardViewController1”];
> myView = myGameViewController.view;
> }
>
> This returns the correct View Controller but does not actually present it.
> How do I do this?
>
> The documentation is sooooooo poor that I just can’t find anything that is of
> help.
>
> All the Best
> Dave
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden