自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(63)
  • 资源 (7)
  • 收藏
  • 关注

原创 Xcode 6 新建工程运行在 iOS 7 上下有黑边的问题

原因:Xcode 6 默认新建的启动页面为 LaunchScreen.xib,系统通过检测是否有这个文件,来判断 app 是否支持 iphone 6 & 6 plus. 如果要支持 iOS 7,还必须添加 Launch Image assets. 如果 app 要支持 iOS 7但是没有设置 Launch image assets ,在 iOS 7 上运行上下...

2014-11-02 10:01:00 169

原创 怎么创建 UITableViewCell 的 xib

1. 新建文件,选择 User Interface->View-> MyCell, 生成 MyCell.xib2. 打开 MyCell.xib ,删除自带的 View3. 拖拽一个 Cell 到 该 xib 通过以上步骤就生成了根 view 为 UITableViewCell 的 xib 文件...

2014-10-27 13:08:30 137

原创 iOS 调试问题小结

1. XCode 提示 ”set a breakpoint in malloc_error_break to debug “时,如何设置 malloc_error_debug? solution: Step 1: Set a breakpoint on malloc_error_break() by opening the Breakpoint Navigator (Vie...

2014-06-12 11:17:04 259

原创 Java 实现字符串的回文判断

思路:用递归的方法;第一步为判断0和最后一个字符是否一样实现: package palindrome;public class Palindrome{ /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method s...

2014-03-17 10:58:19 233

原创 java 实现字符串逆置

题目: 写一个函数,将一个字符串变成倒序,结果存于原字符串,不得额外分配空间保存字符串。例如:abcdef 经变换后为 fedcba算法思路: 采用递归算法,字符两两交换。package reverseString;public class ReverseString{ /** * @param args */ publi...

2014-03-17 10:35:35 1665

原创 Could not launch " app name"

“could not launch app name”这个问题经常遇到,很讨厌。终于集齐了可以解决该问题的方法,要么一种方法即可以解决问题,要么这些方法得齐上阵。 1. 删除机器或模拟器上已经安装的该 app; 2. 删除 Derived Data: Shift+Command+2, 在 Projects 栏目下,右侧找到该工程,然后在左侧点击 Delete 按钮,...

2013-12-19 11:11:11 111

原创 Why iOS 5.x doesn't work under Maverick

The iOS simulator does not duplicate some of the low-level parts of iOS. For example, it uses the host OS X's kernel instead of trying to virtualize the iOS kernel. The iOS simulator requires that the...

2013-12-19 09:52:22 101

原创 How to know whether a project uses ARC

There are 2 method to check whether a project is using ARC.1. Select the project, open Build Settings. Look for Objective-C Automatic Reference Counting in the Apple LLVM Compile - Language section....

2013-12-17 11:17:06 83

原创 kAudioSessionIncompatibleCategory

A Note About kAudioSessionIncompatibleCategory Error on iOS 5 and 6There is bug apparent on both iOS 5 and 6 (but not iOS 7) that manifests in apps that use the PlayAndRecord audio session categor...

2013-12-13 10:30:18 84

原创 把 iOS app logs 写入 documents 文件夹

Now, in order to tell your app to redirect the NSLog() outputs to a file, you should do something like this:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMas...

2013-12-06 17:15:03 262

原创 用 lipo 命令裁剪出需要的 architecture

[size=medium] iOS 上的 framework 和 .a 库一般会同时支持多个 architecture, 比如 i386, armv7, armv7s 等。 为了减小程序的尺寸,可能需要裁剪掉不需要的 architecture, 这时就需要使用 lipo 命令给程序瘦身。 Step1: 查看目标库文件支持的 architecture, 两个选择 ...

2013-11-06 15:23:08 335

原创 写文件,真机和模拟器是不一样的

在真机上,只能往 Documents 和 tmp 目录下写文件。因为文件夹Resouces是只读的,无法写入。document 和temp文件夹的东西才是可读写的。 在模拟器上没有这个限制。 血泪教训啊!...

2013-10-17 22:30:46 115

原创 setValue:forUndefinedKey

使用 Storyboard 创建并管理 UI 时,在运行 app 的时候出现了 2013-10-15 09:21:03.212 TestMSR[610:11303] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this...

2013-10-15 09:54:48 180

原创 创建 Empty Application时, storyboard 不显示的问题

原因: 1. 创建 Empty Application 时没有 Using Storyboard 选项,需要手动创建 MainStoryboard。 2. Changed Main Storyboard in Target's Summary view 3. For an Empty Application, the default implementa...

2013-10-15 09:49:17 123

原创 OC 和 C++ 混编

原文出处: http://blog.csdn.net/fengsh998/article/details/8010696个人要点总结: 在 Xcode 中,Compile Sources As 的默认选项为 According to File Type。不改变该设置的前提下,如果要在某个类中使用 C++ 代码,则必须把该类的后缀由 .m 改为 .mm....

2013-10-08 15:45:55 123

原创 Objective-C 中,@class & #import 的区别

Key points: "#Import" links the header file it contains. Everything in the header, including property definitions, method declarations and any imports in the header are made available. Import pro...

2013-09-29 10:38:27 90

原创 Xcode如何打包ipa安装包

http://jingyan.baidu.com/article/ceb9fb10f4dffb8cad2ba03e.html关键步骤:1. 设置 debug 和 release 的证书2. scheme 中,build configuration 设置为 release3. 选择菜单栏中的"Product"->"Archive"...

2013-09-05 11:41:17 107

原创 项目打包后出现第三方JAR包找不到

Elipse 升级到 Version: Juno Service Release 2 后,ADT 也相应的升级到最新了。 结果在 Android 项目打包后出现第三方 Jar 包找不到的问题。 原因:新版本里所有的第三方JAR包引入都被放入了Android Private Libraries中 解决方案:http://my.oschina.net/yzw/bl...

2013-09-03 11:15:42 712

原创 iOS 与 Armv6 Armv7 i386

[size=large][size=medium]Armv6 binaries are needed if you’re targeting iPhone3G (yes, they still exist, my co-worker uses one, can u believe it?);Armv7 binaries are desirable if you’re targeting...

2013-08-23 16:39:26 94

原创 Difference: Category and Protocol

http://www.cnblogs.com/chijianqiang/archive/2012/06/22/objc-category-protocol.html

2013-07-14 16:45:29 78

原创 java java synchronized详解

http://www.cnblogs.com/GnagWang/archive/2011/02/27/1966606.htmlkey words: 对象锁

2013-05-06 10:44:59 61

原创 手机开发-如何查看android数据文件?

http://jingyan.baidu.com/article/7908e85c4e3575af481ad213.html

2013-04-18 14:00:17 202

原创 匿名内部类只能访问final 的原因 2013.03.06

http://dzh.mop.com/whbm/20120408/0/zgz8S7I29498c3F3.shtml?only=0http://hi.baidu.com/jt763844132/item/9e838a480848d69f823ae12a

2013-03-06 10:26:16 78

原创 iOS 查看各个函数的执行顺序

- (BOOL)respondsToSelector:(SEL)aSelector{ printf("selector------->:%s\n",[NSStringFromSelector(aSelector) UTF8String]); return [super respondsToSelector:aSelector];}

2013-01-04 16:10:22 436

原创 HOW TO ADD PHOTOS TO THE IPHONE SIMULATOR

Building an app that needs to access the photo library but don’t have any photos in the iPhone simulator? No problem. Follow these simple steps to import photos into the iPhone Simulator:Open the iP...

2012-12-25 15:49:29 149

原创 AutoReleasePool 学习笔记

1. In a reference-counted environment, an NSAutoreleasePool contains objects that have received autorelease message. When the pool drained, it sends release message to each of the objects.2. The A...

2012-11-14 18:49:07 90

原创 截取部分图片并显示

src : http://marshal.easymorse.com/archives/3703

2012-09-14 11:15:45 169

原创 va_start和va_end使用详解

src : http://www.cnblogs.com/hanyonglu/archive/2011/05/07/2039916.html  本文主要介绍va_start和va_end的使用及原理。  在以前的一篇帖子Format MessageBox 详解中曾使用到va_start和va_end这两个宏,但对它们也只是泛泛的了解。  介绍这两个宏之前先看一下C中传递函数的参...

2012-09-07 11:40:22 69

原创 iPhone/iPad全屏截图与区域截图的几种方法

http://www.cocoachina.com/newbie/tutorial/2012/0905/4709.html1. 截取本区域(self.view):UIGraphicsBeginImageContext(CGSizeMake(self.view.frame.size.width, self.view.frame.size.height)); [self....

2012-09-06 13:48:14 155

原创 【转载】将int型数据转换成任意进制字符串的算法

1. http://hi.baidu.com/doking_blog/blog/item/5fd80a139a717159f919b840.html2. 将int型的数转换成 String : string to_string(int n) { string s=""; while(n) { s=char(n%10+'0')+s; n/=10;...

2012-08-28 09:50:19 155

原创 iOS 使用 predicate 限定 NSNumber 类型的数据

错误的写法: predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"linkId != %d", self.toMergerdContactLinkId]];正确写法: predicate = [NSPredicate predicateWithFormat:[NSString st...

2012-07-02 13:25:10 208

原创 在Mac OS X Lion系统中访问~/Library目录都需要点技巧

Mac虚拟机升级为Lion系统了,在iPhone模拟机调试时经常想访问应用程序的Document目录看看里面发生的状况,但在Lion系统中却找不到~/Library/Application Support/iPhone Simulator文件夹了。原来需要在Finder中这个~/Library文件夹默认是隐藏的,需要用特殊的办法才能显示。第一种办法:在Finder中,按住Optio...

2012-07-02 10:52:51 500

原创 Error Domain=NSOSStatusErrorDomain Code=-9807

Client 端连接服务器时会有时会遇到一下错误: Error Domain=NSOSStatusErrorDomain Code=-9807 "The operation couldn’t be completed. (OSStatus error -9807.)" UserInfo=0xaeaae0 -9807 对应的错误描述为:errSSLXCertChainI...

2012-06-14 10:28:46 1982

原创 iOS 的 keychain 简介

src: http://www.cnblogs.com/v2m_/archive/2012/01/18/2325782.html

2012-05-03 10:38:57 135

原创 iOS 监听App音量的变化

方法1: 在applicationDidFinishLaunching函数里添加 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(volumeChanged:) ...

2012-03-31 18:02:37 271

原创 Exception and Signal

src:http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=%2Fcom.ibm.db

2012-03-27 15:11:45 112

原创 Handling unhandled exceptions and signals

src:http://cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html

2012-03-27 14:54:54 103

原创 操作CoreData 常见的错误及解决方法

src: http://blog.csdn.net/ch_soft/article/details/6674224

2012-03-07 18:06:31 187

原创 scrollViewDidScroll 和scrollViewDidEndScrollingAnimation的区别

UIScrollViewDelegate has got two delegate methods scrollViewDidScroll: and scrollViewDidEndScrollingAnimation: but neither of these tell you when scrolling has completed. scrollViewDidScroll o...

2012-02-23 11:30:15 273

原创 iOS自定义风火轮UIActivityIndicator

src:http://blog.csdn.net/kmyhy/article/details/6869260苹果无敌风火轮如果不是那么酷的话,我们就不需要定制它了。可惜的是,UIActivityIndicator只有一个初始化方法 initWithActivityIndicatorStyle,我们一不能任意改变它的大小——有时候我们需要一个比 UIActivityIndicatorVi...

2012-02-15 23:07:05 220

2009年研究生入学考试计算机统考大纲-完整版.pdf

2009年起,计算机专业实行全国统考, 附件为2009年研究生入学考试计算机统考大纲(-完整版 pdf版)

2009-07-24

J2EETutorial

J2EETutorial (pdf_英文版)sun公司官方网站上发布的。

2009-04-17

MasteringJavaServerFaces(PDF版)

MasteringJavaServerFaces(pdf英文版) 基于事件驱动的表现层框架。

2009-04-17

XML之JDOM.jar

强大的XML,加上强大的java。用JDOM操作你的数据。

2008-11-18

visual c# 2005 express edition

visual c# 2005 express edition ,快速开发C#程序。界面友好!

2008-11-18

Axure RP教程(中文版)

Axure RP用于原型设计的工具。非常强大。 教程讲的不是很全,需要大家继续探索。

2008-11-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除