Latest 1.0.0
Homepage https://github.com/shionIsMyName/SYNetModel
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking, MJExtension
Frameworks Foundation, CoreGraphics, UIKit
Authors

What is this?/这是什么?

This is a baseModel combining internet requests and mapping model(using Objective-c).
这是一个整合了网络请求和模型映射的基类(使用objective-c).

what can this do?/这能干吗?

This third-party library could make your controllers more readable by moving your requests from controllers to models,and put data you requested into models with just one method.
这个第三方库将网络请求迁移至模型层,并将请求到的数据封装进模型。它可以给控制器减肥,让控制器的代码逻辑更简单易读,更易于维护。

unused/使用前的Controller
image
used/使用后的Controller
image

简单来说,只要继承了该基类,调用一个方法,即可完成数据请求和数据解析和映射模型。

how to use?/如何使用?

注意:该库强依赖afnetworking和mjextension.(afnetworking仅支持3.0以上版本,mjextension理论可兼容其他历史版本).
warning:strongly rely on afnetworking and mjextension.(afnetworking needs to be 3.0+ version)

1,put SYNetModel into your project/集成SYNetModel进项目
2,create your model and implements SYNetModel/创建你的模型并继承SYNetModel(模型属性需要自己对照接口返回参数设定,你懂的.)
3,call model’s class method @" netModel…"/调用你的模型的类方法 netModel…(出提示回车即可,参数可以option+点击查看)

Latest podspec

{
    "name": "SYNetModel",
    "version": "1.0.0",
    "summary": "A baseModel combining internet request and mapping model/u4e00u4e2au5c01u88c5u7f51u7edcu8bf7u6c42u548cu6a21u578bu6620u5c04u7684u6a21u578bu57fau7c7b",
    "description": "This third-party library could makes your controllers more readable by moving your requests from controllers to models,and put data you requested into models./u8fd9u4e2au7b2cu4e09u65b9u5e93u53efu4ee5u5c06u7f51u7edcu8bf7u6c42u8fc1u79fbu81f3u6a21u578bu5c42,u5e76u5c06u8bf7u6c42u5230u7684u6570u636eu5c01u88c5u8fdbu6a21u578b,u7ed9u63a7u5236u5668u51cfu80a5,u8ba9u63a7u5236u5668u4ee3u7801u903bu8f91u66f4u6613u8bfbuff0cu66f4u6613u4e8eu7ef4u62a4u3002",
    "homepage": "https://github.com/shionIsMyName/SYNetModel",
    "license": "MIT",
    "authors": {
        "u65bdu52c7": "[email protected]/[email protected]"
    },
    "source": {
        "git": "https://github.com/shionIsMyName/SYNetModel.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "dependencies": {
        "AFNetworking": [
            "~>3.0.4"
        ],
        "MJExtension": [
            "~>3.0.10"
        ]
    },
    "source_files": "SYNetModel/*",
    "frameworks": [
        "Foundation",
        "CoreGraphics",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This