随笔分类 -  09 屠虫笔记

摘要:之所以会报“Control reaches end of non-void function ”的警告,时因为方法名中缺少返回类型。正确的写法如下:+(void)setMobile:(NSString *)mobile 阅读全文
posted @ 2013-12-20 17:53 ygm900 阅读(3353) 评论(0) 推荐(0)
摘要:下载企业级证书打包的app 出现“正在下载”或“等待中”的图标并且无法删除的问题;原因分析:手机上的bundleid 与后台plist文件中的bundleid不一致导致的。解决方案:用plist文件中的bundleid重新申请一个证书,然后打包软件之后,安装在目标手机上,就可以冲掉原来删不掉的图标。参考:http://www.cocoachina.com/bbs/read.php?tid=162036延伸阅读:iphone4【等待中...】图标删不掉的解决办法 http://fanguoheng.diandian.com/post/2012-02-02/15924407 阅读全文
posted @ 2013-12-20 09:54 ygm900 阅读(1456) 评论(0) 推荐(0)
摘要:问题描述:在下载企业级证书打包的app 出现“无法下载应用程序”的问题解决办法:原来是生成plist文件时,设置url犯了一个致命的低级错误。如下 阅读全文
posted @ 2013-12-19 17:30 ygm900 阅读(814) 评论(0) 推荐(0)
摘要:关于ld: file is universal (2 slices) but does not contain a(n) armv7s slice升级了xcode之后,支持iOS6和iPhone5,不过Build项目的时候,出现了标题所示错误提示信息。原因是引用的第三方库导致了这个链接错误。解决办法有三个,随便哪种都能解决:1.升级涉及到的.a文件2.在target的Build Settings里面,将Build Active Architecture Only改成YES3.在target的Build Settings里面,找到Valid Architectures,删除其中的armv7s ( 阅读全文
posted @ 2013-12-17 10:53 ygm900 阅读(790) 评论(0) 推荐(0)
摘要:报错的代码:报错原因:多写了一个分号! 阅读全文
posted @ 2013-12-13 01:09 ygm900 阅读(17197) 评论(0) 推荐(0)
摘要:将这个页面的背景色设置为无色:[self.view setBackgroundColor:[UIColor clearColor]];或者self.view.frame = CGRectMake(0, 0, Screen_width, Screen_height-TabBar_height);修复前:UITabBar 的tabItem没有显示出来修复后:正常显示了。 阅读全文
posted @ 2013-12-13 00:24 ygm900 阅读(283) 评论(0) 推荐(0)
摘要:使用XCODE5.0,出现这个小错误。。。解决办法:选中你的XIB或storyboard,如下图再查看右边属性栏去掉最下边的Use Autolayout ,完成。转:http://blog.csdn.net/topbar/article/details/12345511 阅读全文
posted @ 2013-12-11 14:50 ygm900 阅读(1088) 评论(0) 推荐(0)
摘要:引人:iOS真机调试程序,报如下错误信息:failed to get the task for process XXX原因:证书问题,project和targets的证书都必须是开发证书,ADHOC的证书会出现此问题。解决方案:project和targets的证书使用开发证书。其他:failed to get the task for process XXXThis error happens when you have set Distribution Provisioning profile in code signing. Change it to Developer Provision 阅读全文
posted @ 2013-12-04 23:39 ygm900 阅读(922) 评论(0) 推荐(0)
摘要:iOS 上不建议在非主线程进行UI操作,在非主线程进行UI操作有很大几率会导致程序崩溃,或者出现预期之外的效果。我开始不知道这一点,在子线程中进行了弹窗操作,结果程序就出问题了!报的错误是(EXC_BAD_ACCESS(code=2,address=0xcc),0x1a0ad32: movl 204(%ecx), %edx),我以为是空指针导致的内存泄露,用了很多方法,但这问题感觉很顽固,困扰了我很多天。后来有位大牛指点了我,问我是不是在子线程进行这个弹窗操作。。。直到此时我才明白问题出在哪里,问题顺利解决。有时候出现bug却不知道是哪引起的,这时是最纠结的,等明确了问题所在,问题就不是问题了 阅读全文
posted @ 2013-12-04 10:54 ygm900 阅读(25235) 评论(1) 推荐(1)
摘要:解决如下:即某文件夹下出现多重子目录,级数很多,删除多余的子文件夹即可。至于如何产生的,有人说是xcode升级导致,不过没有见证 。我的不属于这类情况的。(参见:http://macosx.com/forums/mac-os-x-system-mac-software/321289-error-code-8060-cant-access-files-were-once-there.html) 阅读全文
posted @ 2013-09-12 09:27 ygm900 阅读(1001) 评论(0) 推荐(0)
摘要:模拟器默认的配置种没有“小地球”,只能输入英文。加入中文方法如下:找到模拟器的Settings--->General-->Keyboard-->International KeyBoards-->Add New Keyboard-->Chinese Simplified(PinYin) 即我们一般用的简体中文拼音输入法,配置好后,再输入文字时,点击弹出键盘上的“小地球”就可以输入中文了。 阅读全文
posted @ 2013-09-09 13:11 ygm900 阅读(16490) 评论(0) 推荐(0)
摘要:解决方案:将项目的Debugger模式设置为 GDB 即可。(LLDB下不打印中文)第一步:第二步: 阅读全文
posted @ 2013-07-18 11:44 ygm900 阅读(1183) 评论(0) 推荐(0)
摘要:先确认证书是否正确再确认Bundle Indentifier 是否与证书匹配再确认Deployment Target 为:sdk从6.0改为4.3如果xcode还无法识别iphone, Xcode->window->Organizer->Devices查看测试机连接状态是否为绿色,如果无法连接,我记得有个use for development选项,点击就可以了; 当然所有的前提是你的设备的UDID已经添加到测试机里,或是为越狱机、Xcode必须已安装你的设备对应的编译环境转http://blog.sina.com.cn/s/blog_8aecea5f0101axhf.html 阅读全文
posted @ 2013-07-15 18:01 ygm900 阅读(1897) 评论(0) 推荐(0)
摘要:1、使用类目在我们的静态库中涉及到 类目 catagory的使用时,会崩溃;此时我们需要设置project的Info里面的Link Flag处,增加-all_load,这样会链接所以存在的symbol;这是我们常用的一种处理方法,除此之外我们还可以使用以下方法:若我们使用了类目"NSObject+SBJSON.h"我们在h,m文件分别增加以下声明@interface DummyClass_NSObject_SBJSON {}@end@implementation DummyClass_NSObject_SBJSON@end2、使用nib若封装静态库的时候我们使用了xib文件 阅读全文
posted @ 2013-07-15 13:36 ygm900 阅读(1649) 评论(0) 推荐(0)
摘要:1. warning: Semantic Issue: Writable atomic property 'number' cannot pair a synthesized setter/getter with a user definedsetter/getter 指示在AFItemView.m文件2.warning: Semantic Issue: Writable atomic property 'numberOfImages' cannot pair a synthesized setter/getter with a user definedsett 阅读全文
posted @ 2013-07-10 16:15 ygm900 阅读(1790) 评论(0) 推荐(0)
摘要:Undefined symbols for architecturei386:“_OBJC_CLASS_$_XXX”,referenced from:objc-class-ref in XXXld: symbol(s) not found for architecture i386clang: error: linker command failed with exit code 1 (use -v to see invocation)如果真机调试就是 undefined symbols for architecture armv7错误!发生这种错误通常是project.pbxproj这个文件 阅读全文
posted @ 2013-07-09 10:37 ygm900 阅读(30125) 评论(0) 推荐(1)
摘要:duplicate symbol _main in: /Users/mb467/Library/Developer/Xcode/DerivedData/barChartDemo-gevlnavnpanltbgqdweijouguhcx/Build/Intermediates/barChartDemo.build/Debug-iphoneos/barChartDemo.build/Objects-normal/armv7/main-CCADE8545E02147B.o /Users/mb467/Library/Developer/Xcode/DerivedData/barChartDemo-.. 阅读全文
posted @ 2013-07-08 21:33 ygm900 阅读(3877) 评论(0) 推荐(0)
摘要:MobileCoreServices.framework 丢失后,可通过如下方式找回:1、在同事机器上拷贝一个。路径:2、重装一个xcode实践:将xcode4.5下的文件拷到xcode4.3 可以正常使用。 阅读全文
posted @ 2013-07-05 16:00 ygm900 阅读(2371) 评论(0) 推荐(0)
摘要:如果使用Xcode 4.5来新建项目,默认是支持AutoLayout的,但是AutoLayout是iOS 6的新特性,如果在iOS 5的simulator上运行程序,会出现Could not instantiate class named NSLayoutConstraint问题。解决方法是打开storyboard文件,去掉AutoLayout的选择。rob mayoff的神图一目了然。转:http://procoder.cnblogs.com 阅读全文
posted @ 2013-06-30 11:34 ygm900 阅读(212) 评论(0) 推荐(0)