摘要: 引自:http://www.cocoachina.com/bbs/read.php?tid=16561用到的提供soap接口的网址是:http://www.Nanonull.com/TimeService/这个页面有多个方法可以通过soap调用,页面上也有说明.如果用IE的浏览器还能看到此网页提供的wsdl文件.要做soap的webservice首先要了解一些关于webservice和soap的一些基本知识.下面几个网址可能会帮你快速入门.soap教程:http://www.w3school.com.cn/soap/index.asp使用WSDL发布WebService:http://blog 阅读全文
posted @ 2013-05-08 11:30 奔放小青年 阅读(1740) 评论(0) 推荐(1) 编辑
摘要: 引自:http://www.cocoachina.com/bbs/read.php?tid=1757%3C/p%3Estatic void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight){float fw, fh;if (ovalWidth == 0 || ovalHeight == 0) {CGContextAddRect(context, rect);return;}CGContextSaveGState(context);CGContextTranslat 阅读全文
posted @ 2013-05-08 10:59 奔放小青年 阅读(379) 评论(0) 推荐(0) 编辑
摘要: ZipArchive是一个开源的zip开发包工具。使用方法如下:创建/添加一个zip包ZipArchive* zipFile = [[ZipArchive alloc] init];//次数得zipfilename需要一个完整得路径,例如***/Documents/demo.zip[zipFile CreateZipFile2:@"zipfilename"];//有两种可选得方式进行创建压缩包,带密码和不带密码的[[zipFile CreateZipFile2:@"zipfilename" Password:@"your password&qu 阅读全文
posted @ 2013-02-20 17:32 奔放小青年 阅读(6025) 评论(0) 推荐(0) 编辑
摘要: NSString--实例化方法--------------NSString *str = [[NSString alloc] init];NSString *str = [[[NSString alloc] init] autorelease];注意:在NSString 中存在自己的实例化和初始化的方法 例如:NSString *str1 = [NSString stringWithCString:"new String" enconding: NSACIIStringEncoding];NSString *str2 = [NSString alloc] initWithC 阅读全文
posted @ 2013-02-19 11:19 奔放小青年 阅读(22229) 评论(0) 推荐(1) 编辑
摘要: - (void)textFieldDidBeginEditing:(UITextField*)textField { floatoffset =0.0f; if(self.txtField == textField) { offset = -180.0f; } NSTimeIntervalanimationDuration =0.30f; [UIView beginAnimations:@"ResizeForKeyBoard"context:nil]; [UIView setAnimationDuration:animationDuration]; floa... 阅读全文
posted @ 2012-12-11 15:17 奔放小青年 阅读(2313) 评论(0) 推荐(0) 编辑
摘要: 1、数字字符校验#defineNUMBERSPERIOD@"0123456789."-(BOOL)CheckInput:(NSString*)string{ NSCharacterSet*cs; cs=[[NSCharacterSetcharacterSetWithCharactersInString:NUMBERSPERIOD]invertedSet];NSString*filtered=[[stringcomponentsSeparatedByCharactersInSet:cs]componentsJoinedByString:@""];BOOLb 阅读全文
posted @ 2012-11-28 12:51 奔放小青年 阅读(1597) 评论(0) 推荐(0) 编辑
摘要: Xcode4下新建的项目info plist里Localization native development region改了,UIImagePickerController里还是都显示英文,原来xcode3生成的项目拿出来,修改plist就能显示中文,Xcode4下不光需要修改info plist里的Localization native development region为China(图1),而且还要设置一项project---->info---->LocalizationsLanguage加上Chinese,具体步骤参照下图(图2)。图1:图2: 阅读全文
posted @ 2012-11-26 11:18 奔放小青年 阅读(4722) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://www.cocoachina.com/newbie/tutorial/2012/1018/4939.html1、适配4英寸屏幕适配。 旧应用要与4英寸屏幕进行适配,需要创建一张Default-568h@2x.png图片,系统根据是否有此资源来识别是否支持4英寸屏幕。至于其他资源不允许使用xxx-568h.jpg此格式来适配屏幕,需要使用代码对屏幕进行检测来分别进行适配。2、UINavigationViewController的变化 今天开发过程中发现的,该类的initWithRootViewController在之前的版本是最终会调用到init方法的。因此在... 阅读全文
posted @ 2012-10-22 17:43 奔放小青年 阅读(1971) 评论(0) 推荐(0) 编辑
摘要: 很多用户用了好软件后忘记或嫌麻烦而不去 App Store 进行打分评星,为此开发者可以在应用中加入打分按钮,点击后直接跳转到 App Store 的评分界面。 App Store 上评论的链接地址是itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id = appID 此处的appID是在iTunes Connect创建应用程序时生成的Apple ID 所以可以用这段代码 NSString *str = [NSString str 阅读全文
posted @ 2012-10-22 17:19 奔放小青年 阅读(4561) 评论(0) 推荐(0) 编辑
摘要: 在开发游戏时,往往会有这么一个需求:在某个成就达成或者破纪录时,需要截个屏,然后发送到微博上与好友/粉丝分享,虽然home +开机键组合可手动截屏,在Cocos2d有个CCRenderTexture类,借助该类可很容易实现代码截取功能。使用CCRenderTexture,我们可以截取游戏场景、某个Layer,甚至是精灵:/**游戏截图 *@param node 需要截取的控件 */ - (void)snapshotScreen:(CCNode*)node { //取得屏幕大小 CGSize winSize = [[CCDirector sharedDirector]winSize]; ... 阅读全文
posted @ 2012-09-13 17:00 奔放小青年 阅读(967) 评论(0) 推荐(0) 编辑