|
@@ -72,14 +72,19 @@ static char * const kTableCellKVOKey = "kTableCellKVOKey";
|
|
|
@implementation ViewController
|
|
|
|
|
|
- (void)viewDidLoad {
|
|
|
+ BOOL bug = YES;
|
|
|
[super viewDidLoad];
|
|
|
|
|
|
- self.navigationItem.titleView = [UISwitch new];
|
|
|
+ self.navigationItem.title = bug ? @"Bug" : @"No Bug";
|
|
|
[self.view addSubview:self.scrollView];
|
|
|
[self.scrollView addSubview:self.stackView];
|
|
|
|
|
|
[self.scrollView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = true;
|
|
|
- [self.scrollView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = true;
|
|
|
+ if (bug) {
|
|
|
+ [self.scrollView.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = true;
|
|
|
+ } else {
|
|
|
+ [self.scrollView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = true;
|
|
|
+ }
|
|
|
[self.scrollView.rightAnchor constraintEqualToAnchor:self.view.rightAnchor].active = true;
|
|
|
[self.scrollView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = true;
|
|
|
|