This repository has been archived by the owner on Mar 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
MetronomeController.m
60 lines (46 loc) · 1.69 KB
/
MetronomeController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// MetronomeViewController.m
// metronome
//
// Created by Evan Sheehan on 11/26/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "MetronomeViewController.h"
@implementation MetronomeViewController
@synthesize meterLabel;
@synthesize tempoLabel;
@synthesize pageScrollView, metronomeView, settingsView;
#pragma mark - View lifecycle
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
self.metronomeView =
self.settingsView = [self.storyboard instantiateViewControllerWithIdentifier:@"SettingsView"];
CGRect rect = self.pageScrollView.frame;
self.metronomeView.view.frame = CGRectMake(0, rect.size.height, rect.size.width, rect.size.height);
self.settingsView.view.frame = rect;
self.pageScrollView.pagingEnabled = YES;
self.pageScrollView.contentOffset = CGPointMake(0, rect.size.height);
self.pageScrollView.contentSize = CGSizeMake(rect.size.width, rect.size.height * 2);
self.pageScrollView.showsVerticalScrollIndicator = NO;
[self.pageScrollView addSubview:self.settingsView.view];
[self.pageScrollView addSubview:self.metronomeView.view];
[super viewDidLoad];
}
- (void)viewDidUnload
{
[self setPageScrollView:nil];
[self setMeterLabel:nil];
[self setTempoLabel:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (IBAction)start:(id)sender {
}
@end