IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    一些Cocoa控件的例子

    helloitworks发表于 2014-02-21 16:24:40
    love 0

    之前写了一些Cocoa控件的例子,现把代码放到git上。最近比较忙,有空再继续码
    今天是2月22号,一个特别的日子。

    1、三态button按钮

    常态Image鼠标hover态Image鼠标press态Image

    2、自绘link控件
    Image

    3、一个简单的tableView
    Image

    4、一个复杂的tableView

    Menu
    reveal menu item, to reveal app in the finder
    reveal menu item only shows when only one row is selected
    remove menu, can be used to remove one row at a time, or remove multiple selected rows at a time

    Button
    btnReval only shows at the row which the mouse hovers over
    btnRemove only shows at the row that is clicked

    Selection:
    if only one row was selected, extends the heigh of row from 42 to 60
    if multiple rows was selected, do not extend any row,shrink all the rows
    Image

    1、2、3、4的代码都在https://github.com/helloitworks/CocoaSample

    5、自绘带圆角的进度条的例子,并且可以改变颜色,代码链接:http://helloitworks.com/?p=675
    Image

    6、一个操作NSAttributeString的例子,并把NSAttributeString绘制到视图上。代码链接:http://helloitworks.com/?p=574
    6126f502c39d78ebee1eb585d522cc63

    7、通过自定义视图绘制dock icon,代码链接:http://helloitworks.com/?p=583
    ca0d150506fb8c4df548054f2ffae6d4



沪ICP备19023445号-2号
友情链接