doorxp

Blog

private api

 Class LSApplicationWorkspace = objc_getClass("LSApplicationWorkspace");        id workspace = [LSApplicationWorkspace  performSelector:NSSelectorFromString(@"defaultWorkspace")];    NS

获得当前 App 的所有类, 当前 App 可见类.

#import <objc/runtime.h> #import <dlfcn.h> #import <mach-o/ldsyms.h> unsigned int count;     const char **classess;     Dl_info info;   

WKWebView DEBUG

#ifdef DEBUG  SEL sel = NSSelectorFromString(@"_enableRemoteInspector");  id cls = NSClassFromString(@"WebView");  IMP imp = [cls sel];  void (*func)(id, SEL) = (void *)imp;  func(cls, sel);#endifadd to&nb

Carplay NSIndexPath 对应关系.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #ffffff; background-color: #000000} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #00a0ff; background-color: #000000} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font:

getTotalDiskSize

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 22.0px Menlo; color: #ffffff; background-color: #000000} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; background-color: #000000; min-height: 14.0px} span.s1 {color: #de38a5} span.s2 {c

Keypath for any element in embedded NSArray

@interface NSArray (SubscriptKey) @end @implementation NSArray (SubscriptKey) - (id)valueForUndefinedKey:(NSString *)key {     if ([key isEqualToString:@"size"]) { &

Assembler Directives

This chapter describes assembler directives (also known as pseudo operations, or pseudo-ops), which allow control over the actions of the assembler.Directives for Designating the Current SectionThe assembler supports designation of arbitrar

读取数据(嵌入的plist)链接通过-sectcreate __TEXT为可执行

我用连接使用的plist一个可执行-sectcreate __TEXT连接器选项。clang -Wl,-sectcreate,__TEXT,__info_plist,info.plist -dynamiclib -o a.dylib a.cppotool你可以用otool(1)转储包含嵌入的plist的部分内容:otool -s __TEXT __info_plist /path/to/executable 然后通过管道将其输出,以便获得相应的ASCII表示XXD(1):otool -

shared library is loaded auto run

It's run when a shared library is loaded, typically during program startup.1. before mainvoid tmain() __attribute__((constructor(101))){     printf("abc\n"); }2.module inittypedef  void (IN

宏的更高级应用.

当中 objc源文件中要写一个 JS 代码或 json, 怎样让它语法高亮方法如下:定义一个红#define JS(x) #x但上面的红有个问题,就是宏中不能有逗号,解决方案如下:p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 19.0px Helvetica; color: #eb905a; background-color: #000000}#define JS(...) #__VA_ARGS__实际效果如下.
«   2024年11月   »
123
45678910
11121314151617
18192021222324
252627282930
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言

    Powered By Z-BlogPHP 1.5.1 Zero

    Copyright doorxp.com Rights Reserved.