先见一个遮盖类1.h文件#import CGPoint CGRectGetCenter(CGRect rect);CGRect CGRectMoveToCenter(CGRect rect, CGPoint center);@interface UIView (ViewFrameGeometry)@...
分类:
其他好文 时间:
2015-04-17 17:56:28
阅读次数:
146
#import "JRProgres.h"
@implementation JRProgres
{
UIView * _contentView;
}
- (instancetype)initWithFrame:(CGRect)frame{// 重写构造方法一次创建3个视图,分别为最外层的绿框、子1白底、子2红条
self = [super
init...
分类:
移动开发 时间:
2015-04-17 11:28:26
阅读次数:
184
RainBow.m
#import "RainBow.h"
@implementation RainBow
{
NSArray * _colorArray;
}
-(instancetype)initWithFrame:(CGRect)frame withNum:(NSInteger)
num{...
分类:
其他好文 时间:
2015-04-16 20:01:29
阅读次数:
120
- (UIImage *)clipImage: (UIImage *)image inRect: (CGRect) rect{//返回image中rect范围内的图片 CGImageRef imageRef = CGImageCreateWithImageInRect(image.CGImage,....
分类:
其他好文 时间:
2015-04-16 19:24:00
阅读次数:
94
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary
*)launchOptions {
UIWindow * window = [[UIWindow
alloc]initWithFrame:[UIScreen
mainScreen].bound...
分类:
其他好文 时间:
2015-04-16 12:29:26
阅读次数:
111
IOS 系统开关控件简单使用总结: 初始化: - (instancetype)initWithFrame:(CGRect)frame;? 这个frame是没有意义的,系统的开关控件大小是确定的。 设置开关开启状态时的颜色 @property(nonatomic, retain) UIC...
分类:
移动开发 时间:
2015-04-15 17:20:45
阅读次数:
148
不废话,贴代码.这里对图片进行了旋转操作
方法写在UIImage的类别里
- (UIImage *) croppedImage:(CGRect)cropRect {
CGImageRef croppedCGImage = CGImageCreateWithImageInRect(self.CGImage ,cropRect);
UIImage *croppedImage = [...
分类:
移动开发 时间:
2015-04-15 17:10:22
阅读次数:
135
经测试,发现:[UIScreen mainScreen].bounds;返回的CGRect,包含状态栏20的高度。[UIScreen mainScreen].applicationFrame;返回的CGRect,不包含状态栏20的高度。在此记录下,方便以后查阅。不要笑我菜鸟!
分类:
移动开发 时间:
2015-04-14 19:35:41
阅读次数:
161
我决定倒着写了。。。7.给collectioncell加边框 或者给任何view加边框的方法- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // 初始...
分类:
移动开发 时间:
2015-04-12 19:07:45
阅读次数:
132
1* OC中的结构体lNSRange(location length)lNSPoint \ CGPointlNSSize \ CGSizelNSRect \ CGRect (CGPoint CGSize)使用CG.. 结构体需要添加CoreGraphiceNS…. 是一个框架Foundation ,...
分类:
其他好文 时间:
2015-04-09 15:15:55
阅读次数:
283