• Stars
    star
    227
  • Rank 174,883 (Top 4 %)
  • Language
    Objective-C
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A menu implementation with a slide in menu similar to Medium's menu.

Drop Menu

A custom menu implementation with a slide in menu similar to Medium's menu.

Inspired by RBMenu and Medium.

To see how it works, have a look at the Examples folder.

This has not been designed to be dropped into a project as it is, a bit of re-working must be done. I will set it up as an independent component soon.

Animated gif

Setup

Drag EBMenucontroller & EBMenuItem from the Drop Menu folder into your project.

Create your menu items.


	EBMenuItem *politics = [EBMenuItem initWithTitle:@"Politics" withColourScheme:[UIColor flatEmeraldColor]];
	EBMenuItem *culture = [EBMenuItem initWithTitle:@"Culture" withColourScheme:[UIColor flatAlizarinColor]];
	EBMenuItem *travel = [EBMenuItem initWithTitle:@"Travel" withColourScheme:[UIColor flatOrangeColor]];
	EBMenuItem *nature = [EBMenuItem initWithTitle:@"Nature" withColourScheme:[UIColor flatWisteriaColor]];	
	

For each menu item, there is a corresponding completionBlock that gets called when the menu is tapped. Also, we are using completion block to lazy load view controllers.


	PoliticsViewController *politicsInitialView = [storyBoard instantiateViewControllerWithIdentifier:@"Politics"];
	politicsInitialView.menuItem = politics;
	self.viewControllers = @[politicsInitialView];

	politics.completionBlock = ^{
		
		self.viewControllers = @[politicsInitialView];
	};

Note, that the implementation in the example happens inside a custom UINavigationController, this doesn't have to be case with everyone. You can easily setup the menu items in the delegate and instead of adding the viewcontrollers to self.viewcontrollers you'll do it in `self.navigationcontroller.viewcontrollers'

FAQ

  1. Does it support storyboards?
    YES

  2. Can I have more than 4 menu items

    YES, but this isn't tested, you might need to modify menuHeight constant in EBMenuController.m to make it all fit.

  3. Does it support iPad?
    Yes, maybe, its not been tested, but there is no reason it shouldn't work

If you get to use it, please let me know on Twitter

AUTHOR

This component has been lovingly crafted by Edwin B

LICENSE

Apache License

More Repositories

1

ASOS

A React Native Clone of the popular ASOS App
JavaScript
129
star
2

Urbandict

A React Native implementation of the Urban Dictionary App
JavaScript
116
star
3

SwiflyOverlay

Another Navigation component for iOS. This time written in swift.
Swift
98
star
4

AppStore

⚠️ Experimental ⚠️ App Store using SwiftUI + Combinational layouts + Combine + more iOS 13 Goodies
Swift
28
star
5

Habari

A news reader for wordpress site, or any service that can spit out some proper json
Objective-C
9
star
6

Tinder-Hack-Client

Simple client for Tinder API
Objective-C
9
star
7

RSS-News-Reader

A quick and dirty implementation of a news reader allowing styling of numerous website data
Objective-C
6
star
8

Train-problem---Algorithm

A train problem using directed graphs to get to a solution.
Java
4
star
9

citizenship_test_flutter

Life in the UK test implemented in flutter
Dart
4
star
10

flutter-onboarding

a pet project to experiment with Flutter's animation API
Dart
3
star
11

TinderGram

Tinder + Instagram, need I say more? Swipe left/right to like
Swift
3
star
12

Instagram-Desktop

An instagram clone for the Mac Desktop written in SwiftUI. (This is a UI mock up only)
Swift
3
star
13

AirBnB-ReactNative

An AirBnB clone using React-Native
JavaScript
2
star
14

hermes

News scraper
Python
2
star
15

SplashScreen

A clone of Twitter's splashscreen implement in CoreAnimation, a Playground project
Swift
1
star
16

A-SwiftProgress

An experiment creating my own progress view in Swift
Swift
1
star
17

YAWA

Yet-Another-Weather-App (YAWA) is my attempt at picking up Swift
Swift
1
star
18

xkcd-reader

a simple xkcd reader
Objective-C
1
star
19

SwiftUI-Form-Example

Swift
1
star
20

edwinbosire.github.io

This is my tech blog, the ramblings of a mad man
CSS
1
star
21

LoginForm-ReactNative

An experiment to recreate a login form for TheWeek.com using React-Native
JavaScript
1
star
22

ruby_twitter

this is my first ruby on rails project which is a twitter clone.
Ruby
1
star