Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8861167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:25:59+00:00 2026-06-14T15:25:59+00:00

I have two buttons Add Images and Edit. from Add Images i m adding

  • 0

I have two buttons Add Images and Edit.
from Add Images i m adding multiple images from gallery and can move each imageview on view.
I have made an Draggable class to move each imageview.

@interface Draggable : UIImageView {
    AppDelegate *objectDelegate;
    CGPoint startLocation;
}

@property (nonatomic,retain) AppDelegate *objectDelegate;
@end

@implementation Draggable
@synthesize objectDelegate;

- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
    // Retrieve the touch point
    objectDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    CGPoint pt = [[touches anyObject] locationInView:self];
    startLocation = pt;
    [[self superview] bringSubviewToFront:self];
}
- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event {
    // Move relative to the original touch point
    CGPoint pt = [[touches anyObject] locationInView:self];
    CGRect frame = [self frame];
    frame.origin.x += pt.x - startLocation.x;
    frame.origin.y += pt.y - startLocation.y;
    [self setFrame:frame];
}
@end

and that how i added images.

UIImage* image = [[UIImage alloc] init];
image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
CGRect cellRectangle;
cellRectangle = CGRectMake(20 ,50,image.size.width/6 ,image.size.height/6 );

//[[self view] addSubview:blockView];
UIImageView *dragger = [[Draggable alloc] initWithFrame:cellRectangle];
[dragger setImage:image];
[dragger setUserInteractionEnabled:YES];

[self.view addSubview:dragger];

now on Edit button i want to edit that particular image to b selected on single touch. like i have 3 images picOne, picTwo and picThree. if i touch picTwo and click Edit i want picTwo to edit (open aviary editor).

What i did to do that i have added this line on Draggable touches begin

UITouch *touch = [touches anyObject];

    if ([touch view] == objectDelegate.selectedImageViewFromCanvas)
    {
        // selestecImageViewFromCanvas is UiImageView.
        NSLog(@"dragger");
    }

But that statement is always false.
I hope everyone get it what i want. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:26:02+00:00Added an answer on June 14, 2026 at 3:26 pm

    Thanks Arpit . i have used gesture recognizer link . i have edit this code. on imagepicker i have set tag on UiView (holderview) and UIImageView (imageview) and when i tap on image then i can get tag value of that holder [sender view].tag . and from that tag i am getting that UIImageView tag like [sender view].tag + 1 ( coz if my holderView tag is 101 than my UIImage tag is 102. )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two ListBoxes, lstAvailableColors and lstSelectedColors. Between each listbox are two buttons, Add
I have been developing an Android RSS news reader.I want to add two buttons
I have two buttons, which the user can click and will open a FileDiagloag
I have a UITableView and i programatically add two buttons to the cell. 1
I have two g:select comboboxes that I want to add to the multiple select
Can anyone help me with the code please. I have two images 1.jpg and
I have made one screen with two images and I would like to add
I have two validation groups: parent and child I have an add button that
I have two buttons that moves a movieclip up/down the Y-axis. How do I
I have two buttons, one for start recording and another for stop recording. i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.