GithubHelp home page GithubHelp logo

xychlovefhy / swiftproject Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 90.0 653 KB

A modular swift project. Component-based. Modules-based.组件化,swift组件化,swift4,swift模块化,iOS组件化,模块化,组件化,组件开发,模块,模块开发

License: MIT License

Swift 73.09% Objective-C 3.64% Ruby 23.27%

swiftproject's Introduction

SwiftProject

最彻底的组件化
正在进行中, 逐渐完善文档和项目
可能本仓库长期不更新, 但是组件在更新, 经常pod update下关注
组件仓库:https://github.com/NJHu/NJSpecs.git

GitHub: NJHu | 简书: NJHu | Blog: NJHu | Email: [email protected]

模块交互

实线表示依赖和调用, 虚线表示动态调用

项目结构

一切皆组件, 组件皆一切

  • 1, 主工程只需要拥有 NJAppDelegate 和 NJTabBarController.

  • 2, 其他所有的功能都在相应的组件里边

NJTabBarController

// MARK: - 添加模块
extension NJTabBarController {
    private func addChildVcs() -> Void {
        let nav0 = NJMediator.sharedMediator.Mediator_DYLiveShow_MainController()
        if nav0 != nil {
            self.addChildViewController(nav0!)
        }
        let nav1 = NJMediator.sharedMediator.Mediator_DYTrends_MainController()
        if nav1 != nil {
            self.addChildViewController(nav1!)
        }
    }
}

Podfile

def release_remote_pods
    
    source 'https://github.com/NJHu/NJSpecs.git' # NJ 私有源
    
    pod 'NJKit'
    pod 'NJMediator', :source => 'https://github.com/NJHu/NJSpecs.git'
    
    pod 'DYTrends'
    pod 'NJMediator_DYTrends'
    
    pod 'DYLiveShow'
    pod 'NJMediator_DYLiveShow'
    
end

参考文章

swiftproject's People

Contributors

njhu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.