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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:49:57+00:00 2026-05-27T11:49:57+00:00

I have defined a UIView in the header file named rectangle0 I got a

  • 0

enter image description hereI have defined a UIView in the header file named rectangle0

I got a question in regards to IB vs coding a view. Please see the following code example:

rectangle0.frame = CGRectMake(0.0, 70.0, 320.0, 190.0);

Now I can re-create the look of the view easy enough in IB except for the coordinates which are greyed out.

So by calling this code in an IBAction after designing the UIView in IB I can display in the app.

[self.view addSubview:rectangle0];

Now the last line of code will call this view to appear at the set coordinates if I code it – but if I build in interface builder I can make it look exactly the same, but it appears from Y coordinate 20 (just under the status bar) and I can’t set the coordinate upon calling it – is there a way to do this??

The UIView is being build outside of the ViewController and then linked to it in the connections inspector.

cheers Jeff

I have added an image to show what screen I am using – as you can see the x and y coordinates are greyed out, it would be great if I can set those to something else.

  • 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-27T11:49:58+00:00Added an answer on May 27, 2026 at 11:49 am

    A view inside the NIB is just an object like any other. It is made to be reusable and I believe that is the key point that resulted in the coordinates being greyed out.

    Greying out the position makes the developer worry about where is the view going to be placed. I say that because the position is pretty dependent on the container that your view object is going to be added to.

    Although it is just my personal opinion and I am looking forward to hearing if there is indeed a way to do that.

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

Sidebar

Related Questions

I have defined a config section in my app.config in the following way: <?xml
I have defined a local mirror for all repositories in the settings.xml file: <mirror>
I have tried to cast an implementation of my UIView class to my view
please help me to resolve this issue i have a view controller in a
I have created a UIView object using the contents of a NIB file like
I have a UITableView tableHeaderView defined in a nib file. The tableHeaderView contains a
I have a collection of classes defined from UIView. @interface { UIView *thisView UIView
I have a tableview with custom section headers. The view for the section header
I have defined following in a ResourceDictionary: <DockPanel x:Key=errorDisplay LastChildFill=False> <Border Background=Red DockPanel.Dock=Top> <TextBlock
I have defined a custom Sharepoint list for special attributes related to a software

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.