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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:35:46+00:00 2026-06-17T09:35:46+00:00

This is an inherited code, I would like to change as few as possible,

  • 0

This is an inherited code, I would like to change as few as possible, just give support for iphone5 (taler) screen size.

Somewhere I have a code like this:

[self.view addSubview:leftSwipedViewController.view];

The problem is: the parent UIViewController has filled out the 480×2 -> 568×2 zone ( difference between iphone4 and iphone5) the new swiped UIController will fill the 0->480×2 height zone. I would like to clear the remain space with a nice white color. How to do it?

something like [self.view clearRectangle(0,568-480,320,568, color.white)]; but this function doesn’t exist as is.

Is there any better, fast solution? – I don’t want to create a xib file for a code where the component are place from within code to X, Y coordinates.

  • 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-17T09:35:47+00:00Added an answer on June 17, 2026 at 9:35 am

    Yes, it’s very simple actually

    Right before adding your view, do this:

    UIView *whiteView = [[UIView alloc] initWithFrame:self.view.bounds];
    whiteView.tag = 123; // you'll need it if you want to remove it later.
    whiteView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:whiteView];
    
    [self.view addSubview:leftSwipedViewController.view];
    

    When you want to remove it, do this:

    [[self.view viewWithTag:123] removeFromSuperview];
    

    However, the correct approach would be to make your leftSwipedViewController support both heights

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

Sidebar

Related Questions

Warning: This is inherited legacy code that was initially put together in the early
I have this Javascript code I inherited from another developer. I am very new
I've inherited some python code that contains a rather cryptic decorator. This decorator sets
I create a custom control inherited from Windows.System.Forms.Controls. This is my code of this
Is there a better way of writing this code? It just doesn't sit right
I just inherited some code which makes me uneasy: There is a testing library,
I just inherited a Java application and upon inspection of the code, I'm seeing
This is the fragment of code inserted with ajax: <form> <label for = task-name>Name</label>
I have a small dynamic site implemented in mod_python . I inherited this, and
this is my inherited class of UIView : MobileView @interface MobileView : UIView {

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.