Q: PagingMenuController swift library in obj-c project error In my objective-c projects i used to use PageMenu library for userfriendly navigation, but i've noticed infinite menuScrollView and centered selected menu item looks much pretty than default PageMenu does. 
And when i found PagingMenuController i tried to import this swift library into obj-c project. Everything seems to be fine, header files been created correctly, access to PagingMeniController class methods were granted. 
But when i try to init PagingMenuController class with array of viewcontrollers with code: 
#import "moyoutlet-Swift.h"

UIViewController* vc = [[UIViewController alloc] init];
vc.view.backgroundColor = [UIColor redColor];
vc.menuItemDescription = @"vc";

UIViewController* vc1 = [[UIViewController alloc] init];
vc1.view.backgroundColor = [UIColor whiteColor];
vc1.menuItemDescription = @"vc1";

NSArray* arr = [NSArray arrayWithObjects:vc,vc1, nil];

PagingMenuController* pvc = [[PagingMenuController alloc] initWithViewControllers:arr];

[self.view addSubview:pvc.view];

xcode shows an error in method of MenuItemView.swift 
calculateLabelSize(label: UILabel, windowSize: CGSize = UIApplication.sharedApplication().keyWindow!.bounds.size) 


fatal error: unexpectedly found nil while unwrapping an Optional
  value

and it seems that UIApplication.sharedApplication().keyWindow!.bounds.size returns nil.
how do u think, where is the reason of this error?

A: As Acecilia said the problem was described in this discussion and the solution was to make all stuff in -(void)viewDidAppear like: 
-(void)viewDidAppear:(BOOL)animated {

     [super viewDidAppear:animated];

      UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

      FirstViewController* fvc = [sb instantiateViewControllerWithIdentifier:@"FirstViewController"];
      fvc.title = @"First View Controller";
      fvc.view.backgroundColor = [UIColor grayColor];

      SecondViewController* svc = [sb instantiateViewControllerWithIdentifier:@"SecondViewController"];
      svc.title = @"Second View Controller";
      svc.view.backgroundColor = [UIColor lightGrayColor];

      PagingMenuController* pvc = [[PagingMenuController alloc] initWithViewControllers:@[fvc,svc]];

     [self addChildViewController:pvc];
     [self.view addSubview:pvc.view]; 
}

I've created example project to show how it works. 
