I ended my application in @ 1x version and created a lot of interface with code, which means:
and everything looks great. if i now use the app on the retina screen, obviously everything scales to @ 2x. I have some graphics that I developed with fireworks / photoshop and, of course, made versions of 2 versions that work fine. My problem is the standard interface elements as above.
Question: How do I go
- Is there a font in UILabel that has a 1px stroke in both resolutions but doubles the height and width by @ 2x?
- Having a UIView with a height of 1px (like a screen splitter) at both resolutions? The 2px lines at @ 2x are fine, but the id really rather has 1px heights - it just looks more elegant.
to create the separator view that I am currently using:
UIView *separatorLine = [[UIView alloc]initWithFrame:CGRectMake(0,200,320,1)];
[self.view addSubview:seperatorLine];
which works fine at @ 1x resolution, but gets increased to 2px height at @ 2x, instead of showing in @ 2x as:
seperatorLine.frame == (0,400,640,1)
How do I need to change such code to work with both permissions?
source
share