摘要: 参考文章:子龙山人(译)如何使用cocos2d制作基于tile地图的游戏教程:第一部分原文链接地址:http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d著作权声明:本文由http://www.cnblogs.com/andyque翻译,欢迎转载分享。请尊重作者劳动,转载时保留该声明和作者博客链接,谢谢因为条件的原因,家里没有imac,木有苹果系统,所以这阵子就先研究一下cocos2d android的东东,但发现网上搜索很多都是参考了这位大神的成果,参照iphone的一些例子程序把cocos2d 阅读全文
posted @ 2012-04-10 23:41 el. 阅读(987) 评论(0) 推荐(0) 编辑
摘要: 这个是基于IOS5.0的ImagePicker,所以都没有release,大家适当加上去吧~先上效果图:小牺牲一下我小侄吧...#import <UIKit/UIKit.h> @interface DemoViewController : UIViewController<UIImagePickerControllerDelegate,UINavigationControllerDelegate,UIActionSheetDelegate> @property (weak, nonatomic) IBOutlet UIImageView *selectedImage; 阅读全文
posted @ 2012-04-10 23:39 el. 阅读(866) 评论(0) 推荐(0) 编辑
摘要: 这个是使用一个切片,使其填充到整个NavigationBar上面。- (void)viewDidLoad { [super viewDidLoad]; UIImage *smallImage = [UIImage imageNamed:@"hc_03.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:smallImage]; [imageView setFrame:CGRectMake(0, 20, 320, 44)]; imageView.contentM... 阅读全文
posted @ 2011-12-07 13:04 el. 阅读(506) 评论(0) 推荐(0) 编辑
摘要: - (void)webViewDidFinishLoad:(UIWebView *)webView { [webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none';"]; }Customize the contextual menu of UIWebView 阅读全文
posted @ 2011-12-06 11:58 el. 阅读(187) 评论(0) 推荐(0) 编辑
摘要: NSString *htmlString = [NSString stringWithFormat: @"<html>" "<head>" "<meta name='viewport'" "content='width=device-width; initial-scale=1.0; maximum-scale=10.0;'" ">" ... 阅读全文
posted @ 2011-12-06 09:55 el. 阅读(1089) 评论(0) 推荐(0) 编辑
摘要: //修改删除按钮的文字 -(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { return @"删除"; } 阅读全文
posted @ 2011-12-05 10:42 el. 阅读(896) 评论(0) 推荐(0) 编辑
摘要: iPhoneApp获取文件教程是本文要介绍的内容,对于一个运行在iPhone得app,它只能访问自己根目录下得一些文件(所谓sandbox).一个app发布到iPhone上后,它得目录结构如下: 1、其中得 approot可以用 NSHomeDirectory() 访问到; 2、Documents 目录就是我们可以用来写入并保存文件得地方,一般可通过:NSArray*paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString*documentsDirector... 阅读全文
posted @ 2011-11-29 18:52 el. 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 上代码!关键代码: UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; [pasteboard setString:@"南方基地"]; 阅读全文
posted @ 2011-11-29 18:34 el. 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 不解释,直接上代码 NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSString *name = [infoDictionary objectForKey:@"CFBundleDisplayName"]; NSString *version = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; NSString *build = [infoDictionary objectForKey: 阅读全文
posted @ 2011-11-29 15:42 el. 阅读(2919) 评论(0) 推荐(0) 编辑
摘要: 开发环境:XCode4.2操作系统:Lion 10.7.21.打开XCode,选择Create a new Xcode project;2.新建一个空项目,Empty Application3.Next.输入产品名称与公司名。其他不用填。先简单介绍一下下面这三个东西,以后再研究。Core Data 是数据库操作的一个组件ARC是IOS5的新特性,不用再自己手动释放内存Unit Test是单元测试,但是我自己没用过。4.点击Create就搞掂了。但是现在Xcode4.2与以往的Xcode3不一样,没有了mainWindow这个东东,所以不习惯的童鞋可以使用一下步骤,自己新建一个mainWindo 阅读全文
posted @ 2011-11-28 19:46 el. 阅读(474) 评论(0) 推荐(0) 编辑