Hi ! thanks for awsome control. I am adding saveral of zdsticker view on one single uiview according to my project's requirement. when user will add secondview then 1st view's resize and delete control disabled. so, I want to set tap gesture - when user will again click on 1st view or any other added zdstickerview then resizecontrol and delete control will appear again on that view. (zdstickerview which click by user). How can i achive this ? need your help please. Actually i have tried it but it will hide control from only last edited zdstickerview. (means it will recognize only last edited control)
- (IBAction)btnScrollsub:(id)sender {
CGRect gripFrame1 = CGRectMake(150, 150, 140, 140);
_btnLeftbarButton.title=@"Apply";
self.navigationItem.hidesBackButton = false;
UIButton *button = (UIButton*)sender;
//TODO: ==Set image for subcategory Images==
if (button.tag == 0) {
NSLog(@"==%@",[arySubImagesarray objectAtIndex:0]);
_image= button.currentImage;
} else if (button.tag == 1) {
_image = button.currentImage;
} else if (button.tag == 2){
_image = button.currentImage;
}
//===========================================================
_imageView=[[UIImageView alloc]init];
_imageView.image=_image ;
_imageView.backgroundColor=[UIColor clearColor];
UIView* contentView = [[UIView alloc] initWithFrame:gripFrame1];
[contentView setBackgroundColor:[UIColor clearColor]];
[contentView addSubview:_imageView];
userResizableView1 = [[ZDStickerView alloc] initWithFrame:gripFrame1];
userResizableView1.tag = 0;
userResizableView1.stickerViewDelegate = self;
userResizableView1.contentView = contentView;//contentView;
contentView.backgroundColor=[UIColor clearColor];
userResizableView1.preventsPositionOutsideSuperview = YES;
userResizableView1.translucencySticker = NO;
userResizableView1.backgroundColor=[UIColor clearColor];
[userResizableView1 showEditingHandles];
[_vwBackup addSubview:userResizableView1];
[userResizableView1 bringSubviewToFront:_vwBackup];
and here is action when user click on apply button.
- (IBAction)btnLeftbarButton:(UIBarButtonItem *)sender {
NSString *str;
str= _btnLeftbarButton.title;
if ([str isEqual:@"Apply"]) {
for (int i = 0; i < userResizableView1.tag; i++) {
}
userResizableView1.userInteractionEnabled=NO;
userResizableView1.resizingControl.hidden=YES;
userResizableView1.deleteControl.hidden=YES;
userResizableView1.resizingControl.hidden=YES;
userResizableView1.borderView.hidden=YES;
}
else if (_vwRootView.hidden==NO && _menuView.hidden==YES && [str isEqual:@"Back"]) {
_vwRootView.hidden=YES;
_menuView.hidden=NO;
userResizableView1.userInteractionEnabled=NO;
userResizableView1.resizingControl.hidden=YES;
userResizableView1.deleteControl.hidden=YES;
userResizableView1.resizingControl.hidden=YES;
userResizableView1.borderView.hidden=YES;
}
else if (_menuView.hidden==NO || [str isEqualToString:@"Home"])
{
UIAlertController * alert= [UIAlertController
alertControllerWithTitle:@"Go to Home"
message:@"Are you sure you want to go to Home ?"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* yesButton = [UIAlertAction
actionWithTitle:@"Yes"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
//Handel your yes please button action here
[self dismissViewControllerAnimated:NO completion:nil];
}];
UIAlertAction* noButton = [UIAlertAction
actionWithTitle:@"No"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
[alert dismissViewControllerAnimated:YES completion:nil];
}];
[alert addAction:yesButton];
[alert addAction:noButton];
[self presentViewController:alert animated:YES completion:nil];
}
}
Here is my output. May be you can understand my intension from Image. wht i want to do .
Thank you for Help.