Closed freefelt closed 8 years ago
In the demo project?
Demo project does not compile swift file. I got MAPageViewController.h and MAPageViewController.m from it to my project, added:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
UIViewController *redVC = [UIViewController new];
redVC.view.backgroundColor = [UIColor redColor];
UIViewController *blueVC = [UIViewController new];
blueVC.view.backgroundColor = [UIColor blueColor];
UIViewController *greenVC = [UIViewController new];
greenVC.view.backgroundColor = [UIColor greenColor];
UIViewController *orangeVC = [UIViewController new];
orangeVC.view.backgroundColor = [UIColor orangeColor];
UIViewController *brownVC = [UIViewController new];
brownVC.view.backgroundColor = [UIColor brownColor];
UIViewController *yellowVC = [UIViewController new];
yellowVC.view.backgroundColor = [UIColor yellowColor];
NSArray *viewControllers = @[redVC, blueVC, greenVC, orangeVC, brownVC, yellowVC];
MAPageViewController* pVC = [[MAPageViewController alloc] initWithViewControllers:viewControllers];
self.window.rootViewController = pVC;
return YES;
}
And it is only black screen on launch.
I tried to get TestObjectiveCNavigationController and set it as class to storyboard initial navigation controller. Then it shows navigation bar and black screen too.
This was written around the Swift 1 days. Been quite busy with my real job, and its been a while since I've done anything with Swift 2 so its not likely ill get to fixing the new swift compiler errors any time in the near future. Feel free to open a pull request if you're able to go through them.
I need exactly Objective C edition of MAPageViewController. It is compiled, but shows black screen. Ok, I will try to see whats wrong.
It was my fault. I forgot to add: self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds]; self.window.rootViewController = pVC; [self.window makeKeyAndVisible];
Objective C, iOS 9.2 Simulator. Just black screen and nothing else.