summertree 2014-10-21T13:08:14+00:00 summertree@yeah.net 动画表情 App 2014-03-28T00:00:00+00:00 summertree http://summertree.github.com/2014/03/28/-app 照相机录制gif动画图片App,分享到微信等社交软件。 接下来要添加的功能: 1. 滤镜 2. 编辑,添加、减少帧。添加文字

]]>
SQLITE improve 2014-01-20T00:00:00+00:00 summertree http://summertree.github.com/2014/01/20/sqlite-improve
  • redesign menu
  • multi rows/columns select/copy
  • text color
  • log
  • ]]>
    NSObject: the Class and the Protocol 2014-01-10T00:00:00+00:00 summertree http://summertree.github.com/2014/01/10/nsobject-the-class-and-the-protocol sqlite time function 2014-01-08T00:00:00+00:00 summertree http://summertree.github.com/2014/01/08/sqlite-time-function
    1. 本周 strftime('%W', tastings.date) = strftime('%W', 'now')
    2. 当天 strftime('%Y%W', createTime, 'unixepoch'), strftime('%Y%W', 'now', 'utc')

    3. define kLastDate @"date(createTime, 'unixepoch') = date('now', '-1 day')"

    4. define kThisWeek @"strftime('%%Y%%W', createTime, 'unixepoch') = strftime('%%Y%%W', 'now', 'utc')"
    5. define kLastWeek @"strftime('%%Y%%W', createTime, 'unixepoch') = strftime('%%Y%%W', 'now', '-7 day', 'utc')"
    ]]>
    iOS Tech 2014-01-07T00:00:00+00:00 summertree http://summertree.github.com/2014/01/07/ios-tech 数据库
    1. Core Data,苹果自身的ORM框架,有很高学习成本,并且使用不当极容易引发问题,如多线程、多个coordinate之间的问题。 但是它会帮你处理很多事情,比如对象映射、数据库版本迁移、原子操作同步。
    2. FMDB,现在很多应用都在使用这个库,它在sqlite函数上封装了一层,使用起来很方便,但是要自己实现对象映射、数据库迁移等

    网络

    1. ASI, AFNETWorking
    2. XMPP, MQTT

    绘画

    1. Quazt2D
      1. 苹果自身框架,适用于普通绘图,用它做过一个画图软件,实现手绘和矢量绘图
    2. OpenGL
      1. 学习成本高,但是很灵活,可以实现跨平台代码
    ]]>
    debug 2014-01-07T00:00:00+00:00 summertree http://summertree.github.com/2014/01/07/debug event loop 2014-01-05T00:00:00+00:00 summertree http://summertree.github.com/2014/01/05/event-loop UIImageView drawRect 2014-01-02T00:00:00+00:00 summertree http://summertree.github.com/2014/01/02/uiimageview-drawrect 由于排版问题,需要在UIImageView上添加分割线。最开始的想法是在继承它,并在子类的drawRect:方法中用CoreGraphic API手动画上线条。 尝试过后发现完全不起作用,查了相关资料,发现UIImageView不支持重写drawRect:,文档提示如下

        Subclassing Notes
        Special Considerations
    
        The UIImageView class is optimized to draw its images to the display.
     UIImageView will not call the drawRect: method of a subclass. If your 
     subclass needs custom drawing code, it is recommended you use UIView as 
     the base class.
    
    def show
      @widget = Widget(params[:id])
      respond_to do |format|
        format.html # show.html.erb
        format.json { render json: @widget }
      end
    end

    最后解决方式是在UIImageView添加CALayer,在CALayer把线条画出来

    ]]>
    CoreGraphic Memory Don't Free 2014-01-02T00:00:00+00:00 summertree http://summertree.github.com/2014/01/02/coregraphic-memory-dont-free 最近被一个问题困扰

    ]]>
    NSCoding 2013-12-31T00:00:00+00:00 summertree http://summertree.github.com/2013/12/31/nscoding