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

  • Home
  • SEARCH
  • 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 9171653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:11:32+00:00 2026-06-17T16:11:32+00:00

** i have two image views one for background and one for foreground and

  • 0

** i have two image views one for background and one for foreground and i am drawing on foreground imageview.for the erase functionality i am doing this because i do not want to erase background image at the time of erase.its doing fine.now i want to save that image(background + foreground) and i need to sand that by mail.it is possible? **

    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

    if (doodlemode==YES){

    UITouch *touch = [touches anyObject];

    previousPoint2 = previousPoint1;
    previousPoint1 = [touch previousLocationInView:self.view];
    currentPoint = [touch locationInView:self.view];


    // calculate mid point
    CGPoint mid1 = midPoint(previousPoint1, previousPoint2);
    CGPoint mid2 = midPoint(currentPoint, previousPoint1);

    UIGraphicsBeginImageContext(imageDoodle.frame.size);

    CGContextRef context = UIGraphicsGetCurrentContext();


     [imgView.image drawInRect:CGRectMake(0, 0, imageDoodle.frame.size.width,      

     imageDoodle.frame.size.height)];

    CGContextMoveToPoint(context, mid1.x, mid1.y);

    CGContextAddQuadCurveToPoint(context, previousPoint1.x, previousPoint1.y, mid2.x, mid2.y);

    CGContextSetLineCap(context, kCGLineCapRound);

    [imgView.layer renderInContext:UIGraphicsGetCurrentContext()];

    //this is for erase
    if(IsErase)
    {
    CGContextSetBlendMode(context,kCGBlendModeClear);
    }
    //make a strok color
    else
    {
    CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), redvalue, greenvalue, bluevalue,  

    1.0);
    }

    CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 8.0);
    //size of stroke

    CGContextStrokePath(UIGraphicsGetCurrentContext());


    imgView.image = UIGraphicsGetImageFromCurrentImageContext();


     UIGraphicsEndImageContext();

    }

 }
   -(IBAction)sharePrint{
    //Compose email with activity sheet attached

     MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];

     picker.mailComposeDelegate = self;

    [UIImage imageNamed:@"feedback.png"]]];

    *//here i nedd to sand that. Image  how can i?*

     NSData *imageData = UIImagePNGRepresentation(imgView.image);

    [picker addAttachmentData:imageData mimeType:@"image/png" fileName:@"shared.png"];

     //Show Mail view with composed email

    [self presentModalViewController:picker animated:YES];

     }
  • 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-17T16:11:33+00:00Added an answer on June 17, 2026 at 4:11 pm
    
    - (void) someMethod {
        UIImage *newImage = [self captureScreen];
        IBbtn1.hidden = FALSE;
        IBbtn2.hidden = FALSE;
    }
    
    - (UIImage *) captureScreen { 
    
        IBbtn1.hidden = TRUE;
        IBbtn2.hidden = TRUE;
    
        CGRect rect = [wrapperView bounds]; 
        UIGraphicsBeginImageContext(rect.size); 
        CGContextRef context = UIGraphicsGetCurrentContext(); 
        [wrapperView.layer renderInContext:context];
        UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); 
        UIGraphicsEndImageContext(); 
        return img; 
    }
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have two views and one viewcontroller: one contains UIImageView with image, second have
I have two ImageViews, one called imageView and the other called subView (which is
In my xml file, I have declared two imageview and later I add image
I want to have fade-in, fade-out effect for two image views I have two
I have two image views, which I am trying to put into a vertical
I have this code to center an image between two horizontal lines. CSS: .line-scale-left
i have two image views which translates on click. the animation works properly for
i have 20 imageviews with background image set. When user clicks on one image
I have Two Image Views Defined in Xml. I want to Change the Position
I have two views: the first one is a UITableView in plain style (created

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.