ObjC
Assembler Directives
doorxp 发表于2017-08-31 浏览5010 评论0
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
GIT
github readme.md 添加图片
doorxp 发表于2017-08-31 浏览4623 评论0
将图片放在仓库里面,在文件里链接它,最后 push 到 github 上。
链接通过-sectcreate __TEXT为可执行
doorxp 发表于2017-08-16 浏览4697 评论0
我用连接使用的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 -
Apple
include/mach-o/dyld-interposing.h
doorxp 发表于2017-08-09 浏览4183 评论0
/*
* Copyright (c) 2005-2008 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original&nbs
ObjC
shared library is loaded auto run
doorxp 发表于2017-08-09 浏览4348 评论0
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
Apple
OSX 下编译 upx
doorxp 发表于2017-08-08 浏览3977 评论0
依赖库编译ucl下载地址:http://www.oberhumer.com/opensource/ucl/#download 解压,进入文件夹./configure
make allupx下载 upxexport UPX_UCLDIR=path to ucl sourcemake all输出文件为:upx.out
ObjC
宏的更高级应用.
doorxp 发表于2017-08-07 浏览4146 评论0
当中 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__实际效果如下.
ObjC
Rate for App 代码实现
doorxp 发表于2017-08-07 浏览4813 评论0
在app内部实现评价。App实现评价一般有下面几种方式:1. 代码直接调用[SKStoreReviewController requestReview];//ios10.3优点:程序内,方便用户.2.url 跳转 NSString *strUrl = @"itms-apps://itunes.apple.com/app/id{APPID}?action=write-review";
NSURL 
ObjC
分析基于ReponderChain的对象交互方式
doorxp 发表于2017-08-03 浏览4009 评论0
这种对象交互方式的缺点显而易见,它只能对存在于Reponder Chain上的UIResponder对象起作用。优点倒是也有蛮多:以前靠delegate层层传递的方案,可以改为这种基于Responder Chain的方式来传递。在复杂UI层级的页面中,这种方式可以避免无谓的delegate声明。由于众多自定义事件都通过这种方式做了传递,就使得事件处理的逻辑得到归拢。在这个方法里面下断点就能够管理所有的事件处理。使用Strategy模式优化之后,UIViewController/UIView的事件
Apple
ramdisk
doorxp 发表于2017-08-03 浏览3955 评论0
// 分配给 ramdisk 相应大小的空间 diskutil erasevolume HFS+ 'ramdisk' `hdiutil attach -nomount ram://$[1024*2048]` 打开元数据索引,如果你使用 Xcode 内部的调试工具这是必须的。因为调试工具使用元数据索引来查询符号连接 mdutil -i on /Volum