1 #pragma mark - 候选区按钮点击方法2 -(void)optionClick:(UIButton *)btn3 {4 NSLog(@"%s",__func__);5 6 7 }
分类:
其他好文 时间:
2015-10-09 08:06:57
阅读次数:
181
最近在学习OC运行时(runtime),测试了一个函数class_replaceMethod,具体如下:IMPoriginalMethod;
NSString*CustomUppercaseString(idSELF,SEL_CMD){
NSLog(@"BeginConverting。。。");
NSString*result=originalMethod(SELF,_CMD);
NSLog(@"EndConverting。。。");
returnre..
分类:
其他好文 时间:
2015-10-08 18:30:05
阅读次数:
664
//数组写入本地 //1.写的东西 NSArray* arr = @[@"1",@"2",@"3"]; //2.写进哪里 NSString *str2 = [documentStr stringByAppendingPathComponent:@"fuckyou.avi"]; NSLog(@"%@....
分类:
其他好文 时间:
2015-10-06 16:42:18
阅读次数:
147
//第一种获取沙盒路径的方法// NSString *pathStr = NSUserName();// NSString *homePathStr = NSHomeDirectoryForUser(pathStr);// NSLog(@"%@",homePathStr); //第二种获取沙盒路经....
分类:
其他好文 时间:
2015-10-06 16:38:56
阅读次数:
114
let aa = UIFont.familyNames() for family in aa { NSLog("\(family)") let bb = UIFont.fontNamesForFamilyName(family as! String) ...
分类:
其他好文 时间:
2015-10-05 20:42:31
阅读次数:
180
沙盒路径//主目录,方法一NSString *path = NSHomeDirectory();NSLog(@"NSHomeDirectory:%@",path);//主目录,方法二NSString *userName = NSUserName();NSString *rootPath = NSHo...
分类:
其他好文 时间:
2015-10-04 00:28:08
阅读次数:
199
一,场景一 int arr[4] = {10, 20, 30, 40}; int (*pp)[4] = &arr; int* p = (int*)(pp + 1); NSLog(@"%d", *(p-2)); // 结果:30二,场景二 int arr[4] = {10, 20, 30, ...
分类:
其他好文 时间:
2015-10-02 23:50:40
阅读次数:
365
第一个OC程序源码如下:#import int main(int argc, const char * argv[]){ @autoreleasepool{ NSLog(@"Hello,World!"); } return 0;}下面对这个输出"Hello,W...
分类:
其他好文 时间:
2015-10-01 16:28:31
阅读次数:
221
以上三个的注释可以从下面的代码依据个数拷贝和删除:/** * * * @param * * @param * * @param * * @return */NSLog(@"%@",);NSLog(@"%lu",(unsigned long));NSLog(@"");
分类:
其他好文 时间:
2015-09-30 16:13:54
阅读次数:
127
#import @implementation NSDictionary (Log)- (NSString *)descriptionWithLocale:(id)locale{ NSMutableString *str = [NSMutableString string]; [...
分类:
移动开发 时间:
2015-09-29 16:12:27
阅读次数:
185