JMTabview

所属分类:Windows编程
开发工具:Objective-C
文件大小:94KB
下载次数:2
上传日期:2014-08-05 09:05:20
上 传 者孤独恶人
说明:  实现IOS自定义切换Tabview组件,可以换颜色,样式
(Implementation of IOS custom switch Tabview components, can change color, style)

文件列表:
JMTabView (0, 2014-07-26)
JMTabView\.DS_Store (6148, 2014-07-26)
__MACOSX (0, 2014-08-05)
__MACOSX\JMTabView (0, 2014-08-05)
__MACOSX\JMTabView\._.DS_Store (82, 2014-07-26)
JMTabView\Classes (0, 2014-07-26)
JMTabView\Classes\.DS_Store (6148, 2014-07-26)
__MACOSX\JMTabView\Classes (0, 2014-08-05)
__MACOSX\JMTabView\Classes\._.DS_Store (82, 2014-07-26)
JMTabView\Classes\Categories (0, 2014-07-26)
JMTabView\Classes\Categories\.DS_Store (6148, 2014-07-26)
__MACOSX\JMTabView\Classes\Categories (0, 2014-08-05)
__MACOSX\JMTabView\Classes\Categories\._.DS_Store (82, 2014-07-26)
JMTabView\Classes\Categories\UIColor+Hex.h (194, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIColor+Hex.h (229, 2011-08-19)
JMTabView\Classes\Categories\UIColor+Hex.m (518, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIColor+Hex.m (229, 2011-08-19)
JMTabView\Classes\Categories\UIView+InnerShadow.h (237, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIView+InnerShadow.h (229, 2011-08-19)
JMTabView\Classes\Categories\UIView+InnerShadow.m (2255, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIView+InnerShadow.m (229, 2011-08-19)
JMTabView\Classes\Categories\UIView+Positioning.h (1971, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIView+Positioning.h (229, 2011-08-19)
JMTabView\Classes\Categories\UIView+Positioning.m (2971, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIView+Positioning.m (229, 2011-08-19)
JMTabView\Classes\Categories\UIView+Size.h (2020, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIView+Size.h (229, 2011-08-19)
JMTabView\Classes\Categories\UIView+Size.m (3279, 2011-08-19)
__MACOSX\JMTabView\Classes\Categories\._UIView+Size.m (229, 2011-08-19)
__MACOSX\JMTabView\Classes\._Categories (229, 2014-07-26)
JMTabView\Classes\Subviews (0, 2014-07-26)
JMTabView\Classes\Subviews\.DS_Store (6148, 2014-07-26)
__MACOSX\JMTabView\Classes\Subviews (0, 2014-08-05)
__MACOSX\JMTabView\Classes\Subviews\._.DS_Store (82, 2014-07-26)
JMTabView\Classes\Subviews\JMSelectionView.h (100, 2011-08-19)
__MACOSX\JMTabView\Classes\Subviews\._JMSelectionView.h (229, 2011-08-19)
JMTabView\Classes\Subviews\JMSelectionView.m (810, 2011-08-19)
__MACOSX\JMTabView\Classes\Subviews\._JMSelectionView.m (229, 2011-08-19)
JMTabView\Classes\Subviews\JMTabConstants.h (277, 2011-08-19)
__MACOSX\JMTabView\Classes\Subviews\._JMTabConstants.h (229, 2011-08-19)
... ...

## JMTabView This is a dark-themed and easy to use tab view created entirely using Core Graphics, so that it is easy to drop-in to your projects and operates smoothly on iOS devices. The library itself will also be used in Alien Blue's upcoming iOS updates. ## How it looks Here's what JMTabView looks like: And on a retina display: ## Usage 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: ## Installation If you prefer to use JMTabView as a dynamic library in your project, please be sure to add `-ObjC -all_load` to your target's `Other Linker Flags`. Alternatively, you can reference the .h and .m files directly. ## Acknowledgements This project uses the UIView+Positioning and UIView+Size categories developed by the very talented [Kevin O'Neill](https://github.com/kevinoneill/Useful-Bits). ## License JMTabView is BSD licensed, so you can freely use it in commercial applications.

近期下载者

相关文件


收藏者