[self class] 返回当前类名

[self _cmd] 返回当前方法名

self 是类的隐藏的参数,指向当前当前调用方法的类

另一个隐藏参数是_cmd,代表当前类方法的selector

object-c [self class] 和 [self _cmd]的更多相关文章

  1. IMP self _cmd

    The only way to circumvent dynamic binding is to get the address of a method and call it directly as ...

  2. #ifdef,#else,#endif,#if 拾忆

    预处理就是在进行编译的第一遍词法扫描和语法分析之前所作的工作.说白了,就是对源文件进行编译前,先对预处理部分进行处理,然后对处理后的代码进行编译.这样做的好处是,经过处理后的代码,将会变的很精短.   ...

  3. ios Object Encoding and Decoding with NSSecureCoding Protocol

    Object Encoding and Decoding with NSSecureCoding Protocol February 27, 2014 MISC NSCoding is a fanta ...

  4. 解决:pipenv shell报错:AttributeError: 'module' object has no attribute 'run'

    利用pipenv shell切换到虚拟环境时,显示报错:AttributeError: 'module' object has no attribute 'run' 可以看到是d:\program\p ...

  5. 好用的一个object c 宏

    好用的一个object c 宏 from https://github.com/justzt/ios-helper/blob/master/Macro.h // // Macro.h // Photo ...

  6. self & _cmd

    https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles ...

  7. CoreCLR源码探索(一) Object是什么

    .Net程序员们每天都在和Object在打交道 如果你问一个.Net程序员什么是Object,他可能会信誓旦旦的告诉你"Object还不简单吗,就是所有类型的基类" 这个答案是对的 ...

  8. JavaScript Object对象

    目录 1. 介绍:阐述 Object 对象. 2. 构造函数:介绍 Object 对象的构造函数. 3. 实例属性:介绍 Object 对象的实例属性:prototype.constructor等等. ...

  9. javascript之Object.defineProperty的奥妙

    直切主题 今天遇到一个这样的功能: 写一个函数,该函数传递两个参数,第一个参数为返回对象的总数据量,第二个参数为初始化对象的数据.如: var o = obj (4, {name: 'xu', age ...

  10. c# 基础 object ,new操作符,类型转换

    参考页面: http://www.yuanjiaocheng.net/webapi/config-webapi.html http://www.yuanjiaocheng.net/webapi/web ...

随机推荐

  1. NYOJ 38布线问题

    http://acm.nyist.net/JudgeOnline/problem.php?pid=38 布线问题 时间限制:1000 ms  |  内存限制:65535 KB 难度:4   描述 南阳 ...

  2. lz4,pigz,gzip 3者比较

    一.压缩(1.1)使用gzip进行打包:# time tar -zcf tar1.tar binlog*real 0m48.497suser 0m38.371ssys 0m2.571s (1.2)使用 ...

  3. Objective-C中的instancetype和id区别

    目录(?)[-] 有一个相同两个不同相同 Written by Mattt Thompson on Dec 10th 2012 一什么是instancetype 二关联返回类型related resu ...

  4. asp.net日志跟踪方法

    1. 页面级的配置 要在页面级启用跟踪功能,就要在@Page指令中设置Trace属性.如下所示: *************************************************** ...

  5. MVC 详细说明

    .NET MVC执行过程: 1.网址路由比对 2.执行Controller与Action 3.执行View并返回结果 在使用MVC中是由IgnoreRoute()辅助方法对比成功的,会导致程序直接跳离 ...

  6. 74 使用BitSet输出数组中的重复元素

    [本文链接] http://www.cnblogs.com/hellogiser/p/using-bitset-to-print-duplicate-elements-of-array.html [题 ...

  7. 转centos65安装简测mysql cluster 7.3.7

    MySQLCluster是sharednothing分布式架构,ndb存储引擎把数据放置于内存中.可以做到无单点故障.由运行于不同服务器上的的多种进程构成,组件包括SQL节点,NDBD数据节点,管理程 ...

  8. Java for LeetCode 172 Factorial Trailing Zeroes

    Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in log ...

  9. Java for LeetCode 062 Unique Paths

    A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...

  10. iftop安装

    安装方法1.编译安装 如果采用编译安装可以到iftop官网下载最新的源码包. 安装前需要已经安装好基本的编译所需的环境,比如make.gcc.autoconf等.安装iftop还需要安装libpcap ...