码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
iOS开发基础知识--碎片18
iOS开发基础知识--碎片18 1:initWithFrame方法的理解 1. initWithFrame方法是什么? initWithFrame方法用来初始化并返回一个新的视图对象,根据指定的CGRect(尺寸)。 当然,其他UI对象,也有initWithFrame方法,但是,我们以UIView为 ...
分类:移动开发   时间:2016-08-22 16:13:03    阅读次数:213
UIView常用属性方法
UIView : UIResponder<nscoding, uidynamicitem="" uiappearancecontainer,="" uiappearance,=""> /** * 通过一个frame来初始化一个UI控件 */ - (id)initWithFrame:(CGRect)f ...
分类:其他好文   时间:2016-08-19 19:03:57    阅读次数:151
TextField 的文字间距
#import "XZCTextField.h"@implementation XZCTextField////控制清除按钮的位置//-(CGRect)clearButtonRectForBounds:(CGRect)bounds//{// return CGRectMake(bounds.orig ...
分类:其他好文   时间:2016-08-17 11:57:26    阅读次数:156
iOS开发-UIColor和UIImage之间的转换
UIColor 转UIImage(可将该方法作为一个UIImage的分类) - (UIImage *)imageWithColor:(UIColor *)color { //描述一个矩形 CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); //开启图形 ...
分类:移动开发   时间:2016-08-10 22:43:48    阅读次数:294
iOS开发UI篇—Quartz2D使用(矩阵操作)
一、关于矩阵操作 1.画一个四边形 通过设置两个端点(长和宽)来完成一个四边形的绘制。 代码: 1 - (void)drawRect:(CGRect)rect 2 { 3 // 画四边形 4 // 获取图形上下文 5 CGContextRef ctx = UIGraphicsGetCurrentCo ...
分类:移动开发   时间:2016-08-10 14:18:40    阅读次数:156
//头部拉伸效果
//头部拉伸效果 - (void)scrollViewDidScroll:(UIScrollView *)scrollView { CGPoint point = scrollView.contentOffset; if (point.y < -kHEIGHT) { CGRect rect = [s ...
分类:其他好文   时间:2016-08-10 12:29:05    阅读次数:144
swift 触摸与手势
class MyView: UIView { var lView:UIView! var time:NSTimer! override init(frame: CGRect) { super.init(frame: frame) //开启多点触控 self.multipleTouchEnabled ...
分类:编程语言   时间:2016-08-01 17:41:18    阅读次数:350
swift3, UIView学习 - textview
import UIKit class ViewController:UIViewController { overridefunc viewDidLoad() { super.viewDidLoad() let textview = UITextView(frame:CGRect(x: 10,y: ...
分类:编程语言   时间:2016-07-24 13:28:39    阅读次数:179
UIView
UIViewiosUIViewUIView的常见属性NSArray *subview;所有的子控件数组中元素的顺序决定着子控件的显示层级顺序(下标越大,越显示在屏幕的上面)@property(nonautomic) CGRect frame;控件矩形框在父控件中的位置和尺寸(以父控件的左上角为坐标原... ...
分类:其他好文   时间:2016-07-23 18:24:23    阅读次数:187
ios文字描边
- (void)drawTextInRect:(CGRect)rect { CGSize shadowOffset = self.shadowOffset; UIColor *textColor = self.textColor; CGContextRef c = UIGraphicsGetCurr ...
分类:移动开发   时间:2016-07-22 21:13:09    阅读次数:273
583条   上一页 1 ... 7 8 9 10 11 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!