zedoul/ZDStickerView

Resizing

Closed this issue · 2 comments

I have set the property userResizableView1.preventsPositionOutsideSuperview = YES; but when i resize it, it grows even more and more bigger then its parent view, and when i lift up the finger then, It gets stuck because it gets too much bigger then the parent view so doesnt move, resize or rotate anymore. Please find the attached image, the pink View is its parentView.
img_0827

Btw I must say very nice work done and it is proving to be very useful for me. 👍

Solved this problem by globally storing my parentView's width and height and then putting this condition in resizing before changing the bounds

if (((self.bounds.size.width + (wChange)) < (parentViewWidth - (parentViewWidth/4))) && ((self.bounds.size.height + (hChange)) < (parentViewHeight - (parentViewHeight/4))))