logo
down
shadow

Sidebar menu with indicate navigationbar on iOS


Sidebar menu with indicate navigationbar on iOS

Content Index :

it fixes the issue There is nothing special to do here. Simply create your view and add it as a subview of the navigationBar in your controller (not the menu controller).
Here is a simple demonstration:
CGFloat desiredWidth = x;<----replace x.
UIView *testView = [[UIView alloc]initWithFrame:CGRectMake(-desiredWidth,0,desiredWidth,44)];
[testView setBackgroundColor:[UIColor blackColor]];

[self.navigationController.navigationBar addSubview:testView];

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Bootstrap Sidebar menu and Sidebar navigation


Tag : javascript , By : Arnaud Goudsmit
Date : March 29 2020, 07:55 AM
will be helpful for those in need The classic Bootstrap doesn't have a sidebar component included, you should build it yourself.. If you want to start easier, I'll show you a quick example of code.
So, take a loot at the CSS:
    #wrapper {
  padding-left: 250px;
  transition: all 0.4s ease 0s;
}

#sidebar-wrapper {
  margin-left: -250px;
  left: 250px;
  width: 250px;
  background: #000;
  position: fixed;
  height: 100%;
  overflow-y: auto;
  z-index: 1000;
  transition: all 0.4s ease 0s;
}

#page-content-wrapper {
  width: 100%;
}

.sidebar-nav {
  position: absolute;
  top: 0;
  width: 250px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav li {
  line-height: 40px;
  text-indent: 20px;
}

.sidebar-nav li a {
  color: #999999;
  display: block;
  text-decoration: none;
}

.sidebar-nav li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.2);
  text-decoration: none;
}

.sidebar-nav li a:active,
.sidebar-nav li a:focus {
  text-decoration: none;
}

.sidebar-nav > .sidebar-brand {
  height: 65px;
  line-height: 60px;
  font-size: 18px;
}

.sidebar-nav > .sidebar-brand a {
  color: #999999;
}

.sidebar-nav > .sidebar-brand a:hover {
  color: #fff;
  background: none;
}

.content-header {
  height: 65px;
  line-height: 65px;
}

.content-header h1 {
  margin: 0;
  margin-left: 20px;
  line-height: 65px;
  display: inline-block;
}

#menu-toggle {
  display: none;
}

.inset {
  padding: 20px;
}

@media (max-width:767px) {

#wrapper {
  padding-left: 0;
}

#sidebar-wrapper {
  left: 0;
}

#wrapper.active {
  position: relative;
  left: 250px;
}

#wrapper.active #sidebar-wrapper {
  left: 250px;
  width: 250px;
  transition: all 0.4s ease 0s;
}

#menu-toggle {
  display: inline-block;
}

.inset {
  padding: 15px;
}

}
<!-- Sidebar -->
    <div id="sidebar-wrapper">
        <ul class="sidebar-nav">
            <li class="sidebar-brand"><a href="#">Start Bootstrap</a>
            </li>
            <li><a href="#">Dashboard</a>
            </li>
            <li><a href="#">Shortcuts</a>
            </li>
            <li><a href="#">Overview</a>
            </li>
            <li><a href="#">Events</a>
            </li>
            <li><a href="#">About</a>
            </li>
            <li><a href="#">Services</a>
            </li>
            <li><a href="#">Contact</a>
            </li>
        </ul>
    </div>

Javascript onclick menu button show sidebar, onmouseleave hide sidebar


Tag : javascript , By : Eran Yahav
Date : March 29 2020, 07:55 AM
may help you . I have a sidebar which is hidden by default and a menu button which trigger the sidebar. So far, everything is working but what I want is, when I click on the menu, the sidebar gets opened and on mouse leave, the sidebar gets closed. , In order to close the menu on mouseleave you may write:
$('.navbar').on('mouseleave', function (e) {
   trigger.click(); // simulate the action you now do to close the menu
})
$(document).ready(function () {
  var trigger = $('.hamburger'),
      overlay = $('.overlay'),
      isClosed = false;

  trigger.click(function () {
    hamburger_cross();
  });
  $('.navbar').on('mouseleave', function (e) {
    trigger.click();
  })

  function hamburger_cross() {

    if (isClosed == true) {
      overlay.hide();
      trigger.removeClass('is-open');
      trigger.addClass('is-closed');
      isClosed = false;
    } else {
      overlay.show();
      trigger.removeClass('is-closed');
      trigger.addClass('is-open');
      isClosed = true;
    }
  }

  $('[data-toggle="offcanvas"]').click(function () {
    $('#wrapper').toggleClass('toggled');
  });
});
#wrapper {
  padding-left: 0;
  -webkit-transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -o-transition: all 0.5s ease;
  transition: all 0.5s ease;
}
#wrapper.toggled {
  padding-left: 220px;
}
#sidebar-wrapper {
  z-index: 1000;
  left: 220px;
  width: 0;
  height: 100%;
  margin-left: -220px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  -webkit-transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -o-transition: all 0.5s ease;
  transition: all 0.5s ease;
}
#sidebar-wrapper::-webkit-scrollbar {
  display: none;
}
#wrapper.toggled #sidebar-wrapper {
  width: 220px;
}
#page-content-wrapper {
  width: 100%;
}
#wrapper.toggled #page-content-wrapper {
  position: absolute;
  margin-right: -220px;
}
 .sidebar-nav {
  position: absolute;
  top: 0;
  width: 220px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidebar-nav li {
  position: relative;
  line-height: 20px;
  display: inline-block;
  width: 100%;
}
.sidebar-nav li:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  height: 100%;
  width: 3px;
  background-color: #fff;
  -webkit-transition: width .2s ease-in;
  -moz-transition: width .2s ease-in;
  -ms-transition: width .2s ease-in;
  transition: width .2s ease-in;
}
.sidebar-nav li:first-child a {
  color: #999;
  background-color: #52b6ec;
}
.sidebar-nav li:nth-child(2):before {
  background-color: #52b6ec;
}
.sidebar-nav li:nth-child(3):before {
  background-color: #52b6ec;
}
.sidebar-nav li:nth-child(4):before {
  background-color: #52b6ec;
}
.sidebar-nav li:nth-child(5):before {
  background-color: #52b6ec;
}
.sidebar-nav li:nth-child(7):before {
  background-color: #52b6ec;
}
.sidebar-nav li:nth-child(8):before {
  background-color: #52b6ec;
}

.sidebar-nav li:nth-child(9):before {
  background-color: #52b6ec;
}
.sidebar-nav li:hover:before,
.sidebar-nav li.open:hover:before {
  width: 100%;
  -webkit-transition: width .2s ease-in;
  -moz-transition: width .2s ease-in;
  -ms-transition: width .2s ease-in;
  transition: width .2s ease-in;

}
.sidebar-nav li a {
  display: block;
  color: #999;
  text-decoration: none;
  padding: 10px 15px 10px 30px;
}

.sidebar-nav li a:hover,
.sidebar-nav li a:active,
.sidebar-nav li a:focus,
.sidebar-nav li.open a:hover,
.sidebar-nav li.open a:active,
.sidebar-nav li.open a:focus {
  color: #fff;
  text-decoration: none;
  background-color: transparent;
}
.sidebar-nav > .sidebar-brand {
  height: 65px;
  font-size: 20px;
  line-height: 44px;
}

.sidebar-nav .dropdown-menu {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  border-radius: 0;
  border: none;
  background-color: #f1f1f1;
  box-shadow: none;
}
.hamburger {
  position: fixed;
  top: 100px;
  z-index: 999;
  display: block;
  width: 32px;
  height: 32px;
  margin-left: 15px;
  background: transparent;
  border: none;
}

.hamburger:hover,
.hamburger:focus,
.hamburger:active {
  outline: none;
}

.hamburger.is-closed:before {
  content: '';
  display: block;
  width: 100px;
  font-size: 14px;
  color: #fff;
  line-height: 32px;
  text-align: center;
  opacity: 0;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-closed:hover:before {
  opacity: 1;
  display: block;
  -webkit-transform: translate3d(-100px, 0, 0);
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-closed .hamb-top,
.hamburger.is-closed .hamb-middle,
.hamburger.is-closed .hamb-bottom,
.hamburger.is-open .hamb-top,
.hamburger.is-open .hamb-middle,
.hamburger.is-open .hamb-bottom {
  position: absolute;
  left: 0;
  height: 2px;
  width: 100%;
}

.hamburger.is-closed .hamb-top,
.hamburger.is-closed .hamb-middle,
.hamburger.is-closed .hamb-bottom {
  background-color: #1a1a1a;
}

.hamburger.is-closed .hamb-top {
  top: 5px;
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-closed .hamb-middle {
  top: 50%;
  margin-top: -2px;
}

.hamburger.is-closed .hamb-bottom {
  bottom: 5px;
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-closed:hover .hamb-top {
  top: 0;
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-closed:hover .hamb-bottom {
  bottom: 0;
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-open .hamb-top,
.hamburger.is-open .hamb-middle,
.hamburger.is-open .hamb-bottom {
  background-color: #1a1a1a;
}

.hamburger.is-open .hamb-top,
.hamburger.is-open .hamb-bottom {
  top: 50%;
  margin-top: -2px;
}

.hamburger.is-open .hamb-top {
  -webkit-transform: rotate(45deg);
  -webkit-transition: -webkit-transform .2s cubic-bezier(.73, 1, .28, .08);
}

.hamburger.is-open .hamb-middle {
  display: none;
}

.hamburger.is-open .hamb-bottom {
  -webkit-transform: rotate(-45deg);
  -webkit-transition: -webkit-transform .2s cubic-bezier(.73, 1, .28, .08);
}

.hamburger.is-open:before {
  content: '';
  display: block;
  width: 100px;
  font-size: 14px;
  color: #fff;
  line-height: 32px;
  text-align: center;
  opacity: 0;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-transition: all .35s ease-in-out;
}

.hamburger.is-open:hover:before {
  opacity: 1;
  display: block;
  -webkit-transform: translate3d(-100px, 0, 0);
  -webkit-transition: all .35s ease-in-out;
}
.overlay {
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(250, 250, 250, .8);
  z-index: 1;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


<div id="wrapper">
    <!-- Sidebar -->
    <nav class="navbar navbar-fixed-top" id="sidebar-wrapper" role="navigation">
        <ul class="nav navbar-nav sidebar-nav">
            <div class="gap"><br><br><br></div>
            <li>
                <a href="services.php">Services</a>
            </li>
            <li>
                <a href="#">About</a>
            </li>
            <li>
                <a href="#">Events</a>
            </li>
            <li>
                <a href="#">Team</a>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="color:#777;">Works <span
                        class="caret"></span></a>
                <ul class="dropdown-menu" role="menu">
                    <li class="dropdown-header">Dropdown heading</li>
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                    <li><a href="#">Something else here</a></li>
                    <li><a href="#">Separated link</a></li>
                </ul>
            </li>
            <li>
                <a href="#">Services</a>
            </li>
            <li>
                <a href="#">Contact</a>
            </li>
            <li>
                <a href="index.php#testimonials">Testimonials</a>
            </li>
        </ul>
    </nav>
    <!-- /#sidebar-wrapper -->

    <!-- Page Content -->
    <div id="page-content-wrapper">
        <button type="button" class="hamburger is-closed" data-toggle="offcanvas">
            <span class="hamb-top"></span>
            <span class="hamb-middle"></span>
            <span class="hamb-bottom"></span>
        </button>
    </div>
</div>

Tag : jquery , By : Tom Berthon
Date : March 29 2020, 07:55 AM
this one helps. I'm new in bootstrap and I'm using sidebar menu group tree from http://bootsnipp.com/snippets/featured/sidebar-menu-group-tree. All I want is to set it collapsed by default when the page load. , You have to remove these lines:
//$("#left ul.nav li.parent.active > a > span.sign").find('i:first').addClass("icon-minus");
//$("#left ul.nav li.current").parents('ul.children').addClass("in");
!function ($) {

    $(document).on("click","#left ul.nav li.parent > a > span.sign", function(){          
        $(this).find('i:first').toggleClass("icon-minus");      
    }); 

}(window.jQuery);

Dynamic Sidebar Menu in RShiny using renderMenu disappears when another menu item is clicked


Tag : r , By : kbrust
Date : March 29 2020, 07:55 AM
I wish this help you I'm not sure this is what you're looking for, but you could add a reactiveVal to contain your extra dynamic menu items. Then, would move your static menu items from ui to a server method, so you can include with the dynamic items together. Hope this might be helpful.
library(shinycssloaders)
library(shinyalert)
library(shinydashboard)
library(shinyWidgets)

ui <- dashboardPage(dashboardHeader(title = "Title"),
                    dashboardSidebar(
                      sidebarMenu(
                        id = "tabss"
                        ,sidebarMenuOutput("dynamic_content")
                      )),
                    dashboardBody(
                      tabItems(
                        tabItem("General_Information",
                                actionButton("add_menuItem",label = "Add Menu Item"))
                      )
                    )
)

server <- function (input, output, session){

  menu_val <- reactiveVal(NULL)

  observeEvent(input$add_menuItem,{
    menu_val(menuItem("Dynamic Menu", "dynamicMenu"))
  })

  output$dynamic_content <- renderMenu({
    menu_list <- list(
      menuItem("General Information", tabName = "General_Information", icon = icon("android")),
      menu_val(),
      menuItem("Settings", tabName = "settings", icon = icon("cogs")
                ,menuSubItem("Setting1", tabName = "Setting1", icon = icon("cogs"))
                ,menuSubItem("Setting2", tabName = "Setting2", icon = icon("cogs")))
    )
    sidebarMenu(.list = menu_list) 
  })
}

shinyApp(ui, server)

Tag : javascript , By : Blaise Roth
Date : March 29 2020, 07:55 AM
hop of those help? Here is the fiddle for it: https://jsfiddle.net/2d4xhcqe/
This way it will stick to the top when you scroll down.
nav {
  background: #f00;
  position: sticky;
  top: 0;
}
Related Posts Related QUESTIONS :
  • Cannot convert value of type '() -> _' to specified type '[UIViewController]'
  • How to make a reference to a uid stored in Firestore?
  • How do you initialize/use UITableViewCells with CellStyle = .value1 programmatically?
  • How to know if Apple has received our appeal/how long does it take Apple to respond?
  • Select new item added to SwiftUI List
  • What is the correct length: argument to provide to NSRange for NSRegularExpression using a (Swift) String?
  • I am trying to delete data from database, but sometime data is deleted and sometime data is not deleted
  • How to get slider value with subview rotation angle
  • Can't pass custom UINavigationBar / UIToolbar to UINavigationController because they don't conform to AnyClass
  • Grab SELECTED text on UITextView
  • Clever ways to better test GPS code using only the iPhone simulator?
  • Remove app before simulator or device is lunched from Xcode
  • Auto Layout constraints for container view inside UITableView header broken for different devices
  • iPhone restarts after API call
  • What is the shortcut / How do I create function after writing it's usage in Xcode
  • Convert apple time stamp to Unix time
  • No podspec found for `React-fishhook`
  • How to test touch dialog and perform real in-app purchase?
  • Compiling Metal shaders from source on iOS 13 Simulator gives PCH error
  • conan error:I need to cross build packages for os:iOS with my Macos, but when the first package was done, it broke my cp
  • Update calendar 'start of week' from phones system calendar
  • Xcode is showing some warnings
  • How to remove the default Navigation Bar space in SwiftUI NavigiationView
  • Having trouble integrating multiple pickerviews in the same view
  • SCNNode not in SCNView hierarchy, still showing & getting touches & physics
  • How can I open my SwiftUI app and perform a function using NSUseractivity from within Siri Intent Extension?
  • NSCoding decodeObject always nil
  • Passing data in a segmented Controller?
  • Facing issue in Siri Integration with custom intents
  • ARKit3 Hardware Requirement Clarification
  • ARKit3 How to use TrueDepth camera for face tracking and face meshes of other people?
  • How to discriminate while decoding using Codable Protocol in Swift?
  • 'IPA processing failed' while distributing build in Xcode Beta
  • How to debug a crash which happened when come back from background
  • Synchronising old data with NSPersistentCloudKitContainer
  • iOS app opened from web app with url redirects to Appstore
  • How to change the color of seperator in tableView?
  • Is there a better way to watch for a key-value change?
  • How to make UIBezierPath to fill from the center
  • Why on Xcode 11, UICollectionViewCell changes size as soon as you scroll (I already set size in sizeForItem AtIndexPath:
  • How to scan non LE devices using Swift?
  • Unable to infer closure type in the current context in SwiftUI
  • What is the best way to write common code and use it entire project
  • UISegmentedControl inside UIStackView, segments text not centered - iOS 13
  • Swift & ObjC bridge - cannot find protocol declaration for "WKNavigationDelegate"
  • SwiftUI How to push to next screen when tapping on Button
  • 'NSApp' is unavailable in UIKit for Mac: How to embed Mac only framework in iOS app on macOS?
  • UserDefaults Binding with Toggle in SwiftUI
  • How to create a color with an alpha value using SwiftUI?
  • SwiftUI creates destination views before the user navigates to them
  • Streaming video from https with AVPlayer causes initial delay
  • Tap Action not working when Color is clear SwiftUI
  • SwiftUI NavigationButton: How to navigate to different destinations
  • Supported default light/dark mode colors for Color vs UIColor
  • XCUITest wait for a cell with a specific static text inside it
  • Not able to enable Development mode on iOS 13
  • How to hide the home indicator with SwiftUI?
  • How to write if condition with using label text (Int) values
  • Swift Cannot use instance member within property initializer
  • Issue while getting the frame of the keyboard
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com