Skip to content

Oklahomawhore/WZDropDownView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WZDropDownView

A Simple Drop Down Menu that is easy to use, and easy to customize.

Created by W.Zhu

Installation

git clone this repository.

Drag WZDropDownView Folder into your project.

import custom arrow with the name "arrowdown.png" or use the one in this repository(that is not good-looking)

#import "WZDropDownView.h" where you want to use it

and you are good to go...

example

The example is included in this repository.

    _dropView = [[ULDropDownView alloc] initWithFrame:CGRectMake(200, 40, 300, 60)];
    NSString *logoPath = [[NSBundle mainBundle] pathForResource:@"网易Logo" ofType:@"jpg"];
    UIImage *logo = [UIImage imageWithContentsOfFile:logoPath];
    NSString *name = @"freewaterzws";
    NSString *lastLogin = @"2017年12月12日";
    
    NSDictionary *dic = @{@"name" : name,
                          @"image" : logo,
                          @"lastLogin" : lastLogin
                          };
    
    _dropView.optionArray = @[dic, dic, dic];
    _dropView.optionIDs = @[100, 120, 140];
    [_dropView didSelect:^(NSString * _Nonnull selectedText, NSInteger index, NSInteger identifier) {
        NSLog(@"登录用户: %@", selectedText);
    }];
    [self.view addSubview:_dropView];

Author

Wangshu Zhu email: killnobody0514@gmail.com

About

A Simple Drop Down Menu written in Objective-c and inspired by iosdropdown

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published