24 2011-7
相关新闻阅读:http://news.xinhuanet.com/games/2011-06/29/c_121601311.htm
这里有几个看点:
1)众所周知,苹果对带有非苹果支付渠道的APP的态度可不友好,此前亚马逊、ebay都吃了闭门羹,Apple默认这种代理模式了吗?
2)任玩堂ewtang.com原来是三国塔防的东家,呵呵,以前一直不知道。
3)自此,我们可能会看到各大PC游戏巨头会涉足移动市场的消息了。
19 2011-7
在Mac上截图其实很简单,但很多人只知道Command-Shift-3和Command-Shift-4,却不知道Mac的截图快捷键其实还有很多增强,具体如下:
1)Command-Shift-3: 将整个屏幕拍下并保存到桌面。
2)Command-Shift-Control-3:将整个屏幕拍下并保存到剪贴板(Clipboard),你可以Command+V直接粘贴到如Photoshop等软件中编辑。
3)Command-Shift-4:将屏幕的一部分拍下并保存到桌面。按下这个组合键后,光标会变为一个十字,你可以拖拉来选取拍摄区域。
...
19 2011-7
Xcode 也有许多快捷键,编程的同时使用它们可以提高你的效率,一起试试吧。
其中 Opt ⇔ Alt 键。
Opt+Cmd+↑
在 .h/.m 文件间切换 : 你是否经常在 .h/.m 文件直接频繁切换呢?一般是点击左边的「组和文件」来选择,但是使用快捷键将更加方便。
Opt+高亮符号+双击
检索高亮处函数的帮助,比如如下所示:
当你在 dictionaryWithObjectsAndKeys: 上一边按下Option键一边在dictionaryWithObjectsAndKeys: 上双击,将显示该函数帮助。
...
19 2011-7
在iOS下编写TableView是很容易的。
最简单的TableView比如实现这样的效果:
首先创建一个view based application:
接着,修改view xib文件,将TableView拖拽到view中:
右侧图是拖拽后的效果。然后是建立关联,需要建立两个:
dataSource,连接到数据源,这样TableView才知道显示数据的信息
delegate,连接到TableView delegate,回调它来和应用的逻辑部分交互
都连接到Controller即可,即file’s owner:
...
19 2011-7
- (void) applicationDidFinishLaunching: {
NSTimer *_timer = [[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(onTimer) userInfo:nil repeats:YES] retain];
}
// call function when time is up (in this exemple :1 second. to change it, change scheduledTimerWithTimeInterval: 1 to value in second)
...
19 2011-7
一、获取系统所支持的国际化信息
在国际化之前,你可以在iphone中的”设置->通用->多语言环境->语言”中来查看你的iphone支持哪些语言,当然也可以写一段代码测试一下你的iphone都支持哪些语言.测试代码如下:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults objectForKey: @"AppleLanguages"];
NSLog(@"%@", languages);
...
19 2011-7
-(void)applicationDidFinishLaunching: (UIApplication *)application
{
// Create the two views to transition between, and add them to our containerView. We'll hide the second one
// until we are ready to transition to it.
UIImage *image1 = [UIImage
...
19 2011-7
实现iphone漂亮的动画效果主要有两种方法,一种是UIView层面的,一种是使用CATransition进行更低层次的控制,
第一种是UIView,UIView方式可能在低层也是使用CATransition进行了封装,它只能用于一些简单的、常用的效果展现,这里写一个常用的示例代码,供大家参考。
[UIView beginAnimations:@"Curl"context:nil];//动画开始
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
...
19 2011-7
新建一个ViewBased项目名xxx,将以下代码替换掉xxxViewController的viewDidLoad方法
- (void)viewDidLoad
{
NSURL * imageURL = [NSURL
URLWithString:@"http://ftp.javaeye.com/aywy7vd/javaeye/banner.jpg"];
NSData * imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage * image = [UIImage imageWithData:imageData];
...
19 2011-7
将图片保存在一个数组中,通过UIImageWriteToSavedPhotosAlbum进行保存
//in the .h file put:
NSMutableArray
*myPhotoArray;
///then in the .m
-
(void) viewDidLoad { myPhotoArray =
[[NSMutableArray alloc]init];
}
//However Your getting images
-
(void) someOtherMethod {
UIImage
...