Giter Club home page Giter Club logo

lgsidemenucontroller's Introduction

LGSideMenuController

iOS view controller which manages left and right side views.

Platform SwiftPM CocoaPods Carthage License

Preview

Presentation Style: Scale From Big

Presentation Style: Slide Above Blurred

Presentation Style: Slide Below Shifted

Presentation Style: Slide Aside + Usage: Inside UINavigationController

Other presentation styles and examples of usage you can try in included demo projects. Also you can make your very own style, as they are highly customizable.

Installation

LGSideMenuController Version Min iOS Version Language
1.0.0 - 1.0.10 6.0 Objective-C
1.1.0 - 2.2.0 8.0 Objective-C
2.3.0 9.0 Objective-C
3.0.0 9.0 Swift

With Source Code

  1. Download repository
  2. Add LGSideMenuController directory to your project
  3. Enjoy!

With Swift Package Manager

Starting with Xcode 9.0 you can use built-in swift package manager, follow apple documentation. First supported version is 2.3.0.

With CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. To install with CocoaPods, follow the "Get Started" section on CocoaPods.

Podfile

platform :ios, '9.0'
use_frameworks!
pod 'LGSideMenuController'

Then import framework where you need to use the library:

import LGSideMenuController

With Carthage

Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. To install with carthage, follow instructions on Carthage.

Cartfile

github "Friend-LGA/LGSideMenuController"

Then import framework where you need to use the library:

import LGSideMenuController

Usage

LGSideMenuController is inherited from UIViewController, so you can use it the same way as any other UIViewController.

First, you need to provide basic view controllers or views, which will be used to show root, left and right views.

  • rootViewController or rootView. This view controller or view will be used as the root view.
  • leftViewController or leftView. This view controller or view will be used as the left side view.
  • rightViewController or rightView. This view controller or view will be used as the right side view.
// You don't have to assign both: left and right side views. 
// Just one is enough, but you can use both if you want.
// UIViewController() and UIView() here are just as an example. 
// Use any UIViewController or UIView to assign, as you wish.

let sideMenuController = 
    LGSideMenuController(rootViewController: UIViewController(),
                         leftViewController: UIViewController(),
                         rightViewController: UIViewController())

// ===== OR =====

let sideMenuController = 
    LGSideMenuController(rootView: UIView(),
                         leftView: UIView(),
                         rightView: UIView())

// ===== OR =====

let sideMenuController = LGSideMenuController()
sideMenuController.rootViewController = UIViewController()
sideMenuController.leftViewController = UIViewController()
sideMenuController.rightViewController = UIViewController()

// ===== OR =====

let sideMenuController = LGSideMenuController()
sideMenuController.rootView = UIView()
sideMenuController.leftView = UIView()
sideMenuController.rightView = UIView()

Second, you probably want to choose presentation style, there are a few:

  • scaleFromBig. Side view is located below the root view and when appearing is changing its scale from large to normal. Root view also is going to be minimized and moved aside.
  • scaleFromLittle. Side view is located below the root view and when appearing is changing its scale from small to normal. Root view also is going to be minimized and moved aside.
  • slideAbove. Side view is located above the root view and when appearing is sliding from a side. Root view is staying still.
  • slideAboveBlurred. Side view is located above the root view and when appearing is sliding from a side. Root view is staying still. Side view has blurred background.
  • slideBelow. Side view is located below the root view. Root view is going to be moved aside.
  • slideBelowShifted. Side view is located below the root view. Root view is going to be moved aside. Also content of the side view has extra shifting.
  • slideAside. Side view is located at the same level as root view and when appearing is sliding from a side. Root view is going to be moved together with the side view.
sideMenuController.leftViewPresentationStyle = .slideAboveBlurred
sideMenuController.rightViewPresentationStyle = .slideBelowShifted

Third, you might want to change width of your side view. By default it's calculated as smallest side of the screen minus 44.0, then compare it to 320.0 and choose smallest number. Like so: min(min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) - 44.0, 320.0).

