Install a different view is incorrectly configured
I got an idea and set an anchor. When I add to my mind. They work on the iPhone 5, but they show some headroom on the iPhone 6 and 6 Plus.
@property (strong, nonatomic) IBOutlet UIView *vwTop;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
top= [[NexaTopView alloc]initWithNibName:@"NexaTopView" bundle:nil];
bottom=[[NexaBottomViewViewController alloc]initWithNibName:@"NexaBottomViewViewController" bundle:nil];
[self.vwTop addSubview:top.view];
[self.bottomView addSubview:bottom.view];
[top.txtHeader setText:@"Notifications"];
top.txtHeader.textAlignment=NSTextAlignmentCenter;
}
![enter image description here][1]
but they show margin, please help me newer! [enter image description here] [2] in ios.
+3
source to share
2 answers
The problem with margins can be automatic layout. so go to it and do it. for auto layout .... http://www.raywenderlich.com/83276/beginning-adaptive-layout-tutorial http://www.appcoda.com/introduction-auto-layout/
0
source to share