|
|
@@ -189,6 +189,21 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ [self handleScreenRotateFun];
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 屏幕旋转 图片偏移问题
|
|
|
+- (void)handleScreenRotateFun
|
|
|
+{
|
|
|
+ [_curScrollView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.left.mas_equalTo(0.0);
|
|
|
+ make.right.mas_equalTo(0.0);
|
|
|
+ make.top.mas_equalTo(0.0);
|
|
|
+ make.bottom.mas_equalTo(0.0);
|
|
|
+ }];
|
|
|
+
|
|
|
[_curScrollView.mainView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(0.0);
|
|
|
make.right.mas_equalTo(0.0);
|
|
|
@@ -196,10 +211,21 @@
|
|
|
make.bottom.mas_equalTo(0.0);
|
|
|
}];
|
|
|
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [self->_curScrollView adjustWhenControllerViewWillAppera];
|
|
|
+ KWeakSelf
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ //[self->_curScrollView adjustWhenControllerViewWillAppera];
|
|
|
+ [weakSelf handleScreenRotateSecondFun];
|
|
|
});
|
|
|
+}
|
|
|
+
|
|
|
+- (void)handleScreenRotateSecondFun
|
|
|
+{
|
|
|
+ NSInteger curIndex = _index;
|
|
|
+ HLog(@"curIndexcurIndex 222:%ld",curIndex)
|
|
|
|
|
|
+ [_curScrollView removeFromSuperview];
|
|
|
+ self.totalDataArr = _totalDataArr;
|
|
|
+ [self->_curScrollView makeScrollViewScrollToIndex:curIndex];
|
|
|
}
|
|
|
|
|
|
#pragma mark 横屏转竖屏
|
|
|
@@ -221,17 +247,7 @@
|
|
|
_editShareV.secretShareView.isPortraitType = _isPortraitType;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- [_curScrollView.mainView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.mas_equalTo(0.0);
|
|
|
- make.right.mas_equalTo(0.0);
|
|
|
- make.top.mas_equalTo(0.0);
|
|
|
- make.bottom.mas_equalTo(0.0);
|
|
|
- }];
|
|
|
-
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [self->_curScrollView adjustWhenControllerViewWillAppera];
|
|
|
- });
|
|
|
+ [self handleScreenRotateFun];
|
|
|
}
|
|
|
|
|
|
#pragma mark 用户点击分享
|
|
|
@@ -264,7 +280,7 @@
|
|
|
- (void)clearShareAboutViewFun
|
|
|
{
|
|
|
if(_editShareV.secretShareView){
|
|
|
- _editShareV.secretShareView = nil;
|
|
|
+ _editShareV.secretShareView = nil;
|
|
|
}
|
|
|
|
|
|
_editShareV = nil;
|
|
|
@@ -311,7 +327,15 @@
|
|
|
});
|
|
|
|
|
|
_curScrollView.itemDidScrollOperationBlock = ^(NSInteger currentIndex) {
|
|
|
- weakSelf.index = currentIndex;
|
|
|
+
|
|
|
+ //屏幕旋转 这里回调 而且值差几个
|
|
|
+ if(currentIndex + 1 == weakSelf.index
|
|
|
+ ||currentIndex -1 == weakSelf.index){
|
|
|
+ weakSelf.index = currentIndex;
|
|
|
+ }
|
|
|
+
|
|
|
+ HLog(@"curIndexcurIndex 1111:%ld --%ld",currentIndex,weakSelf.index)
|
|
|
+
|
|
|
[weakSelf setTitleLabelTextFunBy:currentIndex];
|
|
|
[weakSelf cycleScrollViewDidScrollToIndex:currentIndex];
|
|
|
};
|