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 8065549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:42:04+00:00 2026-06-05T11:42:04+00:00

the question is… I have a parent view in which i drew a planimetry

  • 0

the question is…

I have a parent view in which i drew a planimetry composed by a lot of CGPaths.
Well, in this App, i can insert a subview to parent view in which there are drawn others CGPaths (like lines which represent a chair, for example). Now. I would replicate zoom effect like UITextView has got when someone Tap Down, hold Tap, and an hand-glass comes out with content scaled.

I would put a subview in which the background represents parent content clipped in subview rect and scaled of x2 for example. In this way, subview background seems an hand-glass on parent view.

How can i implement this ?

I thought about taking parent context, passing it to subview, and clipping parent context with rect subview. But nothing happens. I red about CGImageContext with witch taking an image representation about parent CGContext, and pass it to subview, but i dont know how implementing it. And, i dont know if it’s right way.

Hope someone can help me (with code sample would be awesome)!

Sorry for my english. I tried to do my best 🙂

  • 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-05T11:42:06+00:00Added an answer on June 5, 2026 at 11:42 am

    Question solved by myself!

    In subview drawrect: method i put this code:

    - (void)drawRect:(CGRect)rect {
      // here we're just doing some transforms on the view we're magnifying,
      // and rendering that view directly into this view.
      // By 'touchPoint' i can select the exact portion of superview which
      // i want render in subview
    
       CGContextRef context = UIGraphicsGetCurrentContext();
       CGContextTranslateCTM(context,1*(self.frame.size.width*0.5),1*(self.frame.size.height*0.5));
       CGContextScaleCTM(context, 1.5, 1.5);
       CGContextTranslateCTM(context,-1*(touchPoint.x),-1*(touchPoint.y));
       [self.superview.layer renderInContext:context];
    }
    

    Hope this can help someone else 🙂

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

Sidebar

Related Questions

Question: How can I detect which rows have lastModifiedDate < boundary at 30s/minute <
Question 1) I have a control to which I add an attribute from the
Question should be self explanatory. I have a datagridview which has a column whose
Question: Have I got this example backwards? Is the reason to return Interface so
Question : Can anyone tell me why my unit test is failing with this
Question I have two compilers on my hardware C++ and C89 I'm thinking about
Question slightly in the abstract... We have a situation where we have a struct
Question: How can I document Ruby code using Doxygen? Disclaimer: I know ruby already
Question Implement a function bool chainable(vector<string> v) , which takes a set of strings
Question I'm creating a service for my app, but there's probably pritty simple thing

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.