Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJacob Caf
Courses Plus Student 936 PointsViewDidLayoutSubViews is not working pleas tell me what is wrong I am using Xcode 6 2015
It does not work it stays the same when I call this method
Jeff Ripke
41,989 PointsI downloaded the code and used the code in the THViewController.m file and put it in GameViewController.m file and it worked. I hope this helps.
1 Answer
Nick Ewing
2,424 PointsJacob this might help.. Not sure if you solved the issue yet.
@implementation GameViewController -(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews];
// Configure the view.
SKView *skView = (SKView *)self.view;
skView.showFPS = YES;
sk.View.showsNodeCount = YES;
sk.View.ignoresSiblingOrder = YES;
GameScene *scene = [GameScene sceneWithSize:skView.bounds.size];
scene.scaleMode = SKSceneScaleModeAspectFill;
[skView presentScene:scene];
}
......
Note: Will work with
-(void)viewDidLoad { [super viewDidLoad];
..............................
Omar Nunez
4,101 PointsOmar Nunez
4,101 PointsPut more info of your code