@@ -101,7 +101,7 @@ - (void)loadView
101
101
vc.view .frame = CGRectMake (vc.layeredNavigationItem .currentViewPosition .x ,
102
102
vc.layeredNavigationItem .currentViewPosition .y ,
103
103
vc.layeredNavigationItem .width ,
104
- self.view .bounds . size . height );
104
+ CGRectGetHeight ( self.view .bounds ) );
105
105
vc.view .autoresizingMask = UIViewAutoresizingFlexibleHeight;
106
106
[self .view addSubview: vc.view];
107
107
}
@@ -272,7 +272,7 @@ - (void)viewControllersToSnappingPointsMethod:(SnappingPointsMethod)method {
272
272
273
273
const CGFloat curDiff = myPos.x - last.layeredNavigationItem .currentViewPosition .x ;
274
274
const CGFloat initDiff = myInitPos.x - last.layeredNavigationItem .initialViewPosition .x ;
275
- const CGFloat maxDiff = last.view .bounds . size . width ;
275
+ const CGFloat maxDiff = CGRectGetWidth ( last.view .frame ) ;
276
276
277
277
if (xTranslation == 0 && (CGFloatNotEqual (curDiff, initDiff) && CGFloatNotEqual (curDiff, maxDiff))) {
278
278
switch (method) {
@@ -333,7 +333,7 @@ - (void)moveViewControllersXTranslation:(CGFloat)xTranslationGesture
333
333
334
334
const CGPoint myPos = meNavItem.currentViewPosition ;
335
335
const CGPoint myInitPos = meNavItem.initialViewPosition ;
336
- const CGFloat myWidth = me.view .bounds . size . width ;
336
+ const CGFloat myWidth = CGRectGetWidth ( me.view .frame ) ;
337
337
CGPoint myNewPos = myPos;
338
338
339
339
const CGPoint myOldPos = myPos;
@@ -442,11 +442,11 @@ - (void)doLayout {
442
442
f.origin = vc.layeredNavigationItem .currentViewPosition ;
443
443
444
444
if (vc.maximumWidth ) {
445
- f.size .width = self.view .bounds . size . width - vc.layeredNavigationItem .initialViewPosition .x ;
446
- vc.layeredNavigationItem .width = f. size . width ;
445
+ f.size .width = CGRectGetWidth ( self.view .bounds ) - vc.layeredNavigationItem .initialViewPosition .x ;
446
+ vc.layeredNavigationItem .width = CGRectGetWidth (f) ;
447
447
}
448
448
449
- f.size .height = self.view .bounds . size . height ;
449
+ f.size .height = CGRectGetHeight ( self.view .bounds ) ;
450
450
451
451
vc.view .frame = f;
452
452
}
@@ -502,10 +502,10 @@ - (void)popViewControllerAnimated:(BOOL)animated
502
502
503
503
[self .viewControllers removeObject: vc];
504
504
505
- CGRect goAwayFrame = CGRectMake (vc.view .frame . origin . x ,
505
+ CGRect goAwayFrame = CGRectMake (CGRectGetMinX ( vc.view .frame ) ,
506
506
1024 ,
507
- vc.view .bounds . size . width ,
508
- vc.view .bounds . size . height );
507
+ CGRectGetWidth ( vc.view .frame ) ,
508
+ CGRectGetHeight ( vc.view .frame ) );
509
509
510
510
void (^completeViewRemoval)(BOOL ) = ^(BOOL finished) {
511
511
[vc willMoveToParentViewController: nil ];
@@ -564,8 +564,8 @@ - (void)pushViewController:(UIViewController *)contentViewController
564
564
initWithContentViewController: contentViewController maximumWidth: maxWidth];
565
565
const FRLayeredNavigationItem *navItem = newVC.layeredNavigationItem ;
566
566
const FRLayeredNavigationItem *parentNavItem = anchorViewController.layeredNavigationItem ;
567
- const CGFloat overallWidth = self.view .bounds . size . width > 0 ?
568
- self.view .bounds . size . width :
567
+ const CGFloat overallWidth = CGRectGetWidth ( self.view .bounds ) > 0 ?
568
+ CGRectGetWidth ( self.view .bounds ) :
569
569
[self getScreenBoundsForCurrentOrientation ].size .width ;
570
570
571
571
if (contentViewController.parentViewController .parentViewController == self) {
@@ -601,11 +601,11 @@ - (void)pushViewController:(UIViewController *)contentViewController
601
601
CGRect onscreenFrame = CGRectMake (newVC.layeredNavigationItem .currentViewPosition .x ,
602
602
newVC.layeredNavigationItem .currentViewPosition .y ,
603
603
width,
604
- self.view .bounds . size . height );
605
- CGRect offscreenFrame = CGRectMake (MAX (1024 , onscreenFrame. origin . x ),
604
+ CGRectGetHeight ( self.view .bounds ) );
605
+ CGRect offscreenFrame = CGRectMake (MAX (1024 , CGRectGetMinX ( onscreenFrame) ),
606
606
0 ,
607
- onscreenFrame. size . width ,
608
- onscreenFrame. size . height );
607
+ CGRectGetWidth ( onscreenFrame) ,
608
+ CGRectGetHeight ( onscreenFrame) );
609
609
newVC.view .frame = offscreenFrame;
610
610
611
611
[self .viewControllers addObject: newVC];
@@ -616,11 +616,11 @@ - (void)pushViewController:(UIViewController *)contentViewController
616
616
delay: 0
617
617
options: UIViewAnimationCurveEaseOut
618
618
animations: ^{
619
- CGFloat saved = [self savePlaceWanted: onscreenFrame.origin.x +width-overallWidth];
620
- newVC.view .frame = CGRectMake (onscreenFrame. origin . x - saved,
621
- onscreenFrame. origin . y ,
622
- onscreenFrame. size . width ,
623
- onscreenFrame. size . height );
619
+ CGFloat saved = [self savePlaceWanted: CGRectGetMinX ( onscreenFrame) +width-overallWidth];
620
+ newVC.view .frame = CGRectMake (CGRectGetMinX ( onscreenFrame) - saved,
621
+ CGRectGetMinY ( onscreenFrame) ,
622
+ CGRectGetWidth ( onscreenFrame) ,
623
+ CGRectGetHeight ( onscreenFrame) );
624
624
newVC.layeredNavigationItem .currentViewPosition = newVC.view .frame .origin ;
625
625
626
626
}
0 commit comments