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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:25:22+00:00 2026-06-15T10:25:22+00:00

I am trying to create a box that pops up in my xcode app

  • 0

I am trying to create a box that pops up in my xcode app that just displays an image of that size. I have the following

UIImageView *newView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"beach.jpg"]];

but this creates the full size image and just shows it. How would I only show it as 100w by 100h at 50 over and 200 down? Would I use CGRect?

Also, can I make it so that clicking it causes it to disappear?

edit #1
I don’t want to resize down the image – would rather just pull the 100 squared pixels and place them in a frame.

  • 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-15T10:25:23+00:00Added an answer on June 15, 2026 at 10:25 am

    Please try using the following code.

    MyImageview.contentMode = UIViewContentModeScaleAspectFill; 
    MyImageview.clipsToBounds = YES;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying create a box in my Django app that displays text (and possibly
I am trying to create a custom dialog box that displays an image in
I am trying to create a list box that displays a set of data
Trying to create a box that contains sentences (with spaces) and can have a
I'm trying to create a box on the side of a page that displays
I'm trying to create simple combo box for my app. I've read the following
I'm trying to create a dropdown box that will render a label under certain
I'm trying to create a flexible box layout that fills the entire viewport, and
I'm trying to create a class that manages the events of a combo box
I'm trying to create a 'search box' that matches users by name. The difficulty

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.