The objective-c grammar

与C#参照对比:

 

C#

Objective-C

文件

  1. .cs是源文件
  2. 带.designer的是View
  1. .h是头文件
  2. .m是源文件
  3. .storyboard是View

函数

  1. 函数定义 Private void Sample(int id);
  2. 函数使用Sample(1);
  1. 函数定义-(void)Sample:(int) id;
  2. 函数使用[super Sample];

Public class Sample{}

@implementation Sample … @end

属性

Public string Label { get; set; }

@property (weak,nonatomic) IBoutlet UILabel *msgLabel;

posted @ 2015-09-09 15:59  张小志  阅读(131)  评论(0编辑  收藏  举报