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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:47:22+00:00 2026-06-12T15:47:22+00:00

My app’s requirement is that it needs to take a picture and then divide

  • 0

My app’s requirement is that it needs to take a picture and then divide it into pieces. Say for example there are 8 rows and eight columns. I might name the rows to A through H while i might name the colums to be from 1 through 8. Suppose the user after clicking the picture were to select A1, the code should be able to zoom A1 and provide him with options to do a couple of things like placing some symbols or marking a few things from the available options. How do i achive the 1)splitting 2)zooming 3)providing various symbols to the user in the form of small logos ? I am quite new to iphone programming and found out that there exists a class called UIImagePickerController to help you with that but i do not know how to achieve 1,2 and 3. Please help me.

  • 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-12T15:47:24+00:00Added an answer on June 12, 2026 at 3:47 pm

    Well, for dividing image into pieces you should use the following code (place it in UIImage category):

    - (UIImage *)imageCroppedWithRect:(CGRect)rect
    {
        if (self.scale > 1.0f) {
            rect = CGRectMake(rect.origin.x * self.scale,
                              rect.origin.y * self.scale,
                              rect.size.width * self.scale,
                              rect.size.height * self.scale);
        }
    
        CGImageRef imageRef = CGImageCreateWithImageInRect(self.CGImage, rect);
        UIImage *result = [UIImage imageWithCGImage:imageRef scale:self.scale orientation:self.imageOrientation];
        CGImageRelease(imageRef);
        return result;
    }
    

    Now you’ll have some images and should create appropriate amount of UIImageViews with those images. Then depending of how you want to let the user zoom it add UITapGestureRecognizer, e.q.. For zooming you could add hidden UIImageView and when the piece is tapped use the following code:

    - (void)pieceTapped:(UITapGestureRecognizer *)recognizer
    {
        UIImageView *piece = recognizer.view;
        self.zoomedImageView.frame = piece.frame;
        self.zoomedImageView.image = piece.image;
        self.zoomedImageView.hidden = NO;
        [UIView animationWithDuration:0.3 animation:^{
            self.zoomedImageView.frame = self.view.frame;
        }];
    }
    

    And now you should only place your symbols to that image. But how you want to do that? Drag & drop image from somewhere or automatically? Place symbols to the image permanently or just place over it?

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

Sidebar

Related Questions

My app(arc, ios5) sometimes will crash after I take a photo and save to
App Engine Datastore cannot be queried for an aggregate result. Example: I have an
The app in question is already localized into a few languages, but I'm adding
app.rb: require 'sinatra' class MyApp < Sinatra::Application enable :sessions if session[:user_id].nil? then erb :login
App crashes after execution of cellForRowAtIndexPath method of tableView It goes into: UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:]
app.use(express.compiler({ src: __dirname + '/public', enable: ['less'] })); That's the line in my app.js
App store approval guideline says that Apps that send Push Notifications without first obtaining
app.get(/:name?/:group?, function(req, res){... is matching files that are in my public directory. So if
My app connects to a Bluetooth sensor then starts updating the UI based on
My app needs to be able to disconnect from a server and connect to

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.