romaonthego / residemenu Goto Github PK
View Code? Open in Web Editor NEWiOS 7/8 style side menu with parallax effect.
License: MIT License
iOS 7/8 style side menu with parallax effect.
License: MIT License
This happens when you drag the view controller horizontally to reveal the menu partly and don't go all the way but go back to the view controller. It causes the navigation view controller to not update when pushing or popping views from the main navigation view controller.
I currently have a green tint on my navigation bar, which also automatically applies a green tint to the status bar. If I play with the RESideMenu, such as panning back and forth, etc, everything is all good. However if I select a menu item, as soon as the top controller appears again, the status bar is now black, and has lost its tint color.
I have not yet been able to determine the cause of this.
support right menu ? just like Facebook last version on ios7
thanks.
When using animated:YES, the view controller will fire viewWillAppear twice (because it is added as a subview and then removed).
Currently i implement an eshop, so i push/pop instances of the same ViewController to navigate in products/categories.
Each ViewController has a menuViewController (both are included to a RESide Menu). When i push and then i pop a ViewController (going back) the presentMenuViewController is not working - does not open the menu controller. Instead the scroll gesture works as expected.
Do you have any ideas why the "programmatically way" is not working when a viewController is appeared from back stack?
how can i change the backgroundImage from one of the ViewControllers of the Menu?
So I had a calendar where user can drag between dates and its uses pangestures. Since I have added RESideMenu, that calendar stopped working even though I
[self.sideMenuViewController setPanGestureEnabled:NO];
Then I put all the sidemenu gestures in an temp array and used current viewcontrollers gestures, once viewdisappears I assign gestures back to sidemenu
Maybe this will help someone having similar issues.
@Property (nonatomic, strong) NSArray *keepGestureRecogs;
-(void)viewDidLoad
{
//first try save gesture recognizers in an array
self.keepGestureRecogs=[[NSArray alloc] init];
self.keepGestureRecogs=self.sideMenuViewController.view.gestureRecognizers;
//second
[self.sideMenuViewController setPanGestureEnabled:NO];
self.sideMenuViewController.view.gestureRecognizers=self.view.gestureRecognizers;
}
-(void)viewWillDisappear:(BOOL)animated
{
self.sideMenuViewController.view.gestureRecognizers=self.keepGestureRecogs;
[self.sideMenuViewController setPanGestureEnabled:YES];
}
First of all thank you for this beautiful project! It's helped bring my app to life! One thing I do ask is if you could implement a smoother transition between view controllers, in terms of content.
For now when you click say Home on the Menu, the viewController slides into fullscreen beautifully, but the content just pops out of nowhere fast. Could you fade the content inside the view (or the whole view) while it's sliding into fullscreen?
The effect is most evident when you have two viewControllers with tableViews inside and a lot of writing. It just appears choppy.
Currently, the SideMenu works in both portrait and landscape modes. However, when the menu is up, if you rotate the device, autoratation is disabled. (not sure why/how)
For our App, I'd prefer to let rotation happen and the menu adjust to fit the new orientation.
I'm curious to know if you know what the issue is preventing autorottion, or if you know this would be very difficult to implement for some reason.
IF you give me a few pointers,and it looks doable with our timeline, I'll implement it and give you a pull request.
Either way, thanks for this, it's very nice!
Hi,
I have 3 view controllers - every time I switch between controllers using the residemenu the view controller gets initiated (viewdidload method gets called) and I loose any user state. Is there a way I can avoid this? Am I doing something wrong?
Thanks,
Varun
When quickly swiping the view controller to the right it sometimes disappears completely, leaving me with only the menu. When selecting a menu item the only thing happening is the statusbar changing color. To get the view controller back i have to shut down the app and relaunch it.
(This is from the example project)
Edit: I can replicate it on iOS6 and iOS7
Hi, This isnt an issue but rather a question,
I am trying to work with storyboards and I have views connected with Tab bar controller, can I make a transition from the tab bar controller to this?
Why there is a if (![window respondsToSelector:@selector(screen)] || [window screen] == [UIScreen mainScreen])
senetence in UIWindow+RESideMenuExtensions.m re_snapshotWithStatusBar's message?Isn't there is only one window in an application?
Hey guys, I'm running into this weird issue.
I want my RESideMenu to display a certain array of menu items if a user is logged in, and a different array of menu items if there is no user.
Let's say I open the app, and I'm not logged in, the correct menu will display if I open the menu. However, if I then login, the menu won't change if I open it again, it stays the same as if I weren't logged in. Now, if I open the app, and I'm not logged in, then I log in, and take the app out of multitasking, open it again, now the "logged in" menu displays!
Any ideas?
Thanks
Reposting here (from issue #58 )
I'm using storyboards as it is mentioned here: https://github.com/romaonthego/RESideMenu#storyboards-example
My function "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions" doesn't have any setup for the RESideMenu.
In my storyboard, I have a view controller of class 'rootViewController' which is my initial view controller for my project.
In the rootViewController.m file all the code I have is this:
(void)awakeFromNib { NSLog(@"in awake from nib"); self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"]; self.menuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"menuViewController"]; self.backgroundImage = [UIImage imageNamed:@"Stars"]; }
Where 'contentViewController' is a UINavigationViewController which has other UIViewControllers associated with it and 'menuViewController' is a UIViewController with file name DEMOMenuViewController (which i got from the sample project).
I tried your way of assigning my tutorial view controller to be the root view controller, by adding these lines to my didFinishLaunchingWithOptions method:
[self.window setRootViewController:vc];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
then I wasn't able to load the RESideMenu controller after the tutorial was over by re-setting the root controller..
Hope this makes sense!
Varun
Ромыч, твой фреймворк охуеннен, я прям сразу себе воткнул его, ток сделай, пжалки, всякие [self.contentViewController beginAppearanceTransition:YES animated:animated]; и всякие прочие понты
для меню, чтоб в контроллере меню выстреливали ивенты типа viewDidAppear,viewDidDissappear, ну ты понял, а то ща они выстреливают один раз при первом появлении. Заранее спасибо))
How can I replace contentViewController completely like before when I click on some menu?
Hi, I have a tableview called RootViewController and it loads my rss feeds.
The problem comes up when I tap the button to go back to the menu, because the app crash immediately.
Here is my console log:
2013-07-20 15:50:13.549 RESideMenuExample[4349:907] Finished Parsing
2013-07-20 15:50:15.255 RESideMenuExample[4349:907] -[RootViewController showMenu]: unrecognized selector sent to instance 0xa42b600
2013-07-20 15:50:15.256 RESideMenuExample[4349:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RootViewController showMenu]: unrecognized selector sent to instance 0xa42b600'
And here is my RootViewController.h file:
@interface RootViewController : PullToRefreshTableViewController <UIScrollViewDelegate,UITableViewDataSource, UITableViewDelegate,MWFeedParserDelegate,UIActionSheetDelegate> {
UITableView *_tableView;
NSMutableArray *_datasource;
LoadingView *loadingView;
// Parsing
MWFeedParser *feedParser;
NSMutableArray *parsedItems;
// Displaying
NSArray *itemsToDisplay;
NSDateFormatter *formatter;
//Async image
HJObjManager* objMan;
UIImage *imageinside;
//Sharing Cell Button
ShareTools *sharing;
}
// Properties
@Property (nonatomic, retain) NSArray *itemsToDisplay;
@Property (nonatomic, retain) LoadingView *loadingView;
How can I fix this problem?
I think that the control can't handle Tableviews
How would I go about disabling the pan gesture for the menu view controller or root view controller so that my scrollview can recognize touches. Or am I way off on this one. Basically, up or down or side to side gestures don't work on the scrollview.
Hello !
By adding a new tag you need to go back two times in order to reach the main menu side (sample app)
Half of the UIViewController still shows on the screen when the menu is presented, if the device has been rotated before presenting the menu. This is apparent in the demo application as well as in testing. Rotating the device when in the menu mode will only amplify the problem when presenting the menu again.
I've tried to add a third view controller to the project like this:
RESideMenuItem *third = [[RESideMenuItem alloc] initWithTitle:@"Third" action:^(RESideMenu *menu, RESideMenuItem *item) {
[menu hide];
ThirdViewController *thidViewController = [[ThirdViewController alloc] init];
thidViewController.title = item.title;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:skankaViewController];
[menu setRootViewController:navigationController];
}];
And the code in the ThirdViewController looks like this:
(void)showMenu
{
RESideMenuItem *homeItem = [[RESideMenuItem alloc] initWithTitle:@"Back" action:^(RESideMenu *menu, RESideMenuItem *item) {
[menu hide];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:[[DemoViewController alloc] init]];
[menu setRootViewController:navigationController];
}];
_sideMenu = [[RESideMenu alloc] initWithItems:@[homeItem]];
_sideMenu.verticalOffset = IS_WIDESCREEN ? 250 : 230;
_sideMenu.hideStatusBarArea = [AppDelegate OSVersion] < 7;
[_sideMenu show];
}
But I only get these errors when adding multiple view controllers:
Undefined symbols for architecture armv7s:
"OBJC_CLASS$_ThirdViewController", referenced from:
objc-class-ref in DemoViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hi Roman,
I am using RESideMenu in my project and I want to incorporate a tutorial screen for the user.
This is what I want to do:
For simplicity sake, consider the tutorial screen to be another view controller which will be part of the RESideMenu 'menu view controller'.
Is there a way to do this?
thanks,
Varun
how can i fix it support right menu ? I mean both left and right menu.
Thanks.
Results in double menu showing. You need to add an "IsShowing" BOOL type statement so that when the menu is showing, it can not be re-shown!!
the app references non-public selectors is the warning I get with the validator.
@implementation UIView (ImageSnapshot)
the snapshotImage method uses that selector. worked fine with ios6 but ios6.1+ gives this warning. Specially ios7.
Any ideas?
I have just added RESideMenu in a test project i am working on. I have used the StoryBoard example. everything works fine except for when i use a TableViewController class instead of a ViewController class, it crashes and gives the following : "this class is not key value coding-compliant for the key showMenu"
Am i doing something wrong or the table view controller classes cannot be used with the RESideMenu??
Hi!
I'm trying to change the content view controller from a menu option located in the side menu. When trying to do that, the content view controller gets refreshed, but the side menu is immediately closed, without any animation.
It'd be nice if the content view controller could be changed without having to close the side menu. In other words, having the ability to change the content view controller and closing the side menu with the proper animation.
Thanks!
Martin
I tried to implement storyboard version, but I'm getting exception:
[RootViewController re_displayController:frame:]: unrecognized selector sent to instance 0x9880e10
in RESideMenu.m, line 116.
My RootViewController is subclass of RESideMenu, and I don't see any difference between my and demo project :(
Do you have idea what can be wrong?
P.S. Installed via cocoapods
if the status bar is hidden in the app via a plist, or via UIApplication.sharedApplication.setStatusBarHidden, the status bar is shown whenever a new controller is shown via setRootViewController.
click something on the left, calling setRootViewController, and the status bar reappears.
calling UIApplication.sharedApplication.setStatusBarHidden in the action method of the menu item will fix this, but shouldn't setting hideStatusBarArea
do this for all menu items?
the app starts with RESideMenu and not with a desired view.
then when you tap menu it appears the menu I select an item and then I want to go back to the menu but there's a button that says Go Back, when I click it I don't go to my menu but to the first view RESideMenu.
How can I fix this?
When the residemenu animation is triggered upon choosing a window, the statusbar text turns black and does not return back to it's white color.
I should add, I have a background image on my navigation bar. iOS7 makes the text white. animation turns it black
Hello,
I think there are some problems with the menu being positioned incorrectly in certain circumstances.
To reproduce problem 1:
Now if you restart the app in portrait orientation and then
These two images should look the same.
To reproduce problem 2:
Now if you restart the app in portrait orientation and then
Again, these two images should look the same.
Portrait works lovely but Landscape (useful on iPad) not so much. Part of the issue is that views get added directly to the window, which doesn't support orientation changes.
Add Swipe Right to Open, Left to Cancel (/return) Pan Gestures
Hi,
I am writing an application on iOS 7 using storyboards & the residemenu library.
I have a navigation controller as my root view controller and I embed a view controller within it.
When the application loads, viewDidLoad gets called once and viewWillAppear gets called once. This is correct (also I check for data & update the view in view will appear).
However, in my view controller, i have a button which allows the user to share the information via SMS/text using the 'MFMessageComposeViewController' controller.
So the code here is
MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init];
if([MFMessageComposeViewController canSendText])
{
controller.body = [NSString stringWithFormat:@"Vehicle parked at %@. Next cleaning date is in %@ days, %@", address, daysRemaining, cleaningDateFormatted];
controller.messageComposeDelegate = self;
[self presentViewController:controller animated:YES completion:nil];
}
and the delegate function is
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
{
switch (result) {
case MessageComposeResultCancelled:
NSLog(@"Cancelled");
break;
case MessageComposeResultSent:
NSLog(@"Message Sent");
break;
default:
break;
}
[self dismissViewControllerAnimated:YES completion:nil];
}
However, when i called dismissViewControllerAnimated.. the viewDidAppear method is being called twice. Do you know why this is happening as this is checking data twice and there by adding things twice to my view instead of only once?
Thanks,
Varun
Looks like there have been quite a few changes recently, perhaps it's time for a new version so us Cocoapodders can use the latest bits? :)
The snapshot view or the view that we was panned disappears if heavy panning is done, this issue is difficult to reproduce on simulator but on the device it happens quite often.
My app is using cocoapods to include both RESideMenu and REFrostedViewController. For my system menu, I'm using one for iPad and the other for iPhone.
Everything was great until I updated my pods today and now I get this linker error:
duplicate symbol _REUIKitIsFlatMode in:
/Users/darren.ehlers/Library/Developer/Xcode/DerivedData/Phoenix-dqdzkipsstzchggvjtfqtpbraseo/Build/Products/Debug-iphoneos/libPods.a(RECommonFunctions.o)
ld: 1 duplicate symbol for architecture armv7s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.