OS X Core Controls Tutorial: Part 2/2学习笔记

来源:互联网 发布:淘宝直通车在哪里找图 编辑:程序博客网 时间:2024/04/30 06:15

learn from: OS X Core Controls Tutorial: Part 2/2

OverView

In this part of tutorial,we” finish the application,and learn how to use the follwing controls:

  • sliders
  • Date Pickers
  • Radio Buttons
  • Check Boxes
  • Image Views

NSSliders

Interface Builder has an object in the Object Library for sliders:
OL_Sliders

Two common tasts:

  1. getting or setting current value;
  2. getting and setting the high and low limits of the slider’s range.
@property int intValue;// ps-from: NSControl@property NSInteger integerValue;@property float floatValue;@property double doubleValue;// ps-to:NSControl@property double minValue;@property double maxValue;

set Continuous state:

demo

slider_demo

NSDatePicker

self.datePicker.date = [NSDate date];

NSMatrix

Radio Button: only a single button,within the same group,can be selected at one time.NSMatrix allows to group radio buttons in rows and columns.

In the Object Library: No Radio Group.

Check Boxes

check boxes are in fact the same as push buttons

self.yellCheck.state = NSOffState;

Image Views

Image Well

my_try

0 0
原创粉丝点击