Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing orientation for iOS 6.

  • Loading branch information...
commit b5b52dd79a4cd8c8404f166bcf6332a678d27f20 1 parent bce93b2
@ctrompette ctrompette authored
View
8 Classes/Capture/NewNoteController.m
@@ -200,6 +200,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self save:!self.showKeyboardOnLoad];
View
8 Classes/Capture/NoteListController.m
@@ -163,6 +163,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
#pragma mark Table view methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
View
2  Classes/MobileOrgAppDelegate.m
@@ -62,7 +62,7 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application {
self.searchNavigationController.tabBarItem.image = [UIImage imageNamed:@"search.png"];
self.settingsNavigationController.tabBarItem.image = [UIImage imageNamed:@"settings.png"];
- [window addSubview:[[self tabBarController] view]];
+ [window setRootViewController:[self tabBarController]];
[self.noteListController updateNoteCount];
View
8 Classes/Outline/ActionMenuController.m
@@ -283,6 +283,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
8 Classes/Outline/DetailsViewController.m
@@ -263,6 +263,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
9 Classes/Outline/DocumentViewController.m
@@ -178,6 +178,15 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
8 Classes/Outline/NodeTextEditController.m
@@ -237,6 +237,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
View
8 Classes/Outline/OutlineViewController.m
@@ -428,6 +428,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
8 Classes/Outline/PriorityEditController.m
@@ -81,6 +81,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
8 Classes/Outline/TagEditController.m
@@ -172,6 +172,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
8 Classes/Outline/TodoStateEditController.m
@@ -118,6 +118,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
8 Classes/Search/SearchController.m
@@ -208,6 +208,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
28 Classes/Settings/SettingsController.m
@@ -72,6 +72,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
@@ -181,7 +189,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UISegmentedControl *modeSwitch;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
NSMutableArray *options = [[NSMutableArray alloc] initWithCapacity:2];
[options addObject:@"WebDAV"];
@@ -189,15 +197,21 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
modeSwitch = [[[UISegmentedControl alloc] initWithItems:options] autorelease];
+ /*
// TODO: Make this resize when the orientation changes
if (IsIpad())
modeSwitch.frame = CGRectMake(44, 0, 680, 48);
else
modeSwitch.frame = CGRectMake(9, 0, 302, 48);
-
+ */
+ //modeSwitch.frame = cell.;
+
+ modeSwitch.segmentedControlStyle = UISegmentedControlStylePlain;
+ modeSwitch.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
+
[options release];
-
- [cell addSubview:modeSwitch];
+ modeSwitch.frame = cell.contentView.bounds;
+ [cell.contentView addSubview:modeSwitch];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
} else {
@@ -636,6 +650,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
}
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+ if (indexPath.section == ServerModeGroup) {
+ cell.backgroundView.alpha = 0.0;
+ }
+}
+
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"SyncComplete"];
View
8 Classes/Status/StatusViewController.m
@@ -195,6 +195,14 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return YES;
}
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
View
7 MobileOrg-Info-AdHoc.plist
@@ -43,5 +43,12 @@
</array>
</dict>
</array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
</dict>
</plist>
View
7 MobileOrg-Info-Debug.plist
@@ -47,5 +47,12 @@
<string>MainWindow</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow-iPad</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
</dict>
</plist>
View
7 MobileOrg-Info.plist
@@ -43,5 +43,12 @@
</array>
</dict>
</array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
</dict>
</plist>
Please sign in to comment.
Something went wrong with that request. Please try again.