GithubHelp home page GithubHelp logo

kotabs's Introduction

KOTabs โ€“ iOS component for multiple tabs

With KOTabs you can easily create a tabbed document interface. The user can switch between tabs with a single tap. The tabs can be closed with the "x" icon in the corner. When there are more tabs than the screen can show, the whole bar can be scrolled to the side. It was developed for Kodiak PHP, an app which allows you to write and run PHP code directly on the iPad.

To see the component in action, take a look at the video at http://www.becomekodiak.com/ or try our app called Kodiak PHP on the App Store.

Usage

We included a demo project that shows how to use the component.

Firstly, include its header:

#import "KOTabs.h"
#import "KOTabView.h"

To use the component, initialize it and set its size to the whole screen, as its area should also include the area of the documents it shows:

KOTabs *tabs = [[KOTabs alloc] initWithFrame:self.view.bounds];
tabs.delegate = self;
[self.view addSubview:tabs];

Now it's time to add some tabs into the components:

KOTabView *tabView1 = [[KOTabView alloc] initWithFrame:self.view.bounds];
tabView1.index = 0;
tabView1.name = "first tab";

NSMutableArray *tabViews = [NSMutableArray arrayWithObjects:tabView1, nil];
tabs.tabView = tabViews;
tabs.activeBarIndex = 0;
tabs.activeViewIndex = 0;

If you want to have more tabs, simply create an array with more items.

And that's it!

Copyright and license

This product is free and open source and it is distributed under the MIT License. See the file LICENSE for the complete text of the license.

Contact

http://www.becomekodiak.com/
http://www.twitter.com/becomekodiak/
[email protected]

kotabs's People

Contributors

adamhoracek avatar hungdm9999 avatar

Watchers

 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.