//控制placeHolder的位置,左右缩20 -(CGRect)placeholderRectForBounds:(CGRect)bounds { CGRect inset = CGRectMake(bounds.origin.x+100, bounds.origin.y, bounds.siz ...
分类:
其他好文 时间:
2016-04-26 00:36:26
阅读次数:
239
修改主分片db.runCommand({"movePrimary":"db",to:"分片id"});2.合并数据块(数据块需要为空)db.runCommand({"mergeChunks":"db.collection",bounds:[min_shardkey,max_shardkey]})3.获取数据块大小db.runCommand({"dataSize":"db.collection","keyPattern":{shardkey:1},min:{s..
分类:
数据库 时间:
2016-04-25 19:43:49
阅读次数:
343
今日在写一个UIBarButtonItem的分类时,在Xcode自动提示时,因未仔细查看,错将需要用到setBackgroundImage的地方,选择成setImage,结果导致button的bounds设置不成功,导航Item怎么都显示不出来。后来找了很久终于发现问题的原因所在,郁闷啊!真是失之毫 ...
分类:
其他好文 时间:
2016-04-25 13:17:45
阅读次数:
170
make by -ljw 前言:初学者对bounds的认识是以自己的左上角为坐标原点,而且x/y一般是0,0 但是对bounds深入认识之后,我们应该对它重新认识 以下是对bounds的一些认识: bounds: x/y一般为(0,0)默认矩形框和内容是重叠的,所以默认是(0,0) 改变一个控件的b ...
分类:
其他好文 时间:
2016-04-23 13:25:36
阅读次数:
143
frame和bounds都市用来描述一块区域的 frame是以父控件的左上角为原点,可视范围相对于父控件 bounds:描述是可视范围在内容哪个区域,相对于内容. 可视化区域在内容中显示区域,bounds的x,y可以改(改的是内容原点的位置) 任何控件都有自己的内容,而且这个内容无限大 子控件都市相 ...
分类:
其他好文 时间:
2016-04-22 18:20:57
阅读次数:
140
- (void)setBounds:(CGRect)bounds { [super setBounds:bounds]; if (bounds.size.width != self.preferredMaxLayoutWidth) { self.preferredMaxLayoutWidth = s ...
分类:
其他好文 时间:
2016-04-22 13:31:33
阅读次数:
113
最近工作中,遇到一个需求,需要把一个UIView对象转成UIImage对象显示。经过网络搜索,找到如下答案: ? 1 2 3 4 5 6 7 8 -(UIImage*)convertViewToImage:(UIView*)v{ CGSize s = v.bounds.size; UIGraphic ...
分类:
其他好文 时间:
2016-04-19 00:15:02
阅读次数:
129
1.app尺寸,去掉状态栏 1.app尺寸,去掉状态栏 CGRect r = [ UIScreen mainScreen ].applicationFrame; r=0,20,320,460 2.屏幕尺寸 CGRect rx = [ UIScreen mainScreen ].bounds; r=0 ...
分类:
移动开发 时间:
2016-04-16 22:54:34
阅读次数:
342
学习ios开发有一段时间了,项目也做了两个了,今天看视频,突然发现view的frame和bound两个属性,发现bound怎么也想不明白,好像饶你了死胡同里,经过一番尝试和思考,终于弄明白bound的含义。 所以现在记录下来,供以后查阅,同时方便所有和我一样有疑惑的人查看。 一、首先列一下公认的资料 ...
分类:
其他好文 时间:
2016-04-16 18:37:10
阅读次数:
165
知识点 frame 与bounds 的区别 1.frame 是这个视图的大小在父视图的位置 。 如x 20 y 20 width 200 height 300 2.bounds 是这个视图的大小在自身的位置 。 如 x 0 y 0 width 200 height 300 ,bounds 的x,y ...
分类:
其他好文 时间:
2016-04-15 02:06:56
阅读次数:
114