//// ViewController.m// MovePicture//// Created by YaguangZhu on 15/7/28.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import "ViewCon...
分类:
移动开发 时间:
2015-07-29 12:00:47
阅读次数:
169
--------------- ViewController.m ---------------#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UIButton *h...
分类:
其他好文 时间:
2015-07-28 22:34:17
阅读次数:
106
最近工作中,遇到一个需求,需要把一个UIView对象转成UIImage对象显示。经过网络搜索,找到如下答案:?12345678-(UIImage*)convertViewToImage:(UIView*)v{CGSize s = v.bounds.size;UIGraphicsBeginImageC...
分类:
其他好文 时间:
2015-07-28 17:43:47
阅读次数:
130
关于图层的几个坐标系。对于ios来说,坐标系的(0,0)点在左上角,就是越往下,Y值越大。越往右,X值越大。一个图层的frame,它是position,bounds,anchorPoint和transform属性的一部分。设置一个新的frame将会相应的改变图层的position和bounds,但是...
分类:
移动开发 时间:
2015-07-28 17:20:43
阅读次数:
168
imgLogo.layer.masksToBounds= YES; //设置在layer之下的都盖住 imgLogo.layer.cornerRadius = imgLogo.bounds.size.width*0.5; //设置layer的圆角,是自身宽度的一半 imgLogo.layer.bo....
分类:
其他好文 时间:
2015-07-28 12:38:40
阅读次数:
106
view的bounds默认的都为(0,0,self.frame.size.width,self.frame.size.height)view的位置是由view.frame决定的,而view.bounds决定的是其内子视图的原点。写个例子就明白了 1 - (void)viewDidLoad { 2 ....
分类:
其他好文 时间:
2015-07-27 18:19:57
阅读次数:
86
最近工作中,遇到一个需求,需要把一个UIView对象转成UIImage对象显示。经过网络搜索,找到如下答案:
?
1
2
3
4
5
6
7
8
-(UIImage*)convertViewToImage:(UIView*)v{
CGSize
s = v.bounds.size;
...
分类:
其他好文 时间:
2015-07-27 16:17:15
阅读次数:
188
/** * Options for scaling the bounds of an image to the bounds of this view. 将一个图片的边界缩放到这个view边界的几种选项 */ public enum ScaleType { ...
分类:
其他好文 时间:
2015-07-27 16:15:28
阅读次数:
100
屏幕适配问题共有四种解决方案:(1)根据屏幕宽高写控件frame(下策);(2)Autoresizing的使用(中策);(3)AutoLayout的使用(上策);(4)sizeClasses+AutoLayout的使用(上上策)。下面将会分别来进行叙述。
(1)根据当前屏幕的宽高写frame
在新特性界面中,根据:[UIScreen mainScreen].bounds.s...
分类:
移动开发 时间:
2015-07-26 06:12:26
阅读次数:
157
//截取全屏图象 private void btnFullScreen_Click(object sender, EventArgs e) { //创建图象,保存将来截取的图象 Bitmap image = new Bitmap(Screen.PrimaryScreen.Bounds.Width, ...