摘要: 眼看iOS9就要出了。最近做项目用的系统的UITabBarController,就mark一下遇到的问题。系统默认的UITabBarController使用storyboard可以进行设置。下面主要是讲代码设置tabbar的图片与颜色。1.tabbar的背景颜色或背景图(如图灰色效果) tab... 阅读全文
posted @ 2015-07-30 19:23 罗凇 阅读(558) 评论(0) 推荐(0) 编辑
  2015年7月28日
摘要: [button setBackgroundImage:backImage forState:UIControlStateNormal]; [button setBackgroundImage:backImage forState:UIControlStateHighlighted]; ... 阅读全文
posted @ 2015-07-28 17:34 罗凇 阅读(681) 评论(0) 推荐(0) 编辑
  2013年6月19日
摘要: 自定义tabar,看了很多网上的例子, 和我要做的效果不一样,一直没有找到合适的.看了一篇How to Customize UITabBar on iOS 5效果非常的好.Building the new version of the app Blocos de Rua I was challenged to customize the UITabBar so it meets what the designer wants. In iOS 5 this is pretty easy to do but I haven’t figured out the proper way to do it 阅读全文
posted @ 2013-06-19 18:26 罗凇 阅读(632) 评论(0) 推荐(0) 编辑
  2013年6月18日
摘要: 转自 http://blog.csdn.net/sirodeng/article/details/8433028系统自带(四种效果):presentModalViewController模态的动画效果设置:UIViewController *detailViewController = [[UIViewController alloc] init]; detailViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl; // 设置动画效果 [self presentModalViewControl... 阅读全文
posted @ 2013-06-18 12:10 罗凇 阅读(303) 评论(0) 推荐(0) 编辑
  2013年4月12日
摘要: 星座的查询: /* 星座转换 入参date:用户的生日 example:@"8.22" */-(NSString *)constellatoryChange:(NSString *)date{ NSArray * array = [date componentsSeparatedByString:@"."]; if ([array count]!= 2) { NSLog(@"日期转换错误,按照YY.DD格式,例:8.22"); return nil; } int x = [[array objectAtI... 阅读全文
posted @ 2013-04-12 15:17 罗凇 阅读(234) 评论(0) 推荐(0) 编辑
  2013年1月17日
摘要: 1 void UIImageFromURL( NSURL * URL, void (^imageBlock)(UIImage * image), void (^errorBlock)(void) ) 2 { 3 dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^(void) 4 { 5 NSData * data = [[[NSData alloc] initWithContentsOfU... 阅读全文
posted @ 2013-01-17 12:08 罗凇 阅读(755) 评论(0) 推荐(0) 编辑
  2012年11月13日
摘要: 今天主要搞的动作:下面的代码是通常调用某个动作的方法:// 创建动作id actionTo = [CCMoveTo actionWithDuration: 2position:ccp(s.width-40, s.height-40)];// 使用动作。(说明:tamara 是一个 CCSprite。)[tamara runAction: actionTo]; //如果要重复使用某个动作,需要考虑手工 retain。 三个方面来介绍动作一。瞬时动作顾名思义。瞬时动作就是不需要时间,马上就完成的动作。瞬时动作的共同基类是 InstantAction。  放置 – Place 效... 阅读全文
posted @ 2012-11-13 18:47 罗凇 阅读(181) 评论(0) 推荐(0) 编辑
  2012年11月8日
摘要: 一直很忙没工夫仔细的研究下2d。终于有时间来做自己喜欢的事情了。好吧,现在手里有了安装包,知易的教程和源码,还有一本中文教程。装好了库,xcode4.4 + cocos2d1.0.1版本。虽说已经有2.0了,但是都差不多就这个吧。省着再去下载了,公司网络也不怎么好。原库里头有实例。这里的文章不会是教程,不可能全部讲解。只是记下我在学习时自己感到有些需要研究的地方,就说明下,给自己个深刻的记忆。第一个比较迷糊的地方就是锚点和positon了,一开始没反应过来。默认anchorpoint是(0.5,0.5),为你所设图形或者精灵的中心c的位置。如果你设置为(0.3,0.5),图中红点的位置,那么他 阅读全文
posted @ 2012-11-08 18:34 罗凇 阅读(239) 评论(0) 推荐(0) 编辑