swrevealviewcontroller

SWRevealViewController from the right side on swift

风格不统一 提交于 2019-12-04 01:21:40
I am using SWRevealViewController library to make a slide out menu in swift, but I am struggling to put this menu in the right side. I have seen on the library description this comment // Optional right view controller, can be nil if not used @property (nonatomic) UIViewController *rightViewController; but I am not familiar with objective C and I am not being able to do this on swift. This is a part of my code for the default(left) menu: class ViewController: UIViewController, AVAudioPlayerDelegate { @IBOutlet weak var playlistOutlet: UIBarButtonItem! override func viewDidLoad() { super

SWRevealViewController dismiss keyboard on swipe

空扰寡人 提交于 2019-12-03 14:02:33
问题 I am using SWRevealViewController in my app and I am having a problem. I have a textfield in a scene, if I swipe left when the keyboard is open, the menu appears but it does not dismiss the keyboard. How do I dismiss keyboard on left swipe? I have tried UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; swipe.direction = UISwipeGestureRecognizerDirectionLeft; [self.view addGestureRecognizer:swipeRecognizer]; -(void

How to push viewcontroller from appdelegate in storyboard

狂风中的少年 提交于 2019-12-03 12:03:29
问题 I am using SWRevealViewController in my project, and I want to open a particular controller when the app receives a notification. I have tried so many solutions but nothing works. How can I show a specific ViewController from my AppDelegate? (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { UIApplicationState appState = UIApplicationStateActive; if ([application respondsToSelector:@selector(applicationState)]) { appState = application

implement login screen before swrevealcontroller

ⅰ亾dé卋堺 提交于 2019-12-03 03:38:52
I've just started learning IOS development, I've successfully implemented the SWRevealViewController by following a given tutorial online all is working as expected. I've then decided to add a login screen, which would be the first page the user see's when the application is run. The steps I took are a follows: Dropped a UIViewController onto the story board Set this as my 'is initial view controller' Added a button to this new view and created a seque for testing purposes But when I click this button it does nothing, so after searching the web and trying to figure this one by my self

How to push viewcontroller from appdelegate in storyboard

老子叫甜甜 提交于 2019-12-03 02:26:11
I am using SWRevealViewController in my project, and I want to open a particular controller when the app receives a notification. I have tried so many solutions but nothing works. How can I show a specific ViewController from my AppDelegate? (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { UIApplicationState appState = UIApplicationStateActive; if ([application respondsToSelector:@selector(applicationState)]) { appState = application.applicationState; } application.applicationIconBadgeNumber = 0; if (appState != UIApplicationStateActive) {

SWRevealViewController pushing FrontVC is not causing animation and not responding to notifications

我是研究僧i 提交于 2019-12-01 12:08:46
问题 I am working on SWRevealViewController in which I have a scenario in which - Demo code link - https://www.dropbox.com/s/02fjub838hv95cr/SWRevealVC.zip?dl=0 1) I have to present a ViewController's view*(NotificationVC in my storyboard)* in my FrontVC. **2)**This childVC's View has a button*(createNotification)* which is connected to another viewController*(createNotificationVC)* via custom segue(SWRevealViewControllerSeguePushController) ,which has a back button **3)**Pressing the back button

How to show resized sidebar using SWRevealViewController?

﹥>﹥吖頭↗ 提交于 2019-11-30 10:08:15
I am using SWRevealViewController in IOS app (universal). I'm getting sidebar in iPhone and iPad both but I want to show sidebar which covers 90% of screen - how can I? open the SWRevealViewController.m file and then u get the _initDefaultProperties Method. in this method you get the side screen size and position - (void)_initDefaultProperties { _frontViewPosition = FrontViewPositionLeft; _rearViewPosition = FrontViewPositionLeft; _rightViewPosition = FrontViewPositionLeft; _rearViewRevealWidth = 260.0f; /// this is the method u change the side bar width _rearViewRevealOverdraw = 60.0f;

Return to initial view controller when user logs out

折月煮酒 提交于 2019-11-30 05:09:07
I'm working on an app which uses Facebook integration, and the log in system works fine now. However, I can't seem to return to my initial view controller when the user clicks log out . Here's an overview of my storyboard : I would like to return to the start when the user clicks the blue button (on the top). What would I do to achieve that? As you can see I have multiple Navigation Controllers , and I only use Push-segues to get there. However, I do use the SWRevealViewController , which you can see in the middle. I've tried [self.navigationController popToRootViewControllerAnimated:YES];

SWRevealViewController: Remove interaction on frontview when rearview is revealed

流过昼夜 提交于 2019-11-29 23:17:40
I need to disable user interaction on front view when rear view is revealed. Found some others asking the same thing but can't really understand where or how to implement the code that I've seen. Ex: I found this code from link , - (void)revealController:(SWRevealViewController *)revealController willMoveToPosition:(FrontViewPosition)position { if(position == FrontViewPositionLeft) { self.view.userInteractionEnabled = YES; } else { self.view.userInteractionEnabled = NO; } } - (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position { if

SWRevealViewController make sidebar button static & make the rearView appear on top of the frontView

六眼飞鱼酱① 提交于 2019-11-29 17:56:53
Is there any way to make the rearView appear on top of the frontView as below image in storyboard using Objective-C. I want to make the Front View navigation Fixed & make sidebar button static. This kind of android drawer external and open source library called as a CCKFNavDrawer . CCKFNavDrawer For using this following code. self.rootNav = (CCKFNavDrawer *)self.navigationController; [self.rootNav setCCKFNavDrawerDelegate:self]; Then implement delegate method - (void)CCKFNavDrawerSelection:(NSInteger)selectionIndex { NSLog(@"%i", selectionIndex); } May this helps lot. 来源: https://stackoverflow