博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 73 下一页

2012年5月7日

摘要: iPhone系统的字体数量有限,并且多数对中文没有效果,下面介绍两种解决办法方法1: 添加对应的字体(.ttf或.odf)到工程的resurce,使用cocos2d中的FontLabel库,FontLabel继承于UILabel,象UILabel一样使用就好了 fontName直接使用添加的资源名字即可方法2; 1,添加对应的字体(.ttf或.odf)到工程的resurce,例如simkai.ttf 2,在info.plist中添加一项Fonts provided by application (item0对应的value为simkai.ttf,添加多个字体依次添加就可以了) 3,使... 阅读全文
posted @ 2012-05-07 10:36 Likwo 阅读(992) 评论(1) 推荐(0) 编辑

2012年5月4日

摘要: Layout对于迅速的搭建界面和提高界面在不同分辨率的屏幕上的适应性具有很大的作用。这里简要介绍Android的Layout和研究一下它的实现。Android有Layout:FrameLayout,LinearLayout,TableLayout,RelativeLayout,AbsoluteLayout。放入Layout中进行排布的View的XML属性:1.几种Layout中Item所共有的XML属性:(1)layout_width(2)layout_height注:(1)和(2)用来确定放入Layout中的View的宽度和高度:它们的可能取值为fill_parent,wrap_conten 阅读全文
posted @ 2012-05-04 14:08 Likwo 阅读(237) 评论(0) 推荐(0) 编辑

摘要: 1、引入头文件#include<sys/sysctl.h>#include<mach/mach.h>2、检测函数//MARK:可用内存-(double)availableMemory{vm_statistics_data_tvmStats;mach_msg_type_number_tinfoCount=HOST_VM_INFO_COUNT;kern_return_tkernReturn=host_statistics(mach_host_self(),HOST_VM_INFO,(host_info_t)&vmStats,&infoCount);if(ke 阅读全文
posted @ 2012-05-04 13:17 Likwo 阅读(1454) 评论(0) 推荐(0) 编辑

摘要: 简单说说 自己对 android LayoutParams的理解吧,xh写不出高级文章是低级写手。public static classViewGroup.LayoutParamsextends Objectjava.lang.Object ↳ android.view.ViewGroup.LayoutParams //继承关系以下说明摘自官方文档E文好的可以看看Class OverviewLayoutParams are used by views to tell their parents how they want to be laid out. See ViewGroup Layout 阅读全文
posted @ 2012-05-04 12:35 Likwo 阅读(304) 评论(0) 推荐(0) 编辑

摘要: 用Eclipse开发Android的时候 默认的XML是采用Android xml editor 打开,这个工具不够直观,如果想直接看文本的XML的话,可以通过如下方式修改1.菜单:Window -> Preferences -> General -> Editors -> File Associations2. File types: *.xmlAssociated editors:XML Editor*** -> Default在Associated editors选择框里点击“XML Editor*** ”,点击“Default”按钮。看到“XML Edit 阅读全文
posted @ 2012-05-04 10:39 Likwo 阅读(22602) 评论(1) 推荐(3) 编辑

2012年4月28日

摘要: 在xib文件中拖入UIWebView。使用代码为UIWebView的滚动控件增加搜索栏:UISearchBar* searchBar=[[[UISearchBar alloc]initWithFrame:CGRectMake(0, -44, 320, 44)]autorelease]; [self.browser.scrollView addSubview:searchBar]; self.topBar=searchBar;[[self.browser scrollView] setContentInset:UIEdgeInsetsMake(44, 0, 0, 0)]; self.bro... 阅读全文
posted @ 2012-04-28 17:53 Likwo 阅读(1067) 评论(0) 推荐(0) 编辑

2012年4月27日

摘要: CGPointfromPoint=imageView.center;//路径曲线UIBezierPath*movePath=[UIBezierPathbezierPath];[movePathmoveToPoint:fromPoint];CGPointtoPoint=view.center;[movePathaddLineToPoint:toPoint];//关键帧CAKeyframeAnimation*moveAnim=[CAKeyframeAnimationanimationWithKeyPath:@"position"];moveAnim.path=movePath. 阅读全文
posted @ 2012-04-27 19:25 Likwo 阅读(779) 评论(0) 推荐(0) 编辑

2012年4月23日

摘要: 1. cocochina里的分享http://www.cocoachina.com/bbs/read.php?tid=497982.https://github.com/brynbellomy/iOS-DragAndDrop3.github 阅读全文
posted @ 2012-04-23 22:33 Likwo 阅读(545) 评论(0) 推荐(0) 编辑

2012年4月21日

摘要: 要自定义UITabBarController,首先我们必须了解UITabBarController结构与其各个相关类的关系(TabBarController、TabBar、TabButton及ViewController)。其中,TabButton是一个双态的Button(选中和未选中),行为和CheckBox、RadioButton类似。TabBar是TabButton的容器,负责TabButton的排布和互斥,保证同时只有一个Button为选中态。TabBarController包含了TabBar,并管理这一个ViewController的栈,在TabBar上的按钮点击时对栈上的Vi... 阅读全文
posted @ 2012-04-21 18:57 Likwo 阅读(17874) 评论(0) 推荐(0) 编辑

2012年4月19日

摘要: 1.jQuery.parseJSON( json ) 用来解析json http://api.jquery.com/jQuery.parseJSON/ 阅读全文
posted @ 2012-04-19 00:12 Likwo 阅读(184) 评论(0) 推荐(0) 编辑

上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 73 下一页