GithubHelp home page GithubHelp logo

ylutilitydemos's Introduction

YLUtilityDemos for ios

这个repo是做ios开发中经常需要用到的demo,可以是方法,第三方库,或者任何您觉得有益他人开发的.主要是方便我们开发过程中节省找Demo的时间,能够更高效的开发以及更好的理解所需要的东西

欢迎大家共同参与到Demo库的建设当中!方便更多的人,互助成长!


#使用方式 使用方式非常简单

  1. YLViewController.h中搜索你需要的找的Demo的关键字,找到这个方法的序号就行了.
  2. YLViewController.m的'viewDidLoad'中调用这个方法便可以了.

##共同开发原则:

  • Demo必须具有隔离性,保证结构和使用简单.尽量不用到第三方库,保证demo的纯洁性,方便他人学习和扩展使用.
    方法的demo涉及内容较少的话就不要创建新的文件了,直接在YLViewController.h声明一个方法,在YLViewController.m完成后,
    可以在YLViewController.mviewDidLoad方法中调用.结构保持非常清晰.
    例如:写一个关于testBoundingRectWithSizeMethods_2016_3_27方法使用的Demo,设计内容较小,不需要新建文件和类.
    具体操作步骤:

NOTE:为方便使用者知道方法的修改或更新时间,同时也避免共同开发产生命名冲突, 采取特殊的在每一个方法最后添加日期,
这个日期代表您修改,或者添加Demo的时间,您在项目中将会看到

1.在YLViewController.h加入一个方法,写上方法序号.如图: 地址 建立一个方法

2.在YLViewController.m 实现- (void)testBoundingRectWithSizeMethods 方法,如图: 地址 实现方法

3.最后可以在viewDidLoad方法中调用就是一个方法的Demo了!如图: 地址 调用

  • 如果Demo涉及内容较多,需要新建文件和类,遵守如下规则
    • 根据Demo需要的文件和类放在相对应的文件夹中.保持目录清晰
    • 同样也是在YLViewController.h中声明一个方法,在YLViewController.m实现调用其他文件,参照项目中的方法3

**NOTE:**参照项目方法1和方法3,您将很容知道如何共同开发啦.☺

方法目录

  • 方法1:boundingRectWithSize1.算出来了具有属性的文字所占有的空间 2.ParagraphStyle属性,例如字体行间距,首行缩进 效果图
  • 方法2:简单使用NSDictionaryNSMutableDictionary, 包括初始化,遍历,删除,修改等,建议单步或者断点调试着看
  • 方法3:二维码制作,根据给定的字符串 (two-dimension code,QR Code) 效果图
  • 方法4:制作基本的一个月的日历,可以自行扩展和修改 (calendar) 效果图
  • 方法5:NSDate常用的方法集合,建议断点调试着看

ylutilitydemos's People

Contributors

jxjgssylsg avatar metteofigus avatar

Watchers

James Cloos 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.