-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface orientation iPhone/iPad in injected view controllers #483
Comments
It looks that the problem comes from init the main window frame in the assembly, because it doesn't set it properly. (In simulator doesn't work at all) |
Hm.. Typhoon just instantiates ViewControllers and Windows for you. It's similar like if you create it on your own somewhere in another place. So it's not Typhoon problem, but something with UIKit configuration. ( UIKit is magic box - results are often unknown) For your case, I would recommend using UIStoryboard as entry point, since it's standard approach now in iOS. Typhoon works with UIStoryboard very well |
I have the same issue, and if create window at didFinishLaunchingWithOptions
all works as expected. such code do not work as expected. The same black line and no rotations
|
The Typhoon sample app exhibited the same issue, so the window was created with code inside the app delegate: https://github.com/appsquickly/Typhoon-Swift-Example Interestingly, this problem does not occur with the Objective-C version. |
Hi, I have a problem injecting my initial view controller (a navigation with a view controller as root) when I run it in landscape orientation.
The app should run portrait in iPhone and landscape in iPad, but only iPhone render well. In iPad starts rotated, and looks like size classes aren't working, because I can see a black background. Link to image:
https://www.dropbox.com/s/tqqca444ooe9gkj/Captura%20de%20pantalla%202016-03-07%20a%20las%2010.49.37.png?dl=0
And this is mi code to inject the initial viewcontroller:
return [TyphoonDefinition withClass:[UIWindow class] configuration:^(TyphoonDefinition *definition)
{
[definition useInitializer:@selector(initWithFrame:) parameters:^(TyphoonMethod *initializer)
{
[initializer injectParameterWith:[NSValue valueWithCGRect:[[UIScreen mainScreen] bounds]]];
}];
[definition injectProperty:@selector(rootViewController) with:[self rootViewController]];
}];
}
return [TyphoonDefinition withClass:[UINavigationController class] configuration:^(TyphoonDefinition *definition)
{
[definition useInitializer:@selector(initWithRootViewController:) parameters:^(TyphoonMethod *initializer)
{
[initializer injectParameterWith:[self viewController]];
}];
}];
}
return [TyphoonDefinition withClass:[ViewController class] configuration:^(TyphoonDefinition *definition)
{
[definition injectProperty:@selector(assembly) with:self];
}];
}
Looking into documentation and forums, I have not found any help. Am I forgetting something?
The text was updated successfully, but these errors were encountered: