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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:55:03+00:00 2026-06-05T02:55:03+00:00

How can I refresh my views of UIViewController after I resize it? I need

  • 0

How can I refresh my views of UIViewController after I resize it? I need a method similar to reloadData in UITableViewController.

Are there other possibility to resize views of UIViewController without reload?

My code is:

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    orientation = toInterfaceOrientation;
    if(orientation==3 || orientation==4)
    {
        heightBoxDimension1 = [GlobalData sharedGlobalData].heightLandscape;
        widthBoxDimension1 = [GlobalData sharedGlobalData].widthLandscapeBig;
        widthBoxDimension2 = [GlobalData sharedGlobalData].widthLandscapeSmall;
    }
    else 
    {
        heightBoxDimension1 = [GlobalData sharedGlobalData].heightPortrait;
        widthBoxDimension1 = [GlobalData sharedGlobalData].widthPortraitBig;
        widthBoxDimension2 = [GlobalData sharedGlobalData].widthPortraitSmall;
    }
    for(UIView* view in self.view.subviews)
    {
        NSLog(@"%.0f %.0f %.0f %.0f ", view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height);
        if(view.frame.size.width >400)
        {
            [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, widthBoxDimension1, heightBoxDimension1)];
            NSLog(@"%.0f %.0f %.0f %.0f ", view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height);
        }
        else
        {
            [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, widthBoxDimension2, heightBoxDimension1)]; 
            NSLog(@"%.0f %.0f %.0f %.0f ", view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height);
        }
    }
    [self.view setNeedsDisplay];

}

I have a class of global variables, where i put the static dimensions of views, i have two type of view, with the same height but different width. when turn the simulator enter for this method but after change the frame of views, don´t reload these views…

The output of console is:

2012-06-05 10:53:09.309 TemplateiPad2[12561:207] 8 8 752 318 
2012-06-05 10:53:09.309 TemplateiPad2[12561:207] 8 8 752 446 
2012-06-05 10:53:09.309 TemplateiPad2[12561:207] 8 334 372 318 
2012-06-05 10:53:09.309 TemplateiPad2[12561:207] 8 334 372 446 

Do good the re-frame but don´t reload.

  • 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-05T02:55:05+00:00Added an answer on June 5, 2026 at 2:55 am

    Try

    [self.view setNeedsDisplay];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I refresh a view within a controller method calling redirect (or equivalent)?
I can refresh any non-CoreData loaded tableView by calling [nameoftableView reloadData]; But when I
How can I refresh a page automatically after a given time period with a
How can I get the number of views of ViewFlipper ? I need to
Possible Duplicate: SQL Server UDF refresh The system stored procedure sp_refreshview can be used
How can i refresh the Crystal Reports' report data with C# as desktop application.
How can I programmatically refresh Visual Studio Solution Explorer? I can get a hold
How can I clear or refresh the page in the browser using javascript? I
Brief question What command can I use to make my DataSet refresh it's connection
I am developing a website, where I need to track number of views for

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.