sideMenuController.leftViewWidth = 250.0
sideMenuController.rightViewWidth = 100.0

To show/hide side views just use any of these and similar methods:

// ===== LEFT =====

/// Shows left side view.
func showLeftView()

/// Hides left side view.
func hideLeftView()

/// Toggle (shows/hides) left side view.
func toggleLeftView()

// ===== RIGHT =====

/// Shows right side view.
func showRightView()

/// Hides right side view.
func hideRightView()

/// Toggle (shows/hides) right side view.
func toggleRightView()

Quick Example

You don't have to create both: left and right side views. Just one is enough, but you can use both if you want. We create them here just as an example.

Without Storyboard

  1. Create root view controller (for example UINavigationController).
  2. Create left view controller (for example UITableViewController).
  3. Create right view controller (for example UITableViewController).
  4. Create instance of LGSideMenuController with these controllers.
  5. Configure.
// Simple AppDelegate.swift
// Just as an example. Don't take it as a strict approach.

import UIKit
import LGSideMenuController

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // 1. Create root view controller.
        // Here it is just simple `UINavigationController`.
        // Read apple documentation and google to create one:
        // https://developer.apple.com/documentation/uikit/uinavigationcontroller
        // https://google.com/search?q=uinavigationcontroller+example
        let rootNavigationController = UINavigationController(rootViewController: UIViewController())

        // 2. Create left and right view controllers.
        // Here it is just simple `UITableViewController`.
        // Read apple documentation and google to create one:
        // https://developer.apple.com/documentation/uikit/uitableviewcontroller
        // https://google.com/search?q=uitableviewcontroller+example
        let leftViewController = UITableViewController()
        let rightViewController = UITableViewController()

        // 3. Create instance of LGSideMenuController with above controllers as root and left.
        let sideMenuController = LGSideMenuController(rootViewController: rootNavigationController,
                                                      leftViewController: leftViewController,
                                                      rightViewController: rightViewController)

        // 4. Set presentation style by your taste if you don't like the default one.
        sideMenuController.leftViewPresentationStyle = .slideAboveBlurred
        sideMenuController.rightViewPresentationStyle = .slideBelowShifted

        // 5. Set width for the left view if you don't like the default one.
        sideMenuController.leftViewWidth = 250.0
        sideMenuController.rightViewWidth = 100.0

        // 6. Make it `rootViewController` for your window.
        self.window = UIWindow(frame: UIScreen.main.bounds)
        self.window!.rootViewController = sideMenuController
        self.window!.makeKeyAndVisible()

        // 7. Done!
        return true
    }

}

For deeper examples check NonStoryboard Demo Project.

With Storyboard

  1. Create instance of LGSideMenuController as initial view controller for your Storyboard.
  2. Create root view controller (for example UINavigationController).
  3. Create left view controller (for example UITableViewController).
  4. Create right view controller (for example UITableViewController).
  5. Now you need to connect them all using segues of class LGSideMenuSegue with identifiers: root, left and right.

  1. You can change leftViewWidth, rightViewWidth and most of the other properties inside LGSideMenuController's attributes inspector.

  1. enum properties are not yet supported (by apple) inside Xcode builder, so to change leftViewPresentationStyle and rightViewPresentationStyle you will need to do it programmatically. For this you will need to create counterpart for your LGSideMenuController and change these values inside. This is done by creating LGSideMenuController subclass and assigning this class to your view controller inside Storyboard's custom class section.
// SideMenuController.swift

import UIKit
import LGSideMenuController

class SideMenuController: LGSideMenuController {

    // `viewDidLoad` probably the best place to assign them.
    // But if necessary you can do it in other places as well.
    override func viewDidLoad() {
        super.viewDidLoad()

        leftViewPresentationStyle = .slideAboveBlurred
        rightViewPresentationStyle = .slideBelowShifted
    }

}

For deeper examples check Storyboard Demo Project.

Wiki

If you still have questions, please take a look at the wiki.

