#define SINGLE_LINE_WIDTH (1/[UIScreen mainScreen].scale)
#define SINGLE_LINE_ADJUST_OFFSET ((1/[UIScreen mainScreen].scale)/2)
- (void)viewDidLoad {
[super
viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
CGFloat xPos =
100;
UIView *view = [[UIView
alloc] initWithFrame:CGRectMake(xPos -
SINGLE_LINE_ADJUST_OFFSET, 35,
SINGLE_LINE_WIDTH, 330)];
view.backgroundColor = [UIColor
blackColor];
[self.view
addSubview:view];
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-12-22 11:39:24