Closed minddust closed 11 years ago
Sorry, I don't really understand your issue. Can you add insets on top of your menu to compensate the 20px?
the main content starts beneath the status bar but the menu don't. you can see it on the scrollbar.
found a hacky solution... don't feel comfortable with that and dunno about side effects but works for now.
// REFrostedViewController
- (void)commonInit
{
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
{
self.wantsFullScreenLayout = YES;
}
// ...
}
and..
// AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...
[self.window makeKeyAndVisible];
CGRect frame = self.window.rootViewController.view.frame;
frame.origin.y = 0;
self.window.rootViewController.view.frame = frame;
return YES;
}
You can adjust contentInset and scrollIndicatorInsets of your UITableView
:
#import "RECommonFunctions.h"
...
if (!REUIKitIsFlatMode()) {
self.tableView.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);
self.tableView.scrollIndicatorInsets = self.tableView.contentInset;
}
hi, it (adjusting contentinset) works for uitableview. but i open REfrostedview with uinavigationcontroller. i have same problem with navigation bar. how can i solve it?
menuController = [[MenuViewController alloc] initWithNibName:@"MenuView" bundle:nil];
menuController.delegate=self;
MainNavigationController *menuNC = [[MainNavigationController alloc] initWithRootViewController:menuController];
frostedViewController = [[REFrostedViewController alloc] initWithContentViewController:_tabBarController menuViewController:menuNC];
the startpoint of the menu is 0,0 of the total screen. the status bar is covering the first 20px. with >= 7.0 the behavior is just fine but not below. looking for a solution, but maybe you already know? thanks