上一页 1 2 3 4 5 6 7 ··· 9 下一页

2012年11月2日

在应用里调用app store 评分页面

摘要: [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=477935039"]]; 阅读全文

posted @ 2012-11-02 17:21 kiao295338444 阅读(138) 评论(0) 推荐(0) 编辑

使用instrument查找EXC_BAD_ACCESS问题

摘要: You can see the malloc stack if you debug using instruments.I encountered the same problem as you and similarly wanted to know how to get the malloc history when using lldb. Sadly I didn't find a nifty command likemalloc-historyfound in gdb. To be honest I just switched my debugger over, but I f 阅读全文

posted @ 2012-11-02 17:20 kiao295338444 阅读(247) 评论(0) 推荐(0) 编辑

用lookup 查看llvm的内存对象

摘要: image lookup --address 0xec509b详细:http://lldb.llvm.org/lldb-gdb.html 阅读全文

posted @ 2012-11-02 17:19 kiao295338444 阅读(172) 评论(0) 推荐(0) 编辑

2012年10月17日

没有降低图片质量情况下修改图片大小

摘要: +(UIImage*)scale:(UIImage*)image toSize:(CGSize)size{UIGraphicsBeginImageContextWithOptions(size,NO,0.0);//用这个方法替代UIGraphicsBeginImageContext(size)[image drawInRect:CGRectMake(0,0, size.width, size.height)];UIImage*scaledImage =UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext(); 阅读全文

posted @ 2012-10-17 17:07 kiao295338444 阅读(209) 评论(0) 推荐(0) 编辑

2012年10月10日

NSData转NSString

摘要: 这种方法效率低下NSData *data = UIImagePNGRepresentation(image); NSMutableString *picStr = [NSMutableString stringWithString:@"["]; Byte *dataByte = (Byte *)[data bytes]; int length = [data length]; //字节流转nsstring; for(int i = 0;i < length;i++){ [picStr appendFormat:@"%d,",(int8_t)data 阅读全文

posted @ 2012-10-10 17:26 kiao295338444 阅读(153) 评论(0) 推荐(0) 编辑

2012年10月9日

iphone中获取两个矩形的相交区域

摘要: 转自:http://sdlqhjk.iteye.com/blog/1067560//definiton a rectCGRect rect1 = CGRectMake(0.0f, 0.0f, 320.0f, 480.0f);//获取2个矩形的相交区域rect = CGRectIntersection(rect, bounds);//create smaller or bigger rect(have same center)CGRect rect2 = CGRectInset(rect, 32.0f, 32.0f);//CGRect and NSStringNSString *string = 阅读全文

posted @ 2012-10-09 09:18 kiao295338444 阅读(266) 评论(0) 推荐(0) 编辑

ios, iphone , objective C 随机数

摘要: Objective-C 没有提供相关的函数生成随机数,不过C供了rand(), srand(), random(), srandom(), arc4random(),randomize()几个函数。要引用头文件#include<stdlib.h> 其中,random()和randomize()函数的使用的方法分别与rand()和srand()函数的使用方法对应类似。arc4random()不用seedintrand(void);voidsrand(unsignedintn);randomize();arc4random();intrandom(void);voidsrandom(u 阅读全文

posted @ 2012-10-09 09:15 kiao295338444 阅读(310) 评论(0) 推荐(0) 编辑

2012年10月8日

ASIHttpRequest-发送数据(转自梦维)

摘要: 原文地址:http://www.dreamingwish.com/dream-2011/powerful-asihttprequest-library-c.html发送数据设定request头ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];[request addRequestHeader:@"Referer" value:@"http://www.dreamingwish.com/"];使用ASIFormDataRequest POST表单通常数据是以’application/ 阅读全文

posted @ 2012-10-08 15:04 kiao295338444 阅读(265) 评论(0) 推荐(0) 编辑

iOS通过http post上传图片

摘要: 转自:http://borissun.iteye.com/blog/1338991由于iOS无法通过html表单来上传图片,因此想要上传图片,必须实现http请求,而不能像其他语言那样通过html表单的post就能上传。上传图片的http post请求的格式是这样的:Java代码Content-type:multipart/form-data,boundary=AaB03x--AaB03xcontent-disposition:form-data;name="field1"HelloBoris!--AaB03xcontent-disposition:form-data;na 阅读全文

posted @ 2012-10-08 15:02 kiao295338444 阅读(646) 评论(0) 推荐(0) 编辑

2012年9月23日

旧工程适配iOS6和iPhone5的一些故事(转自cocoachina)

摘要: 苹果每发布一个系统,都够开发者忙活一阵的,更新xcode适配新系统:像iOS4支持Retain需要@2x的图;像iOS5不支持udid;像现在的iOS6和iPhone5要面对的下面的一堆问题。1.添加Retina 4 launch image,运行工程的时候会主动提示你。这时候直接点Add就好了。会默认添加一张Default-568h@2x.png的黑图:不添加的话,程序运行起来会上下有黑边儿的哟添加完以后的效果这个地方再啰嗦两句:当透明第一次在群里说要添加这么一张图的时候,我的第一反应是:那不是程序启动的时候会有一张黑图么?而我的程序是不需要启动图的。而当自已添加这张图的时候才发现,这个担心 阅读全文

posted @ 2012-09-23 15:17 kiao295338444 阅读(183) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 9 下一页

导航