# simpleTab **Repository Path**: knight2015/simpleTab ## Basic Information - **Project Name**: simpleTab - **Description**: 简单tab菜单,可以抽取到项目中去! - **Primary Language**: Objective-C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2014-11-11 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## JMTabView 简单tab样式 *** ##让您绝对心动的按钮,有缘人将她用在你的项目里面 增加亮点 ## 将样式变得简单 Here's what JMTabView looks like: And on a retina display: ## 简单实用 A demo project is included in this repository so that you can dive right in. In brief, to draw the tab view, you can do the following: `JMTabView * tabView = [[[JMTabView alloc] initWithFrame:frame] autorelease];` `[tabView setDelegate:self];` You can then add tab items: `[tabView addTabItemWithTitle:@"One" icon:[UIImage imageNamed:@"icon1.png"]];` By implementing the `tabView:didSelectTabAtIndex:` method, you will receive a callback when the tab selection changes. ## Flexibility You can set the `icon:` to `nil` if you prefer to use text only, or `title:` to `nil` to show icons only. If you prefer to use JMTabView as a **toolbar** you can use the `setMomentary:` method to change its selection behaviour. JMTabView also supports the execution of blocks so that you can embed your logic per tab item, like this: `[tabView addTabItemWithTitle:@"Tab" icon:nil executeBlock:^{ // do stuff after item has been selected }];` ## Customisation You can subclass `JMTabItem` and `JMSelectionView` to completely customize the view of the tabs. For example, in the inclusive Demo you can see how I've customized the view to render tabs like this: