赖有贤,1992年以《大唐游记》、《真命天子》进军漫画界,随后以连环漫画作品《小和尚》创下了台湾周刊连载七年的最长纪录,单行本更授权至法国、荷兰、比利时等欧洲国家。
作者: CouldHll
《L.I》
《李雷和韩梅梅》
《老男孩》
《赢家》
《奇迹世界》
《爱情公寓外传 》
intel酷睿广告。
子乔、一菲、关谷、小贤将要去马尔代夫旅行。
《爱情公寓外传》讲述了:子乔、一菲、关谷、小贤应宛瑜的邀请去马尔代夫集体旅行。一菲迅速把她的公寓短期出租给了自己的师姐——女强人杜茜茜(段倩茹饰)。听到这个消息的子乔也迅速在网上贴出了拍卖房间短期租约的启示,关谷则为了安全起见要求面试室友。杜茜茜把一菲A套间变成了公司的办公场所,同时开始招聘助理。AB套间,两个面试的场地同时迎来了三位面试者,崇拜茜茜的小雪(徐佳琦饰),电脑RSP小黑(董博睿饰),还有IT狂人郝酷(王楠饰)。三个人都阴差阳错的走错了面试的房间,笑话不断地对话之后,三个人都在爱情公寓里找到了他们留下来的理由,或者是为了爱情,或者是为了梦想,在短期租住爱情公寓的日子里,他们又会演绎多少爆笑而浪漫的故事呢?
cocos2d多个CCSprite同时运行带CCCallFuncN的Action后会造成调用丢失
问题描述:
昨天晚上通宵改Geely iPad的bug,这个bug改了8个小时。问题是程序会泄露导致崩溃。
问题分析:
项目使用的是cocos2d,所以也不能使用Instruments做性能测试。一步一步发现一个CCLayer没有dealloc,于是进去一步一步查,一段段的注释和启用。最后发现有了这段代码就会出现泄露崩溃:
[vBackground stopAllActions];
[vMenu stopAllActions];
id backgroundFaceAction=[CCFadeOut actionWithDuration:0.7];
id backgroundCallAction=[CCCallFuncN actionWithTarget:self selector:@selector(removeNode:)];
id backgroundSequenceAction=[CCSequence actions:backgroundFaceAction, backgroundCallAction, nil];
id menuFaceAction=[CCFadeOut actionWithDuration:0.7];
id menuCallAction=[CCCallFuncN actionWithTarget:self selector:@selector(removeNode:)];
id menuSequenceAction=[CCSequence actions:menuFaceAction, menuCallAction, nil];
[vBackground runAction:backgroundSequenceAction];
[vMenu runAction:menuSequenceAction];
其中调用的removeNode函数如下:
-(void) removeNode:(id)vNode
{
CCNode *node=vNode;
if (node.parent!=nil)
{
[self removeChild:node cleanup:YES];
}
}
改成直接removeChild掉两个CCSprite,就不崩溃了:
[self removeNode:vBackground];
[self removeNode:vMenu];
问题解决:猜想是两个CCSprite同一时间开始的两个CCAction后同时调用removeNode函数,但是一个调到了,一个调用不到。想来这个是一个cocos2d的bug。
《洛杉矶之战》
MPMoviePlayerViewController完成通知无效
问题描述:
今天做Geely,在cocos2d中加video,使用MPMoviePlayerViewController类。
代码如下:
// play video
NSString *videoPath=[[NSBundle mainBundle] pathForResource:@"110414_Gilly_Mix" ofType:@"mov"];
NSURL *videoUrl=[NSURL fileURLWithPath:videoPath];
MPMoviePlayerViewController *player= [[MPMoviePlayerViewController alloc] initWithContentURL:videoUrl];
player.view.backgroundColor = [UIColor blackColor];
player.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
player.moviePlayer.movieControlMode = MPMovieControlModeHidden;
[[[player moviePlayer] backgroundView] setBackgroundColor:[UIColor blackColor]];
[[[CCDirector sharedDirector] openGLView] addSubview:player.view];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[[player moviePlayer] play];
问题解决:
通知这段去掉object,改为:
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
调用成功,问题解决,但是不知道原因。