1. Methods and Messages

a) class method - call it by sending a message to the class itself
 b) instance method - call it by sending a message to an instance of the class
 
An Objective-C method’s name must contain exactly as many colons as the method
takes parameters, and, the parameter name must end with a colon

c) Calling a Method
 eg:
 NSString* s = @"Hello, world!";
 NSString* s2 = [s uppercaseString];
 <=>
 NSString* s2 = [@"Hello, world!" uppercaseString];
 
 //If a method takes no parameters, then its name contains no colons
 //If a method takes two or more parameters, its name contains that number of colons
 eg:
 [someObject hereAreThreeStrings: @"string1" : @"string2" : @"string3"];

Objective-C Basic的更多相关文章

  1. Automake

    Automake是用来根据Makefile.am生成Makefile.in的工具 标准Makefile目标 'make all' Build programs, libraries, document ...

  2. How to set up a basic working Appium test environment

    Appium is a test framework targeting devices; although it is very handy and powerful, it is not so s ...

  3. The component and implementation of a basic gradient descent in python

    in my impression, the gradient descent is for finding the independent variable that can get the mini ...

  4. Atitit HTTP 认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结

    Atitit HTTP认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结 1.1. 最广泛使用的是基本验证 ( ...

  5. Basic Tutorials of Redis(9) -First Edition RedisHelper

    After learning the basic opreation of Redis,we should take some time to summarize the usage. And I w ...

  6. Basic Tutorials of Redis(8) -Transaction

    Data play an important part in our project,how can we ensure correctness of the data and prevent the ...

  7. Basic Tutorials of Redis(7) -Publish and Subscribe

    This post is mainly about the publishment and subscription in Redis.I think you may subscribe some o ...

  8. Basic Tutorials of Redis(6) - List

    Redis's List is different from C#'s List,but similar with C#'s LinkedList.Sometimes I confuse with t ...

  9. Basic Tutorials of Redis(5) - Sorted Set

    The last post is mainly about the unsorted set,in this post I will show you the sorted set playing a ...

  10. Basic Tutorials of Redis(4) -Set

    This post will introduce you to some usages of Set in Redis.The Set is a unordered set,it means that ...

随机推荐

  1. ASIHttpRequest编译不通过

    转:http://blog.sina.com.cn/s/blog_67a5e47201014tof.html Undefined symbols for architecture i386:   &q ...

  2. C#中使用visio控件

    C#中使用visio控件 2012-08-25 18:14:19|  分类: 技术相关|举报|字号 订阅     其实就是C#访问VISIO的自动化模型,以前做了不少C#和Excle及word 的交互 ...

  3. 【转】MegaSAS RAID卡 BBU Learn Cycle周期的影响

    http://ju.outofmemory.cn/entry/140 背景 最近遇到有些带MegaSAS RAID卡的服务器,在业务高峰时突然IO负载飚升得很高,IO性能急剧下降,查了日志及各种设置最 ...

  4. MyBatis 物理分页

    MyBatis使用RowBounds实现的分页是逻辑分页,也就是先把数据记录全部查询出来,然在再根据offset和limit截断记录返回 为了在数据库层面上实现物理分页,又不改变原来MyBatis的函 ...

  5. PHP 魔术方法总结

    1.__get.__set 这两个方法是为在类和他们的父类中没有声明的属性而设计的 __get( $property ) 当调用一个未定义的属性时访问此方法 __set( $property, $va ...

  6. 【C++11】 lambda表达式

    i.e.int x = 10;int y = 20;int z = [&]{ x = x * x; y = y * y; return x + y;}(); 上面z后面以[]开头的为一个lam ...

  7. 关于SecureCRT的安装和破解问题以及xp系统的串口问题

    今天下午找了几个小时的软件,因为交叉编译环境要搭好,其中SecureCRT还有串口问题要解决,我突然间发现我开始光盘中的SecureCRT坏掉了,在网站上下载SecureCRT,结果要很多的积分,这样 ...

  8. 【SummaryPlan】Summary of Feb & Plan of March——How to 'just do it'?

    Why I choose to be a graduate student from an undergraduate student? It’s time to applying for inter ...

  9. 状压DP uvalive 6560

    // 状压DP uvalive 6560 // 题意:相邻格子之间可以合并,合并后的格子的值是之前两个格子的乘积,没有合并的为0,求最大价值 // 思路: // dp[i][j]:第i行j状态下的值 ...

  10. NodeJs 开源

    iwebpp.io - 运行P2P Node.js web 服务,穿透防火墙,NAT https://github.com/InstantWebP2P/iwebpp.io pm 是一个轻量级的Node ...