@@ -221,7 +221,7 @@ - (void)viewDidLoad
221
221
222
222
// Content View Controller
223
223
[self addChildViewController: self .tableViewPicker];
224
- self.tableViewPicker .view .frame = CGRectMake ( 0.0 , 0.0 , self.view .frame . size . width , self. view . frame . size . height ) ;
224
+ self.tableViewPicker .view .frame = self.view .bounds ;
225
225
[self .view addSubview: self .tableViewPicker.view];
226
226
[self .tableViewPicker didMoveToParentViewController: self ];
227
227
@@ -419,6 +419,8 @@ - (void)boxSessionDidBecameAuthenticated:(NSNotification *)notification
419
419
{
420
420
[self .view endEditing: YES ];
421
421
[self addChildViewController: self .tableViewPicker];
422
+ self.tableViewPicker .view .frame = self.view .bounds ;
423
+ [self .view addSubview: self .tableViewPicker.view];
422
424
[self .authorizationViewController willMoveToParentViewController: nil ];
423
425
424
426
[self transitionFromViewController: self .authorizationViewController
@@ -428,6 +430,7 @@ - (void)boxSessionDidBecameAuthenticated:(NSNotification *)notification
428
430
animations: nil
429
431
completion: ^(BOOL finished)
430
432
{
433
+ [self .authorizationViewController.view removeFromSuperview ];
431
434
[self .authorizationViewController removeFromParentViewController ];
432
435
[self .tableViewPicker didMoveToParentViewController: self ];
433
436
// do not hold a reference to the authorization view controller. It should
@@ -449,6 +452,7 @@ - (void)boxAuthenticationDidFailed:(NSNotification *)notification
449
452
// We only want to do the transition once.
450
453
if (self.tableViewPicker .parentViewController ) {
451
454
[self addChildViewController: self .authorizationViewController];
455
+ self.authorizationViewController .view .frame = self.view .bounds ;
452
456
[self .view addSubview: self .authorizationViewController.view];
453
457
[self .tableViewPicker willMoveToParentViewController: nil ];
454
458
@@ -459,6 +463,7 @@ - (void)boxAuthenticationDidFailed:(NSNotification *)notification
459
463
animations: nil
460
464
completion: ^(BOOL finished)
461
465
{
466
+ [self .tableViewPicker.view removeFromSuperview ];
462
467
[self .tableViewPicker removeFromParentViewController ];
463
468
[self .authorizationViewController didMoveToParentViewController: self ];
464
469
}];
0 commit comments