tiechui

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  iOS

iOS 开发相关
摘要:问题一:找不到 nsstring 新分类的方法。eg: nsstring otherMethod, 在OtherProject导入LocalProject, Header Search Path 已导入 头文件, FrameWork 导入 xxx.a,现象:编译错误,找不到nsstring otherMethod原因:因为otherMethod是 分类的方法, 而工程只找能看到的 NSString类的方法。解决:导入nsstring otherMethod的 .m文件到 LocalProject。 编译通过。问题二:下载测试工程,文件夹名 中间有空格(test 723),编译不通过原因:gdb 阅读全文
posted @ 2012-07-24 09:36 tiechui 阅读(163) 评论(0) 推荐(0)

摘要:http://www.itivy.com/iphone/archive/2011/11/29/how-add-tapkulibrary-to-xcode-project.html或者http://tangchuanyao.com/20120213451/ 阅读全文
posted @ 2012-07-24 09:22 tiechui 阅读(163) 评论(0) 推荐(0)

摘要:1重新download的source, 真机版总是编译不过。将时间改当前时间就ok。本人昨天为了安装xCode 3.2.4,讲时间调整到2012-1-1(否则安装失败)。忘记改回当前日期。结果今天出了这个bug。记录点点滴滴,有趣,有意义。2[self.navigationControllerpopViewControllerAnimated:YES];执行之后self.navigationController.viewControllers 为nil,需要注意pop后的 viewController的操作最好pop前操作。而self.navigationController pushView 阅读全文
posted @ 2012-05-23 13:40 tiechui 阅读(122) 评论(0) 推荐(0)

摘要:查看.app,和.dSYM与崩溃日志是否一致的方法:输入命令:dwarfdump ‐‐uuid MyApp.app/MyApp返回内容:UUID: E2D9D241‐37D3‐CE06‐7272‐653B813963E2 (armv6) MyApp.app/MyApp输入命令:dwarfdump ‐‐uuid MyApp.app.dSYM返回内容UUID: E2D9D241‐37D3‐CE06‐7272‐653B813963E2 (armv6)MyApp.app.dSYM/Contents/Resources/DWARF/MyApp对比结果是否一致.基本步骤,我们已了解的1.发布版本时,将.a 阅读全文
posted @ 2012-05-21 13:48 tiechui 阅读(3060) 评论(0) 推荐(0)

摘要:XCode的一些调试技巧2012-05-1509:450评论阅读数:1868单独窗口打印放大字号缩小字号 XCode 内置GDB,我们可以在命令行中使用 GDB 命令来调试我们的程序。下面将介绍一些常用的命令以及调试技巧。 po 命令 :为 print object 的缩写,显示对象的文本描述(显示从对象的 de XCode 内置GDB,我们可以在命令行中使用 GDB 命令来调试我们的程序。下面将介绍一些常用的命令以及调试技巧。po 命令:为 print object 的缩写,显示对象的文本描述(显示从对象的 description 消息获得的字符串信息)。比如:上图中,我使用 po 命令显示 阅读全文
posted @ 2012-05-21 10:51 tiechui 阅读(272) 评论(0) 推荐(0)

摘要:http://mobiledevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html应用程序互相跳转,在目标程序中注册一个scheme, 其他程序调用这个,就可以通过opeURL跳过来了 阅读全文
posted @ 2012-05-03 09:21 tiechui 阅读(152) 评论(0) 推荐(0)

摘要:NSString[[[NSStringalloc] initWithBytes:[data bytes] length:[data length] encoding:[selfresponseEncoding]] autorelease];有最大值限制,有时候解析不成 string, 此代码是asi[responseresponseString]中用到的。[[[NSString alloc]initWithData:data encoding:enc] autorelease];用nsdata不会有问题。 阅读全文
posted @ 2012-04-24 14:14 tiechui 阅读(1334) 评论(0) 推荐(0)

摘要:Date Field Symbol TableFieldSym.No.ExampleDescriptioneraG1..3ADEra - Replaced with the Era string for the current date. One to three letters for the abbreviated form, four letters for the long form, five for the narrow form.4Anno Domini5Ayeary1..n1996Year. Normally the length specifies the padding, 阅读全文
posted @ 2012-04-12 12:36 tiechui 阅读(1635) 评论(0) 推荐(0)

摘要:用GCC4.2编译,有个DE工程的GCC4.2 - Language->Gennerate Floating Point Library Call = YES Other C Flags = -mno-thumb -DNS_BLOCK_ASSERTIONS=1 Other C++ Flags而其他工程 设置为GCC4.2 - Language->Gennerate Floating Point Library Call = NO Other C Flags = 空 Other C++ Flags编译 ... 阅读全文
posted @ 2012-03-08 11:26 tiechui 阅读(406) 评论(0) 推荐(0)

摘要:加设备iphone/ipad 需要2个 Provisioning Profiles其中一个是Managed by Xcode,不能编辑。即 (dev.apple.com中)加不了 设备另一个可以通过edit ,加入新设备。解决方案:下载iOS Team Provisioning Profile: *, 添加到xcode中, 再从Organizer中删除。左侧顶部LIBRARY Provision Profiles->右侧中间底部 Refresh(同步dev.apple.com 中的证书), 此时Provisioning Profiles(Managed by Xcode) 添加了设备。再 阅读全文
posted @ 2012-02-29 23:40 tiechui 阅读(5049) 评论(1) 推荐(0)

摘要:如何做图片缩略图如何实现ipad相册中的图片翻动和其下方的图片缩略图自己扩展的方法- (NSImage *)resizeTo:(NSSize)newsize{NSRect rect=NSMakeRect(0, 0, newsize.width, newsize.height);NSImage *resizedImage = [[NSImage alloc] initWithSize:rect.size];[resizedImage lockFocus];[self drawInRect:rect fromRect:NSZeroRect operation: NSCompositeSourceO 阅读全文
posted @ 2011-11-02 18:00 tiechui 阅读(933) 评论(0) 推荐(0)

摘要:方法设置tableView的cell的背景。先设置好选中背景cell.selectedBackgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"xx.png"]] autorelease];设置选中[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];注意 文档中的方法 [cell setSelected:YES]; 无效;教训是指:一定要 阅读全文
posted @ 2011-09-06 15:44 tiechui 阅读(219) 评论(0) 推荐(0)

