5

I have faced a problem while testing my app, everything was perfectly running until I turn on the personal hotspot and the blue bar is appear on the top, all the labels and buttons are moved downward:

enter image description here

Edit: (23-4-2013)

The code of viewDidLoad is:

- (void)viewDidLoad
{
    day1Times = [[NSMutableArray alloc] init];
    day2Times = [[NSMutableArray alloc] init];
    day3Times = [[NSMutableArray alloc] init];
    day4Times = [[NSMutableArray alloc] init];
    day5Times = [[NSMutableArray alloc] init];
    day6Times = [[NSMutableArray alloc] init];
    day7Times = [[NSMutableArray alloc] init];
    [self performSelector:@selector(sendTokenIDSelector) withObject:nil afterDelay:0.1];
    [self performSelectorInBackground:@selector(getTimes) withObject:nil];
    [super viewDidLoad];

}

Edit: (24-4-2013)

The constraints configuration is as following:

enter image description here

How can I fix their location and keep making it not move regardless of the status bar?

Gabriel.Massana
  • 7,917
  • 6
  • 56
  • 79

1 Answers1

1

The problem is due to your views autoresizing mask.You should hook them to the edges so that they won't stretch when the notification occurs.

Open the size inspector using Tools -> Size Inspector or Command+3.

Make sure the strut for the top margin is enabled (indicated by the solid red lines). Thus you can make sure to have the constant margin even when the superview changes.

RJR
  • 1,052
  • 2
  • 9
  • 20