Giter Site home page Giter Site logo

ai2020os's Introduction

AI2020OS

一: 准备账号 和 git ssh key


二:移动端IOS版本App项目地址

  1. git : https://github.com/nicolastinkl/AI2020OS
  2. wiki: https://github.com/nicolastinkl/AI2020OS/wiki
  3. 每位成员需要创建个人branch

三:规范

1. 语言规范

 #!函数注释的格式为
/**
 *  @brief  
 *  @param
 *  @return
 **/
在brief中需要写明函数的主要功能、注意事项 在param中需要写明函数的变量类型、变量的作用 在return中需要写明函数的返回类型、返回值的作用


变量的命名

成员变量应该已小写字母开头,并以下划线作为后缀,如usernameTextField_,使用KVO/KVC绑定成员变量时,可以以一个下划线为前缀。

公共变量命名: 小写字母开头。如:imageView;

实例变量命名:

私有变量: 应该以下划线开头。如:_addButton

常量命名: 以小写k开头,混合大小写。如:kInvalidHandle, kWritePerm




图片的命名

应该已“模块+功能+作用+样式”的形式

如:message_private_at_button_bg_normal.png


类名、分类名、协议名

应该以大写字母开始,并混合小写字母来分隔单词,应该已“模块+功能+子功能”的方式:

如:MessagePrivateAtsomebody
应用级的类,应避免不用前缀,跨应用级的类,应使用前缀, objc 如:GTMSendMessage



if和else应该和左大括号在同一行

如:
if (button.enabled) {
    // Stuff
} else if (otherButton.enabled) {
    // Other stuff
} else {
    // More stuf
}
Switch 也是一样

如:
switch (something.state) {......


2. Git提交规范

  • 添加功能 Added(大模块+子模块):#实现某个功能
  • 修改功能 Changed(大模块+子模块):#修改某个功能
  • 修复BUG Fix(大模块+子模块):#修复什么bug(最好写上原因解决方法 )
  • 修改文档:Docs(): #
  • 修改样式:Style(): #
  • 添加测试 Test(大模块+子模块): #
  • 代码重构:Refactor(大模块+子模块): #

问题描述不要过长,简洁为主

ai2020os's People

Contributors

bumaociyuan avatar justin00314 avatar nicolastinkl avatar wantsor avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ai2020os's Issues

代码注释

// MARK: life cycle

// MARK: delegate

// MARK: datesource

// MARK: event response

// MARK: private methods

// MARK: getters and setters

// MARK: swift controls

// MARK: function extension

// MARK: Priate Variable

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.