preventsPositionOutsideSuperview = YES restricts the view unexpectedly
Closed this issue · 5 comments
Here is my code
CGRect frame = CGRectMake(50, self.wineLabelImageView.frame.origin.y+10, 100, 50);
UITextView *textView = [[UITextView alloc] initWithFrame:frame];
textView.text = @"Sample Text";
textView.backgroundColor = [UIColor clearColor];
textView.editable = NO;
textView.delegate = self;
textView.textColor = [UIColor greenColor];
ZDStickerView *userResizableView = [[ZDStickerView alloc] initWithFrame:frame];
userResizableView.tag = 1;
userResizableView.delegate = self;
userResizableView.contentView = textView;
userResizableView.preventsPositionOutsideSuperview = YES;
userResizableView.preventsCustomButton = NO;
[userResizableView setButton:ZDSTICKERVIEW_BUTTON_CUSTOM
image:[UIImage imageNamed:@"Write.png"]];
userResizableView.preventsResizing = NO;
[userResizableView hideEditingHandles];
[self.containerView addSubview:userResizableView];
But when I try to drag the ZDStickerView within my containerView (white colored) , it restricts the ZDStickerView before the actual boundary of container view as shown in below screenshots
Can you tell me whats going wrong in my code ?
I am sorry not to give you a instant answer. Now I am busy due to prepare my examination, so I will take care this issue after next friday. Thank you very much for report the issue :)
Did you get chance to look at the above issue ?
No, sorry. But I will check it tonight as yesterday was the last day of my examination :)
Any update on above issue ?
It is fixed. Although I am not sure the fix also is going to fix your problem as well.
Apart from that, I would say I am so sorry since I know it is too late to reply this question. Let me explain, at that time I was under very hard time since I just moved to new country and struggled to survive.