@@ -232,13 +232,9 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth
232232 _viewText.textAlignment = NSTextAlignmentCenter;
233233 _viewText.font = [UIFont fontWithName: _bodyTextFontFamily size: _bodyFontSize];
234234 _viewText.frame = CGRectMake (12 .0f , _subTitleY, _windowWidth - 24 .0f , _subTitleHeight);
235-
236- if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO (@" 7.0" ))
237- {
238- _viewText.textContainerInset = UIEdgeInsetsZero;
239- _viewText.textContainer .lineFragmentPadding = 0 ;
240- self.automaticallyAdjustsScrollViewInsets = NO ;
241- }
235+ _viewText.textContainerInset = UIEdgeInsetsZero;
236+ _viewText.textContainer .lineFragmentPadding = 0 ;
237+ self.automaticallyAdjustsScrollViewInsets = NO ;
242238
243239 // Content View
244240 _contentView.backgroundColor = [UIColor whiteColor ];
@@ -308,14 +304,6 @@ - (void)viewWillLayoutSubviews
308304 sz = _rootViewController.view .frame .size ;
309305 }
310306
311- if (SYSTEM_VERSION_LESS_THAN (@" 8.0" )) {
312- // iOS versions before 7.0 did not switch the width and height on device roration
313- if (UIInterfaceOrientationIsLandscape ([UIApplication sharedApplication ].statusBarOrientation )) {
314- CGSize ssz = sz;
315- sz = CGSizeMake (ssz.height , ssz.width );
316- }
317- }
318-
319307 // Set new main frame
320308 CGRect r;
321309 if (self.view .superview != nil ) {
@@ -1466,53 +1454,25 @@ - (void)fadeIn
14661454
14671455- (void )slideInFromTop
14681456{
1469- if (SYSTEM_VERSION_LESS_THAN (@" 7.0" ))
1470- {
1471- // From Frame
1472- CGRect frame = self.backgroundView .frame ;
1473- frame.origin .y = -self.backgroundView .frame .size .height ;
1474- self.view .frame = frame;
1457+ // From Frame
1458+ CGRect frame = self.backgroundView .frame ;
1459+ frame.origin .y = -self.backgroundView .frame .size .height ;
1460+ self.view .frame = frame;
1461+
1462+ [UIView animateWithDuration: 0 .5f delay: 0 .0f usingSpringWithDamping: 0 .6f initialSpringVelocity: 0 .5f options: 0 animations: ^{
1463+ self.backgroundView .alpha = self.backgroundOpacity ;
14751464
1476- [UIView animateWithDuration: 0 .3f animations: ^{
1477- self.backgroundView .alpha = self.backgroundOpacity ;
1478-
1479- // To Frame
1480- CGRect frame = self.backgroundView .frame ;
1481- frame.origin .y = 0 .0f ;
1482- self.view .frame = frame;
1483-
1484- self.view .alpha = 1 .0f ;
1485- } completion: ^(BOOL completed) {
1486- [UIView animateWithDuration: 0 .2f animations: ^{
1487- self.view .center = self.backgroundView .center ;
1488- } completion: ^(BOOL finished) {
1489- if ( self.showAnimationCompletionBlock ){
1490- self.showAnimationCompletionBlock ();
1491- }
1492- }];
1493- }];
1494- }
1495- else {
1496- // From Frame
1465+ // To Frame
14971466 CGRect frame = self.backgroundView .frame ;
1498- frame.origin .y = -self. backgroundView . frame . size . height ;
1467+ frame.origin .y = 0 . 0f ;
14991468 self.view .frame = frame;
15001469
1501- [UIView animateWithDuration: 0 .5f delay: 0 .0f usingSpringWithDamping: 0 .6f initialSpringVelocity: 0 .5f options: 0 animations: ^{
1502- self.backgroundView .alpha = self.backgroundOpacity ;
1503-
1504- // To Frame
1505- CGRect frame = self.backgroundView .frame ;
1506- frame.origin .y = 0 .0f ;
1507- self.view .frame = frame;
1508-
1509- self.view .alpha = 1 .0f ;
1510- } completion: ^(BOOL finished) {
1511- if ( self.showAnimationCompletionBlock ){
1512- self.showAnimationCompletionBlock ();
1513- }
1514- }];
1515- }
1470+ self.view .alpha = 1 .0f ;
1471+ } completion: ^(BOOL finished) {
1472+ if ( self.showAnimationCompletionBlock ){
1473+ self.showAnimationCompletionBlock ();
1474+ }
1475+ }];
15161476}
15171477
15181478- (void )slideInFromBottom
0 commit comments