2013年4月9日

数学函数ceil(), floor(), round()备忘

摘要: objective-c 上的几个数学函数,备忘#include double ceil(double x);double floor(double x);double round(double x);ceil(x)返回不小于x的最小整数值(然后转换为double型)。floor(x)返回不大于x的最大整数值。round(x)返回x的四舍五入整数值。 阅读全文

posted @ 2013-04-09 09:37 流れ星ーー 阅读(161) 评论(0) 推荐(0) 编辑

如何实现UIButton的背景图片拉伸

摘要: 如果要实现如下图所示的button,背景是一个图片,由于按钮的大小不定,这时就需要适时的将背景的图片进行拉伸。UIButton * btnIcon=[UIButton buttonWithType:UIButtonTypeCustom];[btnIcon setFrame:CGRectMake(5, 50, 80, 30)];// [btnIcon setImageEdgeInsets:UIEdg... 阅读全文

posted @ 2013-04-09 08:19 流れ星ーー 阅读(315) 评论(0) 推荐(0) 编辑

导航