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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:38:01+00:00 2026-06-02T07:38:01+00:00

i have finished my app in a @1x version and have created a lot

  • 0

i have finished my app in a @1x version and have created a lot of the interface with code, meaning:

  • UILabels
  • UIViews

and all looks great. if i now use the app on a retina display obviously everything scales up to @2x. I have some graphics that i designed with fireworks/photoshop and of course have made @2x versions of them that work just fine. My problem are the standard interface elements as noted above.

Question: How would i go about

  • Having a font in a UILabel that has a 1px stroke on both resolutions, but double the hight and width on @2x ?
  • Having a UIView with height 1px (as separator of the screen) on both resolutions? 2px lines on @2x are ok, but id really rather have them 1px of hight – looks just more elegant.

for creating a separator view i currently use:

UIView *separatorLine = [[UIView alloc]initWithFrame:CGRectMake(0,200,320,1)];
[self.view addSubview:seperatorLine];

which works fine on @1x resolution but gets blown up to 2px height in @2x, instead of showing in the @2x as:

seperatorLine.frame == (0,400,640,1)

how would i need to change such a code to work on both resolutions?

  • 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-02T07:38:03+00:00Added an answer on June 2, 2026 at 7:38 am

    You can check for the screen scale by

    CGFloat scale = ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] ? [UIScreen mainScreen].scale : 1.0);
    

    If the scale equals 2.0 you are on a retina display and can change the frame of the separator, for example, to CGRectMake(0.0, 200.0, 320.0, 0.5).

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

Sidebar

Related Questions

I have finished developing my app and now I want to deploy it.. what
I have succesfully finished testing my app on iphone by AdHoc Distrubution and now
I just have finished a PhoneGap app on iOS, now it's time to port
I have now finished my facebook app and it works, But, when a user
I have just finished developing an iPhone app and now I wish to make
I have finished the development of my app which uses Google Maps. During the
I have a .Net (C#) app that uses Sql Express. Development is finished, and
i have already finished code to passing data to url , and it did
I have nearly finished my app but still have to make sure landscape orientations
As i have finished my iOS App and was removing the memory leaks, I

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.