摘要:iphone ipa打包文件制作在XCode下做ipa很简单,现在我们来说说步骤..1.选择Device - 3.0 | Release模式,然后build2.到程序目录的bulid文件夹下,打开Release-iphoneos, 会发现里面有个.app文件和.app.dSYM文件.我们需要的是.app文件-- 文件夹地址:user/lib/Developer/Xcode/DeriveData/projectName/Build/Products/Debug-iphoneos3.建立一个Payload文件夹,把.app文件放入,用zip格式压缩这个 Payload文件夹,然后把扩展名改为.ip 阅读全文
posted @ 2011-09-05 16:08 tiechui 阅读(1669) 评论(1) 推荐(0)

摘要:So I have been struggling with this on RestKit for some time. What I finally figured out is that if I used explicit Header Search Paths, i.e. $(SOURCE_ROOT)/Libraries/RestKit/Build instead of relative Libraries/RestKit/Build, then the code sense starts working correctly. My team has verified this fi 阅读全文
posted @ 2011-08-16 09:19 tiechui 阅读(1096) 评论(1) 推荐(0)

摘要:很少做时间转换,转换了一个特殊格式的eg:Mon, 01 Aug 2011 01:07:30 GMT;从NSString 转到 NSDate方法如下- (NSString *)formatInfoDate:(NSString *)string { NSLog(@"string date: %@", string); NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; // 关键是拼写format,参见后面网址的格式列表,本人在time的HH和hh 上浪费了很都时间,用小hh是12进制,转24进制有时候nu 阅读全文
posted @ 2011-08-03 10:28 tiechui 阅读(1461) 评论(0) 推荐(0)

摘要:如何在XCode4中设置NSZombieEnabled点击scheme下拉菜单 -> 编辑scheme -> arguments, 然后将点击”加号”, 将NSZombieEnabled参数加到Environment Variables窗口中, 后面的数值写上”YES”.xCode3:target下有个executables打开它的info 在arguments栏下半边 加上个参数name:NSZombieEnabled value:yes 然后购上在debug模式下 以前的bad_access会多点log 帮你定位 阅读全文
posted @ 2011-07-01 13:17 tiechui 阅读(808) 评论(0) 推荐(0)

摘要:http://blog.csdn.net/xiazdong/archive/2011/03/15/6251582.aspx 阅读全文
posted @ 2011-05-29 21:12 tiechui 阅读(188) 评论(0) 推荐(0)

摘要:\SDK\bin\palm-log.bat参数:Usage: palm-log [OPTION...] [APP_ID]Display application logs from a Palm device.Options:-d, --device=DEVICE # specify DEVICE... 阅读全文
posted @ 2010-08-18 16:45 tiechui 阅读(308) 评论(0) 推荐(0)