kevin-lyn / STPopupPreview

An alternative peek preview for non 3D Touch devices. Inspired by Instagram.
MIT License
202 stars 30 forks source link

Action Buttons and arrow not visible. #10

Open xor22h opened 6 years ago

xor22h commented 6 years ago

After compiling latest library 1.0.3 with latest xcode and do not longer see action buttons and arrow.

Tried to use xcode layout debugger and it responds that backgroundContentView size is 0,0 at position 0,0;

screen shot 2017-11-20 at 10 51 03 pm
xor22h commented 6 years ago

More findings:

(lldb) po backgroundContentView.subviews
<__NSArrayM 0x60400045da30>(
<STPopupPreviewArrowView: 0x7f98dabc1f00; frame = (165.5 94; 44 20); opaque = NO; animations = { opacity=<CASpringAnimation: 0x60800043f000>; }; layer = <CALayer: 0x608000622fc0>>,
<STPopupPreviewActionSheet: 0x7f98daba4ed0; frame = (0 0; 0 0); layer = <CALayer: 0x60800023b420>>
)

(lldb) po ((UIVisualEffectView*)_popupController.backgroundView).contentView.subviews
<__NSArray0 0x60400000c0e0>(

)

Changing backgroundContentView with ((UIVisualEffectView*)_popupController.backgroundView).contentView on two lines in STPopupPreviewRecognizer.m file solves a problem;