More

For more details see files itself and try Xcode demo projects:

Frameworks

If you like LGSideMenuController, check out my other useful libraries:

  • LGAlertView Customizable implementation of UIAlertViewController, UIAlertView and UIActionSheet. All in one. You can customize every detail. Make AlertView of your dream! :)
  • LGPlusButtonsView Customizable iOS implementation of Floating Action Button (Google Plus Button, fab).

License

LGSideMenuController is released under the MIT license. See LICENSE for details.

lgsidemenucontroller's People

Contributors

brightsider avatar coledunsby avatar friend-lga avatar may-ben-arie avatar sticklyman avatar zmian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lgsidemenucontroller's Issues

How can I push view controller?

Hi,

I have to push a new detail view controller when I tap on a tableview cell. But when I do that, the menu icon is also present on the detail view controller. But I want a back button instead of the menu icon.

Can somebody point me in the right direction?

Thank you!

UIPanGestureRecognizer case UIButton event fail.

The pan gesture recognizer case UIButton can't receive UIControlEventTouchDragExit and UIControlEventTouchDragEnter event actions.

I suggest set the cancelsTouchesInView to NO. panGesture.cancelsTouchesInView = NO;

Collaborators WANTED

Guys, sorry, but now I totally don't have enough time to support my repositories. If somebody want to participate I will glad to add him.

And one more thing. If you really want to collaborate, prove your interesting in this library. Star it, fork it, make some issues, pull request. Show me that you understand how it works inside. Or if you do not create any pull request, but really want to improve this library, show me some your ios code and let me see your level.

White screen on iOS 8 devices and simulator

Hey, i'm getting a white screen on devices that run iOS8. The rootViewController is set but not presented.

After i'm setting the rootViewController i make my LGSideMenuController subclass a delegate of the rootViewController, this causes the view not the show
Is there any solution for this?

Thanks,

Disable visible for some period

How I can to disable visible of left/right view for some time period?
Example:

  • when user in guest mode - disabled right view
  • when user on login/register - disable left and right view

Using a UIViewController with a UITableView instead of UITableViewController

I have got this pod to work with by using UITableViewControllerbut for design purposes I'd like to use a UIViewController with a navigation bar and view for status bar background. I tried duplicating my originally UITableViewController because it worked with my "design idea" and for some reason viewDidLoad isn't even being called anymore and self.tableView = nil even though it is an IBO outlet

Why is that?

Swift example?

Anyone have a example of how to get this working in swift for a Newbie?

GestureRecognizer

