Latest 1.2
Homepage https://github.com/heroims/UIViewControllerPageTool
License MIT
Platforms ios 6.0
Authors

UIViewControllerPageToolUIViewControllerPageTool UIViewControllerPageTool Carthage compatible

Easy to get top viewcontroller ,previous viewcontroller and page level.(方便获取最上层页面,前一个页面以及页面层级)

Usage

@interface UIViewController (PageViewLevel)

@property(nonatomic,readonly)NSInteger pvl_pageViewLevel;

@end

@interface UIViewController (PreviousController)

/**
 不支持UITabbarController切换记录前一个
 扩展实现可通过 objc_setAssociatedObject(self, @selector(pc_previousController), sourcePageController, OBJC_ASSOCIATION_RETAIN_NONATOMIC) 设置
 优先使用以设置的值

 */
@property(nonatomic,readonly)UIViewController *pc_previousController;

@end

@interface UIViewController (TopViewController)

+ (UIViewController *)topViewController;

@end

Installation

via CocoaPods

Install CocoaPods if you do not have it:-

$ [sudo] gem install cocoapods
$ pod setup

Create Podfile:-

$ edit Podfile
platform :ios, '6.0'
pod 'UIViewControllerPageTool',  '~> 1.0.0'
$ pod install

Use the Xcode workspace instead of the project from now on.

Latest podspec

{
    "name": "UIViewControllerPageTool",
    "version": "1.2",
    "summary": "u65b9u4fbfu5febu901fu5b9au4f4du6700u4e0au5c42u9875u9762uff0cu524du4e00u4e2au9875u9762u4ee5u53cau9875u9762u5c42u7ea7",
    "homepage": "https://github.com/heroims/UIViewControllerPageTool",
    "license": {
        "type": "MIT",
        "file": "README.md"
    },
    "authors": {
        "heroims": "[email protected]"
    },
    "source": {
        "git": "https://github.com/heroims/UIViewControllerPageTool.git",
        "tag": "1.2"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "UIViewControllerPageTool/*.{h,m}",
    "subspecs": [
        {
            "name": "PageViewLevel",
            "source_files": "UIViewControllerPageTool/PageViewLevel/*.{h,m}"
        },
        {
            "name": "PreviousController",
            "source_files": "UIViewControllerPageTool/PreviousController/*.{h,m}"
        },
        {
            "name": "TopViewController",
            "source_files": "UIViewControllerPageTool/TopViewController/*.{h,m}"
        }
    ]
}

Pin It on Pinterest

Share This