Skip to content

图片放大后回到原大小,frame会改变 #15

@CaliosD

Description

@CaliosD

我给自己的一个imageview中添加了点击事件,代码如下:

    _imageViewer = [[XHImageViewer alloc] init];
    _imageViewer.disableTouchDismiss = NO;
    [_imageViewer showWithImageViews:@[_imgView] selectedView:(UIImageView *)tap.view]; 

运行之后发现,点击后图片正常放大,但再次点击后,图片并不能回到初始位置。
点击前:

(lldb) po _imgView
<UIImageView: 0x134d4b3e0; frame = (12 60; 150 150); opaque = NO; gestureRecognizers = <NSArray: 0x174250b30>; layer = <CALayer: 0x174425320>>

点击后:

(lldb) po _imgView
<UIImageView: 0x134d4b3e0; frame = (0 0; 150 150); opaque = NO; gestureRecognizers = <NSArray: 0x174250b30>; layer = <CALayer: 0x174425320>>

请问,是什么地方我设置的不对么?谢谢~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions