After reading the effects of several drawers, I thought that most of them were complicated and encapsulated by myself. this is mainly for your own project services. It is encapsulated in the style of the Netease client and does not provide an interface to change the intermediate View frame. If you are interested, you can try to add a frame interface. (encapsulated when ARC is enabled)
Core functions: Click cell in the left drawer to close the
The navigation Drawer (navigationdrawer) is a panel that slides in from the left side of the screen to display the main navigation items for your app. The user can open the navigation drawer by sliding into the left edge of the screen or by touching the app icon on the action bar. The navigation drawer overrides the content, but does not overwrite the action bar.
Using Pkrevealcontroller can be similar to QQ and other software, such as the left and right drawer view, dragged out of the view is divided into Leftview and Rightview, respectively, from the left half of the view and the second part, so according to different needs, You can choose to use a view as Leftview and Rightview, or you can specify two view.The basic use steps of this framework are described below.① download source from GitHub: Pkrevealcontr
Editor's note: This writer, Anthony Rose, co-founder and CTO of social networking Radio Zeebox, analyzes the pros and cons of sidebar Navigation and tab navigation, as well as the detailed process of a/b test for the revision process, and finally gives advice, After reading can have a clear understanding of these two kinds of navigation, very valuable experience to share:
================ Text Split Line ================
Imagine that you need to design a page with a lot of pages and modules, n
Using drawer effects in Swift projects based on MMDrawerController
// AppDelegate.swiftvar drawer = MMDrawerController()
Let leftViewController = LeftViewController () let rightViewController = RightViewController () let centerViewController = ViewController () let centerNav = UINavigationController. init (rootViewController: centerViewController) // set the Left and Right controllers to
Usually we need to display more information on the user's screen, but the user's screen size is limited. How can we use limited space to display more information? Android provides us with the SlidingDrawer class to help us easily achieve the desired effect. Such as moji recommendations in moji weather, 360 security guards are all reflected.
Next we will learn about the SlidingDrawer class to achieve the above effect:
:
When not expanded:
After expansion:
See the code below:
First, layout files
parameters//NSLog (@ "Very high frequency---");_mainview.layer.shadowcolor =[Uicolor Blackcolor]. Cgcolor; _mainview.layer.shadowopacity=0.5; if(EndX >=0) {_mainview.layer.shadowoffset= Cgsizemake (-5,0); } Else{_mainview.layer.shadowoffset= Cgsizemake (5,0); } } //Click the button, and you can expand the left and right sidebar-(Ibaction) Btnclick: (UIButton *) sender{//define a temporary variableCGFloat StartX =_mainview.frame.origin.x; //first a
Implementation of Android Drawer
A drawer control required in Android. The following is a simple implementation process.
First, write a layout. The layout should be noted as follows:
1. It must be the drawerLayou layout.
Android. support. v4.widget. DrawerLayout 2. There can only be two large layout s in drawerLayout 3. You must define whether the closed drawer i
Panel very nice one drawer controlA very good drawer control Panel, it can control the size of the drawer, pop-up size, the location of the drawer and many other properties, can be very good flexibility to apply to your project. When using the method Setopen (really, really), the Panel does not show the animation, the
The method should be placed in the Appdelegate-(void) Tomain{Initializing the Central view VC[Self tabbarcontrollerinit];Initialize left column Drawer view VCAlranklistviewcontroller *leftviewcontroller = [[Alranklistviewcontroller alloc] Initwithnibname:nil Bundle:nil];Set Drawer View VCSelf.mmdrawcontroller = [[Mmdrawercontroller alloc] Initwithcenterviewcontroller:_tabbarviewcontroller Leftdrawerviewcont
The use of ToolBar and DrawerLayout enables the opening and closing of the side bar drawer, toolbardrawerlayout
1. You can see the corresponding position represented by color attributes such as textColorPrimary, colorPrimary, colorPrimaryDark, and navigationBarColor, as shown in figure
2. the specific attributes are in the res style. xml, for example, in Android. in Manifest, you need to change theme to the corresponding AppTheme, as shown in (not
There are plenty of articles and discussions about drawer navigation (three-icon/hamburger menu). This article is not intended to join these discussions, just want to find a better alternative, after all, the flaws in the drawer navigation has become a verdict >>>
Inefficiency: interaction is troublesome.
Poor navigation: I don't know where I am.
Crammed with all sorts of messy functions.
Let's take a l
1. IntroductionThe students who used NetEase news client will find that when NetEase news slides to the left, the left navigation bar will then be dragged out, and the news content list will be pulled to the far right. Like a drawer pulled out the same. Cool. In addition to NetEase news, many applications are now using this kind of interaction.For unfamiliar gesture recognition please refer to the previous article: detailed use of iOS gesture recognit
Slidingdrawer is a drawer-type component that, when the user chooses to open the drawer, gets some "assemblies" that can be used, so that when a single interface is placed on multiple components, using this component can be a good solution to the problem of tight layout space. The definition of the Slidingdrawer class is as follows:Ava.lang.Object ? Android.view.View ? Android.view.ViewGroup ? Android.
The drawer principle can be said to be the most simple and easy to understand in combinatorial mathematics of a principle, its simplest and most primitive form of expression: for n book in n-1 drawer, ensure that every drawer must have a book, there must be a drawer of 2 books. However, this simple principle in many pr
Use DrawerLayout to implement simple drawer effects.
Preface: This article is the most basic use of DrawerLayout to achieve the drawer effect. I also try to streamline the code to be the most efficient, and I will post other complicated functions later.
First look
The text in the title bar will display different styles Based on the selected item.
Directly add the code.
The following is the activity_main co
Meaning
Give N and M, then give the n number of AI, let you judge from this n number to take a non-empty set, the number of the set and the M modulo to zero, to answer such a non-empty set exists.
Range:
N
Analysis:
It is easy to think of a DP solution, DP[I][J] means that when the number of I is reached, and for M modulo J is up to 1, can not be up to 0. Complexity O (n*m).
Obviously you have to timeout when N and M are larger.
See the end of the problem report, found that the problem wi
The first response to drawer controls is that the system provides the following:
In fact, the principle of the control is simply described as follows:
* Viewgroup such as linearlayout is used to place various views.
* The button is used to expand or collapse viewgroup.
Therefore, the general layout of the control should be as follows:
JavaCode
Final Effect Diagram:
Mainstoryboard schematic:
BeyondViewController.h
//BeyondViewController.h
//19_ Drawer Effect _ imitation netease////
Created by Beyond on 14-8-1.
Copyright (c) 2014 Com.beyond. All rights reserved.
#import
Beyondviewcontroller.m
BEYONDVIEWCONTROLLER.M//19_ Drawer Effect _ imitation netease////Created by Beyond on 14-8-1. Copyright (c) 2014 Com.beyond.
All ri
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.