2012年5月28日

解决问题:The icon file must be 57x57 pixels, in .png format (-19014)

摘要: 来自:http://www.cocoachina.com/bbs/read.php?tid=93600最近在编译更新应用得时候发现一个问题:提示说图片不合适尺寸,一直搞不明白,其实我的工程里面明明是有57x57和Icon.png和114x114的Icon@2x.png的图片,可是一直都报错误,每次上传都不成功。后来到Stackoverflow上面一查,原来是苹果Mac OS X10.7.3的版本带来的问题。好像记得之前cnbeta上面说过10.7.3是有Bug的,当时没注意.通过上面介绍的办法需要更新Applicateion Loader到最新得版本2.5.1https://itunescon 阅读全文

posted @ 2012-05-28 15:03 黯夜曦 阅读(303) 评论(0) 推荐(0) 编辑

2012年5月25日

Xcode 4 添加 Three20 的方法

摘要: 方法1A Visual Guide to Manually Adding Three20 to your Xcode 4 Project不过我到第5步的时候总是crash,尝试了重装Xcode,清Caches文件夹,删除com.Apple.dt.Xcode.plist文件均不成功,放弃方法2下载并安装githttp://code.google.com/p/git-osx-installer/,双击安装即可获取three20。打开终端,输入git clone git://github.com/facebook/three20.git回车后等待100%完成 3. 新建项目,比如 code/Th.. 阅读全文

posted @ 2012-05-25 10:37 黯夜曦 阅读(211) 评论(0) 推荐(0) 编辑

浏览Document文件夹下面的所有文件夹和文件列表

摘要: NSFileManager *fileManager = [NSFileManager defaultManager]; //在这里获取应用程序Documents文件夹里的文件及文件夹列表 NSString *documentDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, Y ES) objectAtIndex:0]; NSError *error = nil; NSArray *file... 阅读全文

posted @ 2012-05-25 10:00 黯夜曦 阅读(289) 评论(0) 推荐(0) 编辑

iphone中结束电话后返回自己的应用

摘要: 原文地址:http://blog.csdn.net/favormm/article/details/6034952大家想不想在自己的应用中拨打电话呀?打电话可以用openURL:这个API, 如:[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://10086"]];但是当电话结束后,返回的是系统的拨打电话界面,如何才能返回自己的应用呢?这儿有两种方法与大家分享。第一种是用UIWebView加载电话,这种是合法的,可以上App Store的。代码如下:// assuming you h 阅读全文

posted @ 2012-05-25 09:47 黯夜曦 阅读(181) 评论(0) 推荐(0) 编辑

获取文件夹大小

摘要: - (unsignedlonglongint)folderSize:(NSString *)folderPath { NSArray *filesArray = [[NSFileManagerdefaultManager] subpathsOfDirectoryAtPath:folderPath error:nil]; NSEnumerator *filesEnumerator = [filesArray objectEnumerator]; NSString *fileName; unsignedlonglongint fileSize = 0; NSError... 阅读全文

posted @ 2012-05-25 09:45 黯夜曦 阅读(186) 评论(0) 推荐(0) 编辑

开发中的一些小细节代码分享

摘要: 1.Label字体颜色的设置textLabel.highlightedTextColor = [UIColor colorWithRed:110.0/255.0 green:93.0/255.0 blue:112.0/255.0 alpha:1.0]; 选中之后的高亮颜色,颜色的设定要使用“色值/255.0”,只给出色值的话不能够设定颜色。 2.Button上文字的对齐方式self.myButton.titleLabel.textAlignment = UITextAlignmentLeft; 这样没有起到什么作用下面方法可行:[self.myButton setContentHorizont 阅读全文

posted @ 2012-05-25 09:43 黯夜曦 阅读(189) 评论(0) 推荐(0) 编辑

在iPhone应用里直接打开app store 评论页面的方法

摘要: 在iPhone应用里直接打开app store 评论页面的方法:[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=abc"]]; 更换下id号就可以。如果想要打开下载页面,把url改为:itms-apps://phobos.apple.com/WebObjects/MZStor 阅读全文

posted @ 2012-05-25 09:37 黯夜曦 阅读(304) 评论(0) 推荐(0) 编辑

微博140字,英文算半个字,中文算一个字,如何实现?

摘要: 函数名称: checkStringSize函数描述: string 字数限制输入参数:string:要判断的string ;minSize:最小字数限制;maxSize:最大字数限制输出参数: N/A返回值: BOOL:是否超出限制备注:一个汉字占两个字符,其他字母占一个字符******************************************************************************/-(BOOL)checkStringSize:(NSString*)string minSize:(int)minSize maxSize:(int)maxSize. 阅读全文

posted @ 2012-05-25 09:34 黯夜曦 阅读(373) 评论(0) 推荐(0) 编辑

應用程式的設定檔info.plist

摘要: 1.Application does not run in background(鍵名:UIApplicationExistsOnSuspend)自從iOS4.0之後,當你在應用程式執行的時候按下Home鍵,應用程式並不會中斷目前的執行,而是躲到背景去了。因此希望使用者在按下Home鍵之後就要中斷目前程式的執行,請勾選這個選項。2.Application requiresiPhoneenvironment(鍵名:LSRequiresIPhoneOS)iOS的家族繫ㄌㄧ誒主要包含了iPhone,iPad,iPod Touch這三種設備。因此如果你的應用程式只能在iPhone環境下使用的話,請勾選 阅读全文

posted @ 2012-05-25 09:33 黯夜曦 阅读(191) 评论(0) 推荐(0) 编辑

navigationController pushViewController动画

摘要: CATransition *animation = [CATransitionanimation]; [animation setDuration:0.3]; [animation setType: kCATransitionMoveIn]; [animation setSubtype: kCATransitionFromTop]; [animation setTimingFunction:[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionDefault]]; [self.naviga... 阅读全文

posted @ 2012-05-25 09:33 黯夜曦 阅读(191) 评论(0) 推荐(0) 编辑

导航