// Created by 少林 on 15/11/26.// Copyright © 2015年 少林. All rights reserved.//#import "UIPillsViewBackgroundView.h"#define THE_VIEW_COLOR [UIColor whi.....
分类:
移动开发 时间:
2015-11-27 12:36:21
阅读次数:
258
在MJPhotoView.m里面添加如下代码:- (void)scrollViewDidZoom:(UIScrollView *)scrollView { CGRect imageViewFrame = _imageView.frame; CGRect screenBounds = [UIScr.....
分类:
其他好文 时间:
2015-11-25 16:56:21
阅读次数:
170
- (void)drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSaveGState(ctx); CGContextMoveToPoint(ctx, 0, 0); CGConte.....
分类:
其他好文 时间:
2015-11-23 20:34:58
阅读次数:
165
1.三角形- (void)drawRect:(CGRect)rect { // Drawing code// 1.获得图形上下文 CGContextRef ctx = UIGraphicsGetCurrentContext();// 2.拼接图形 CGContextMoveToPoint(ctx, ...
分类:
其他好文 时间:
2015-11-23 18:31:42
阅读次数:
150
UIView的几个主要属性1 /*2 CGRect frame;3 4 CGRect bounds;5 6 CGPoint center;7 8 CGAffin...
分类:
移动开发 时间:
2015-11-20 01:37:56
阅读次数:
185
- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // Initialization code self.tintColor = [UIColo...
分类:
其他好文 时间:
2015-11-18 21:16:52
阅读次数:
124
搞iOS开发的童鞋基本都会用过UIView,那他的bounds和frame两个属性也不会陌生,那这两个有什么实质性的区别呢?先看到下面的代码你肯定就明白了一些:-(CGRect)frame{returnCGRectMake(self.frame.origin.x,self.frame.origin....
分类:
其他好文 时间:
2015-11-16 21:10:13
阅读次数:
169
- (void)drawRect:(CGRect)rect{ // 获取context CGContextRef context = UIGraphicsGetCurrentContext(); // 画直线 CGContextMoveToPoint(context, 50, 100); ...
分类:
其他好文 时间:
2015-11-16 19:30:44
阅读次数:
147
我一般情况下不会使用interface builder去画界面,而是用纯代码去创建界面,不是装B,而是刚从vi转到xcode不久,不太习惯interface builder而已。当然如果需要我也会使用它。一个东西的存在没有绝对的好与坏,只是存在时间与空间决定了它的价值。(忘了讲了,我的环境是xcod...
一)三个结构体:CGPoint、CGSize、CGRect/* Points. */structCGPoint { CGFloat x; CGFloat y;};typedef structCGPoint CGPoint;看到这个想必你已经懂了,不再解释。2. CGSize/* Sizes. */s...
分类:
其他好文 时间:
2015-11-15 16:21:48
阅读次数:
116