Coder Social home page Coder Social logo

egviewstabbar's Introduction

EGViewsTabBar

EGViewsTabBar is a Tab Bar that works with UIViews instead of UIViewControllers. It looks like this:   

You can customize the amount of tabs, their size, the tab bar height and background color.

Usage

  • Add EGViewsTabBar.h and EGViewsTabBar.m to your project
  • Import "EGViewsTabBar.h" and conform to the EGViewsTabBarDelegate protocol
  • Create a new instance and add it to your view
	EGViewsTabBar *tabbar = [[EGViewsTabBar alloc] initWithFrame:self.view.frame delegate:self];
	[self.view addSubview:tabbar];
  • Implement the required delegate methods
	- (NSInteger)viewsTabBarNumberOfTabs:(EGViewsTabBar*)viewsTabBar;
	- (UIImage*)viewsTabBar:(EGViewsTabBar*)viewsTabBar imageForTabIndex:(NSInteger)index;
	- (UIView*)viewsTabBar:(EGViewsTabBar*)viewsTabBar viewForTabIndex:(NSInteger)index;

And you're done!

Additional Info

  • EGViewsTabBar has 2 methods:

This is the only method you should use to create a new instance of EGViewsTabBar

	- (id)initWithFrame:(CGRect)frame delegate:(id<EGViewsTabBarDelegate>)delegate;

EGViewsTabBar caches your views and only asks for them the first time a tab is clicked. The next time you click a tab, the correct view will be loaded from the cache. You can use this method in order to clear the cache and enforce a reload of all the views. ```ObjectiveC - (void)clearCache; ```
  • Please note that the views that are returned by viewsTabBar:viewForTabIndex: should have the same frame as the EGViewsTabBar.

License

EGViewsTabBar is available under the MIT license.

Contact

If you find any issues or want to ask for any features, please use GitHub's issues module. If you're using this control, please let me know: [email protected]

egviewstabbar's People

Contributors

eliganim avatar

Watchers

James Cloos avatar Vinod Vishwakarma avatar

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.