Closed toto263 closed 10 years ago
No, this is not possible.
Just add REFrostedViewController inside a UINavigationController.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Create content and menu controllers
//
DEMOMenuViewController *menuController = [[DEMOMenuViewController alloc] initWithStyle:UITableViewStylePlain];
// Create frosted view controller
//
REFrostedViewController *frostedViewController = [[REFrostedViewController alloc] initWithContentViewController:[[DEMOHomeViewController alloc] init] menuViewController:menuController];
frostedViewController.direction = REFrostedViewControllerDirectionLeft;
frostedViewController.liveBlurBackgroundStyle = REFrostedViewControllerLiveBackgroundStyleLight;
frostedViewController.liveBlur = YES;
frostedViewController.delegate = self;
frostedViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Menu"
style:UIBarButtonItemStylePlain
target:frostedViewController
action:@selector(presentMenuViewController)];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:frostedViewController];
// Make it a root controller
//
self.window.rootViewController = navigationController;
self.window.backgroundColor = [UIColor blackColor];
[self.window makeKeyAndVisible];
return YES;
}
and remember to change the contentInset of your menuViewController
[self.tableView setContentInset:UIEdgeInsetsMake(44, 0, 0, 0)];
that's it
By the way, I just put this answer at wrong thread, sorry.
@timlai hei,thx for your answer ,but why my view always black ?
Is it possible to display FrostedViewController under Navigation bar and fade only Navigation view area? I want to show FrostedViewController like Android drawer interface. http://developer.android.com/design/patterns/navigation-drawer.html