UIView的一个重要组成就是CALayer, 我们先创建一个自定义图层//创建一个图层 CALayer *layer = [CALayer layer]; //设置大小 layer.bounds = CGRectMake(0, 0, 60, 60); //设置位置 lay...
分类:
其他好文 时间:
2015-11-22 01:28:44
阅读次数:
214
// 将view转为image(不经常用到的功能)(摘自SCCatWaitingHUD)- (UIImage *)convertViewToImage{ CGSize s = self.bounds.size; //下面方法,第一个参数表示区域大小。 //第二个参数表示是否是非透明的。如果需要显示....
分类:
其他好文 时间:
2015-11-21 19:49:41
阅读次数:
116
1.UIWindow定义初始:1??:初始化窗口:self.window = [[[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]]autorelease];2??:设置背景色:self.window.backgroundColo...
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window.backgroundColor = [UIColor whiteColor];UITabBarController *m....
分类:
其他好文 时间:
2015-11-20 21:30:59
阅读次数:
158
UIView的几个主要属性1 /*2 CGRect frame;3 4 CGRect bounds;5 6 CGPoint center;7 8 CGAffin...
分类:
移动开发 时间:
2015-11-20 01:37:56
阅读次数:
185
一、手写控件1.手写控件的步骤(1)使用相应的控件类创建控件对象(2)设置该控件的各种属性(3)添加控件到视图中(4)如果是button等控件,还需考虑控件的单击事件等(5)注意:View Contollor和view的关系2.注意点 在OC开发中,Storyboard中的所有操作都可以通过代码实现...
分类:
移动开发 时间:
2015-11-20 00:02:20
阅读次数:
421
bash转换16进制的方法:echo‘ibase=10;obase=16;801312852′|bc1.把UIView转换成图片-(UIImage*)getImageFromView:(UIView*)view{UIGraphicsBeginImageContext(view.bounds.size...
分类:
其他好文 时间:
2015-11-19 22:16:23
阅读次数:
209
一、基本知识1、初始化 UIScrollView#import "ViewController.h"#define WIDTH[[UIScreen mainScreen]bounds].size.width#define HEIGHT[[UIScreen mainScreen]bounds].siz...
分类:
其他好文 时间:
2015-11-19 18:31:14
阅读次数:
201
复习这两天学习的内容动画 // frame bounds alpha 背景颜色 center transform(转换) UIImageView* iv =[[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)]; iv.im...
分类:
移动开发 时间:
2015-11-17 12:31:34
阅读次数:
196
搞iOS开发的童鞋基本都会用过UIView,那他的bounds和frame两个属性也不会陌生,那这两个有什么实质性的区别呢?先看到下面的代码你肯定就明白了一些:-(CGRect)frame{returnCGRectMake(self.frame.origin.x,self.frame.origin....
分类:
其他好文 时间:
2015-11-16 21:10:13
阅读次数:
169