UISlider and UITableview swipe to edit was not working on any of the viewcontroller, I have UIgesturedelegate and following delegate method, what may be the reason am I missing any?

  • (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{

    return YES;
    }

TableView for LeftView does not load

I am trying to load a tableview as my left view. Instead of showing my custom TableView class, it just shows a blank table and my table never loads. Here is my main view controller:

override func viewDidLoad() {
super.viewDidLoad() 

NSNotificationCenter.defaultCenter().addObserver(self, selector: "toggleMenu", name: "toggleMenu", object: nil)

 leftMenu = self.storyboard?.instantiateViewControllerWithIdentifier("LeftViewController") as! LeftMenuTableViewController

 let navigationController = self.storyboard?.instantiateViewControllerWithIdentifier("NavigationController")

self.setLeftViewEnabledWithWidth(self.view.frame.width * 0.75, presentationStyle: LGSideMenuPresentationStyle.SlideBelow, alwaysVisibleOptions: LGSideMenuAlwaysVisibleOptions.OnNone)

self.rootViewController = navigationController

self.leftView().addSubview(leftMenu.tableView)
}

I've checked out the Demo's and cannot figure out what I am missing.

How can I push view controller with storyboard identifier?

Hi,

I have to push a detail view controller when I tap on a tableview cell using with storyboard identifier. Now i have to navigate to the designed view controller by tap table view cell in the left menu

if (indexPath.row == 0) {
    ProfileViewController *profileVC = (ProfileViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:"ProfileVC"];
    [self.leftMenuVC navigateToViewController:profileVC];
}
- (void)navigateToViewController:(UIViewController *)viewController {
    [(UINavigationController *)[self sideMenuController].rootViewController pushViewController:viewController animated:YES];
    [[self sideMenuController] hideLeftViewAnimated:YES completionHandler:nil];
}

TableView disappear on row touch

I have a static table view and when I touch any row suddenly the table disappears (rows disappear but background image remains)

Here is my code:

@property (strong, nonatomic) MenuTableViewController *menuView;

and initilizing the navigation controller

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
UINavigationController *navigationController = [storyboard instantiateViewControllerWithIdentifier:@"NavigationView"];
LGSideMenuController* sideMenuController = [[LGSideMenuController alloc] initWithRootViewController:navigationController];
[sideMenuController setRightViewEnabledWithWidth:self.view.frame.size.width
                                       presentationStyle:LGSideMenuPresentationStyleSlideAbove
                                    alwaysVisibleOptions:LGSideMenuAlwaysVisibleOnNone];
sideMenuController.rightViewStatusBarStyle = UIStatusBarStyleDefault;

_menuView =  [self.storyboard instantiateViewControllerWithIdentifier:@"TableView"];
[sideMenuController.rightView addSubview:_menuView.tableView];

UIWindow *window = [UIApplication sharedApplication].delegate.window;
window.rootViewController = sideMenuController;

[UIView transitionWithView:window
                          duration:0.3
                           options:UIViewAnimationOptionTransitionCrossDissolve
                        animations:nil
                        completion:nil];

and the table view code ๐Ÿ‘

- (void)viewDidLoad {
    [super viewDidLoad];

    [self.tableView setBackgroundColor:[UIColor clearColor]];
    UIImageView *tableBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img_menu.jpg"]];
    tableBackgroundView.contentMode = UIViewContentModeScaleAspectFill;
    [tableBackgroundView setFrame: self.tableView.frame];
    [self.tableView setBackgroundView:tableBackgroundView];
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 8;
}

Also I should say my side menu is full screen.
img_5021
img_5022
img_5023

Another problem is I can't handle touch events of buttons inside the table view. Nether dynamic tables with programmatically handled actions nor referenced IBAction from storyboard.

How to switch content view controller

In the Demo's you push the selected view controller from side menus. Is there a method like [self.sideMenuViewController setContentViewController:viewController animated:YES]; or should I switch it on my own? (the code is from RESideMenu)

Error set another rootViewController "setRootViewController"

Hello.

I'm trying to change the rootViewController after touch some index in my MenuClassViewController, example:

if (indexPath.row == 2) {

NewViewController * newView = [[NewViewController alloc]init];
UINavigationController * nav = [[UINavigationController alloc]initWithRootViewController:newView];
[kMainViewController setRootViewController:newView];
}

This step it's ok, but if I try open the Menu again my application stop with this error:

Thread 1: EXC_BAD_ACCESS(code=1, address=0x10)

And showed some problem in this Method:

  • (void)colorsInvalidate
    {...}

screen shot 2015-07-26 at 11 40 10 pm

Do you have any idea about that?

Thank you.

Changing Content Glitches Status Bar

I have a tableview as my left menu. When I select a row I then switch the content of the LGSideMenuController to my new view controller and dismiss the Side menu. However, when I do that the new content loads without a status bar, then after a second loads the status bar and looks somewhat like a glitch. Any recommendations on this issue?

I currently have View Controller Based Status Bar to YES, and have tried using

override func preferredStatusBarUpdateAnimation() -> UIStatusBarAnimation { return .Fade }

in almost every view controller (including the menu view controller, the content view controllers, etc.) but still experiencing this issue.

Tableview not visible anymore after setting background image

Hi,

After setting the backgroundimage the tableview isn't visible anymore.. If I remove the backgroundimage I can see it, but when I set the backgroundimage I only see the image..

I've tried adding it after adding the tableview as a subview, before etc etc. nothing...

Any idea what that can be?

(it's in Swift)

var rootvc = self.storyboard?.instantiateViewControllerWithIdentifier("ViewController") as! ViewController;
rightMenu = self.storyboard?.instantiateViewControllerWithIdentifier("RightViewController") as! RightViewController;

    self.setRootViewController(rootvc);
    self.rightViewBackgroundImage = UIImage(named: "ocean");

    self.setRightViewEnabledWithWidth(100.0, presentationStyle: LGSideMenuPresentationStyleScaleFromBig, alwaysVisibleOptions: LGSideMenuAlwaysVisibleOnNone);
    //self.rightViewBackgroundImage = UIImage(named: "ocean.jpg");

    rightMenu.tableView.reloadData();
    rightMenu.tableView.backgroundColor = UIColor.clearColor();

    var rightView = self.rightView();

    rightView.addSubview(rightMenu.tableView)

    rootvc.main = self;

Status bar animation is not respected on iOS 9.0

Since LGSideMenuController's [self statusBarAppearanceUpdate] does nothing on iOS versions older than 9.0, the status bar is not animated on iOS 9.0. Two steps are needed to solve this:

  1. The user needs to override - preferredStatusBarUpdateAnimation in the side menu's root view controller(s). Here's how to do that in Swift.
override func preferredStatusBarUpdateAnimation() -> UIStatusBarAnimation {
    return .Slide // or return .Fade
}
  1. LGSideMenuController needs to be updated to perform the following animation when the menu is shown and hidden (as per this Stack Overflow answer).
[UIView animateWithDuration:_leftViewAnimationSpeed animations:^{
    [self setNeedsStatusBarAppearanceUpdate];
}];

Of course, any of the [UIView animateWith... functions could be used instead.
I can get the status bar to animate when the menu appears by putting this animation block in - showLeftViewPrepare, but I have not yet figured out how to animate the status bar when the menu disappears. If I put the animation block in - hideLeftViewDone, then the animation (incorrectly) happens after the menu is fully hidden rather than alongside the menu hiding animation.

Any suggestions?

Starting LGSideViewController directly from storyboard is broken

Steps to reproduce:
On Demo Storyboard application:

  1. Select Main.storyboard as Main interface (from Deployment Info)
  2. Add theese lines below @implementation MainViewController in MainViewController.h
- (void)viewDidLoad {
    [super viewDidLoad];
    UINavigationController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"NavigationController"];
    self.rootViewController = navigationController;


    [self setupWithPresentationStyle:LGSideMenuPresentationStyleSlideAbove type:0];
}

setupWithPresentationStyle:LGSideMenuPresentationStyleSlideBelow also doesn't work.

Can you provide information about how to start a SideViewController directly from storyboard?

leftview below navigation bar

Thanks for sharing great library. Its amazing.

But I want like leftview below navigation bar.

Can you help me on this.

Storyboard Example?

This looks like an awesome and more simplified version of other navigation drawer libraries. I was wondering if you could provide an example using storyboards, since thats a pretty common way for setting up view hierarchies these days.
Thanks!

Trouble with right Menu

When I use :

  sideMenuController.leftView().addSubview(menuController.view)

my code works fine but when I use :

   sideMenuController.rightView().addSubview(menuController.view)

my app crash and I get this error :
fatal error: unexpectedly found nil while unwrapping an Optional value

How to disable

How to hide this view In certain ViewControllers that are embedded under the same navigation controller?

.SlideAbove style is not working when used as Left view

.SlideAbove style is not working when used as Left view. When using it as Right view, it's working fine. All the other styles are working fine.

If you can point me in the right direction i'm also willing to offer a fix in a pull request.

Kind regards

Not rotating on iPad2

When menu is opened iPad mini rotating but iPad2 devices not rotating. I check the code and find the line :

Line:1313
if (kLGSideMenuSystemVersion >= 7.0)
{
_savedStatusBarHidden = kLGSideMenuStatusBarHidden;
_savedStatusBarStyle = kLGSideMenuStatusBarStyle;

    [_rootVC removeFromParentViewController];

    _currentShouldAutorotate = NO;
    _currentPreferredStatusBarHidden = (kLGSideMenuStatusBarHidden || !kLGSideMenuIsLeftViewStatusBarVisible);
    _currentPreferredStatusBarStyle = _leftViewStatusBarStyle;
    _currentPreferredStatusBarUpdateAnimation = _leftViewStatusBarUpdateAnimation;

    _waitingForUpdateStatusBar = YES;

    [self statusBarAppearanceUpdate];
    [self setNeedsStatusBarAppearanceUpdate];
}

This is the commit : ea87888

but I don't understand why if iOS7 and above shouldn't rotate?

Thanks.

rootViewController Shadow is gone after replacing rootViewController

If you replace the rootViewController after initializing the whole thing, the shadow is missing.

At first I initialize the menuController with a navigation controller, and there's a button which replaces the navigationcontroller with an other one, after I've replaced the rootViewController of the LGSideMenuController, the shadow is gone when the left or right side menu is shown.

Menu issue

Hello, I'm using the last version and when I scroll my menu it disappear (the tableview cell became empty). I'm using static tableview and the menu works fine with MMDrawerController.

(before big image) (after scrolling the small image)
untitled

This issue may have relation with this one : #18

Side menu corrupted using a modal view controller.

Hi,
I'm really loving the customization and use of the library, but I have a problem with modal VC.
When I show a modal VC, starting from side menu or even from root (content) menu, the side menu gets corrupted graphic, and worse with every modal.
I'e tried on dispatching on main queue, but no way.
I'm attaching some images.

normal
1st_run
2nd_run

Any idea?

LGSideMenuPresentationStyleSlide Above

I have a issues with LGSideMenuPresentationStyleSlideAbove.
I can use other styles but not this. After click menu button, my main view is dimmed, but i don't see left menu.

Sorry for my bad english, can you help me?

Add documentation

The inline documentation in LGSideMenuController.h is incomplete. For example, the properties associated with these getters are undocumented.

- (UIViewController *)rootViewController;
- (UIView *)leftView;
- (UIView *)rightView;

Would you please consider documenting these properties and other members of LGSideMenuController?

Maintenance

Is this project still going to be maintained or not? I see quite a few PRs and Issues not being handled. /cc @Friend-LGA

Gesture recognizer

It is not possible to close menu with swipe gesture from right menu. I guess it is because of this value "CGFloat shiftRight = 44.f;"
I suggest add menuGestureArea property or any other suggestions ?

Thanks in advance

Issue after Integrating after login screen application

I integrated LGSideMenuController Removed MainViewControler added MYDashboardViewController which is added in another storyboard. two storyboard [from login] then loading LGsideMenu [DashboardViewController], every things is working perfect expect two things.

  1. left menu do have three options (Setting, notification and profile)
    When click setting how to make that as my Mainviewcontroller? Do not want to navigate to another viewcontroller.

  2. My Dashboardviewcontorller (i.e MainViewController) viewdidload is calling three times.

addTarget not working

Hi,

My LeftViewController is a UIViewController with UIButtons.
In code, I call addTarget(...) [in Swift] for a button in LeftView, but it's not working :(

I tried with @IBOutlet, but nothing happens.

replace root viewcontroller breaks the shadow and gesture

I added right view and it works fine with first root view controller
but when I replace it, it breaks shadow and tap gesture
I saw the closed issue which is same and the merge fixed this issue but no luck for me
any help is appreciated

kMainViewController

My view controller where I want to use kMainViewController is not the root controller. My view controller is located in a tabbarcontroller as root controller and then as subview of a navigation controller . How do I have to change the #define below to make it work?

define kMainViewController (MainViewController *)[[(AppDelegate *)[[UIApplication sharedApplication] delegate] window] rootViewController]

Thanks in advance Michael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.