Latest 1.0.3
Homepage https://github.com/YRDGroup/DMFunctionalUnit
License MIT
Platforms ios 7.0, requires ARC
Authors

拆分各种功能组件,便于复用和梳理

开始

支持Pod,或手动导入文件夹DMFunctionalUnit

    pod 'DMFunctionalUnit'
    #import "DMFunctionalUnit.h"

生成渐变色图片

    UINavigationBar *navBar = [UINavigationBar appearance];
    // 1.2.设置导航栏背景
    UIColor *firstColor = [UIColor dm_colorWithHex:0x369aff];
    UIColor *lastColor = [UIColor dm_colorWithHex:0x39d7fc];
    [navBar setBackgroundImage:[UIImage dm_getImageFromColors:@[firstColor,lastColor] withFrame:CGRectMake(0, 0,kScreenWidth,64)] forBarMetrics:UIBarMetricsDefault];
    // 1.3.设置导航栏的文字
    [navBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];

超级回跳

移除底部堆栈式回跳

- (IBAction)removeAndPop:(id)sender {

    BOOL success = [self dm_removeMidStackControllsToViewControllerClass:NSClassFromString(@"ViewController")];
    NSLog(@"dm_removeMidStackControllsToViewControllerClass结果:%d",success);

    [self.navigationController popViewControllerAnimated:YES];
}

直接pop到目标控制器

- (IBAction)superpop:(id)sender {

    [self dm_superPopToViewControllerClass:NSClassFromString(@"ViewController") animated:YES];
}

Latest podspec

{
    "name": "DMFunctionalUnit",
    "version": "1.0.3",
    "summary": "u62c6u5206u8d37u561bu5de5u5177u7c7b",
    "homepage": "https://github.com/YRDGroup/DMFunctionalUnit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Agoer": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/YRDGroup/DMFunctionalUnit.git",
        "tag": "1.0.3"
    },
    "source_files": "DMFunctionalUnit/**/*.{c,h,m}"
}

Pin It on Pinterest

Share This