美文网首页
Bug MJPhotoBrowser modification

Bug MJPhotoBrowser modification

作者: Levan_li | 来源:发表于2016-01-15 09:33 被阅读771次

    Using the MJPhotoBrowser, the inside of some of the bug and the solution is as follows
    SetProgress:] 1.-[MJPhotoLoadingView: sent to deallocated instance 0x17fe4210 message
    Analysis: This is due to the implementation of the MJPhotoView hide removed the MJPhotoLoadingView, however, SDWebimage is still in the implementation of the download progress settings.
    Solution: the most simple is to write a bool value, when the response to the hide that is in the- (VoidHide methodSet to YES, then in the

    • (VoidPhotoStartLoad method is modified as follows:
      If (! Hide) {
      Loading.progress = (float) receivedSize/expectedSize;
      }
      2 click on the small figure into the big picture mode and back to the small figure model will be flashing, the animation can not bear to look directly
      Analysis: This is the main contenMode of your original ImageView settings, note that if you are the original UIViewContentModeScaleAspectFill;
      Is MJPhotoView of the init also set the ER reset changed to UIViewContentModeScaleAspectFit, UIViewContentModeScaleToFill, if still flashing multi test several times contenMode
      If the project in a number of places to use MJPhotoBrowser, and the original contenModel Imageview is not the same, it is necessary to make their own judgments

    3 picture when the picture is too close to the bottom of the problem
    Solution: add the following code in the MJPhotoView

    • (void) scrollViewDidZoom: (UIScrollView *) scrollView {
      ImageViewFrame CGRect = _imageView.frame;
      ScreenBounds [UIScreen = mainScreen].bounds CGRect;
      If (screenBounds.size.height > imageViewFrame.size.height)
      {imageViewFrame.origin.y = 0.0F;}
      Else {imageViewFrame.origin.y = (imageViewFrame.size.height - screenBounds.size.height) / 2;}
      _imageView.frame = imageViewFrame;
      }

    The original address:http://prog3.com/sbdm/blog/woyangyi/article/details/47106403

    相关文章

      网友评论

          本文标题:Bug MJPhotoBrowser modification

          本文链接:https://www.haomeiwen.com/subject/tddhkttx.html