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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:17:11+00:00 2026-05-26T05:17:11+00:00

I am beginner in iPhone development and have a problem with UINavigationControoler in my

  • 0

I am beginner in iPhone development and have a problem with UINavigationControoler in my app.

I have a list of images from main application bundle in UITableView (with thumbnails), and when image is selected, UIScrollView view is pushed to navigation controller. The problem occurs during push transition animation when I am using large images (e.g. the ones taken with iPhone camera). It is not smooth (low framerate) so I am wondering what the problem is (+there is not problem with pop transition). Here is my code snippet from the image view:

- (void)loadView 
{
    //consider loading in seperate thread?
    //[NSThread detachNewThreadSelector:@selector(loadImage:) toTarget:self withObject:[photo URL]];

    UIImage *image = [UIImage imageNamed :[photo URL]];
    imageView = [[UIImageView alloc] initWithImage:image];

    UINavigationController *navController = [self navigationController];

    //get navigation controller view frame
    CGRect scrollViewSize = self.navigationController.view.frame;

    //take navigation bar height into account for scroll view size
    if(![navController isNavigationBarHidden]) {
        scrollViewSize.size.height -= [[navController navigationBar] frame].size.height;
    } 

    //take status bar height into account for scroll view size}
    UIApplication *sharedApp = [UIApplication sharedApplication];
    if(![sharedApp isStatusBarHidden]) {
        scrollViewSize.size.height -= [sharedApp statusBarFrame].size.height;
    }

    //calculate minimum zoom scale
    CGSize screenSize = scrollViewSize.size;
    CGFloat widthRatio = screenSize.width / image.size.width;
    CGFloat heightRatio = screenSize.height / image.size.height;
    CGFloat initialZoom = (widthRatio > heightRatio) ? heightRatio : widthRatio;

    //init scroll view
    scrollView = [[PhotoScrollView alloc] initWithFrame:scrollViewSize];
    [scrollView setMaximumZoomScale:1.0];
    [scrollView setMinimumZoomScale:initialZoom];
    [scrollView setBouncesZoom:YES];
    [scrollView setContentSize :[image size]];
    [scrollView setScrollEnabled :YES];
    [scrollView setDelegate: self];

    //imageView has to be added to scrollView in order for setZoomScale to work
    [scrollView addSubview :imageView];

    [scrollView setZoomScale:initialZoom];

    imageDescription = [[UILabel alloc] initWithFrame:CGRectMake(0, (screenSize.height/2)-20, screenSize.width, 40)];
    [imageDescription setText:[[self photo] getDetails]];
    [imageDescription setFont:[UIFont systemFontOfSize:20]];
    [imageDescription setTextAlignment:UITextAlignmentCenter];
    [imageDescription setBackgroundColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.5]];
    [imageDescription setAlpha:0];

    [image release];
    [super loadView];
}

- (void)viewDidLoad
{
    [self.view addSubview :scrollView];
    [self.view addSubview:imageDescription];
    [super viewDidLoad];
}

I already tried loading image in seperate thread ([NSThread detachNewThreadSelector:@selector(loadImage:) toTarget:self withObject:[photo URL]]) but it does not help. Would I have to resize image? Also I wonder how is the default iPhone app Photos written, because it has similar functionality, but the image is blurred during transition.

  • 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-05-26T05:17:12+00:00Added an answer on May 26, 2026 at 5:17 am

    Keep in mind that using images taken with the camera take up a significant amount of memory. Take the Photos.app on iPhone. They never actually display back to you the original photo. They take a number of sized images and depending on the scale factor (ie. how zoomed in you are), they introduce a higher res photo. But zooming all the way in will still not get you at the same resolution as the original image because of this very reason: performance.

    I highly suggest watching this WWDC 2010 video that goes over this concept and will greatly enhance the performance of your application.

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

Sidebar

Related Questions

I'm beginner in Iphone development. I have an app in which there is a
I am the beginner in iphone development. I develop an application in which i
I m the beginner in iphone software development. I developing the application on skin
A quick question from a beginner. I'm doing an App for the iPhone and
I am starting iPhone Development, I have already made 1 app with c and
Greetings! as a beginner in iPhone application development using Objective-C, I was wondering what
I am beginner in iPhone development. I want to parse xml webservice in UITableView
I am a beginner to iPhone App development. Please help me out. In my
I am a beginner in iPhone Development. I have an object of MPMoviePlayerController which
I'm a beginner with Objective C and iPhone development. It's there any way 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.