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;

原文地址:https://www.cnblogs.com/BlueEye/p/4795007.html