码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
iOS 安全区域适配
CGRect rectStatus = [[UIApplication sharedApplication] statusBarFrame]; CGFloat rectStatusHeight = rectStatus.size.height; NSLog(@"status width - %f",... ...
分类:移动开发   时间:2019-01-28 12:03:12    阅读次数:445
列表控件UICollectionView-- Swift
1.UICollectionView的常用属性 // 1.设置位置和大小 init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) // 2.设置子视图的布局方式 var collectionViewLayout ...
分类:编程语言   时间:2018-09-21 18:28:09    阅读次数:224
iOS学习二之UILabel
UILabel的创建方法 在ViewController的viewDidLoad中添加下面的方法即可 override func viewDidLoad() { super.viewDidLoad() let label = UILabel(frame: CGRect(x:20, y:100, wi ...
分类:移动开发   时间:2018-09-09 23:34:18    阅读次数:384
ios 获取导航栏和状态栏高度,针对iPhoneX
因为iPhoneX的产生,原本的导航栏再也不是44了,那么会出现什么问题呢?在隐藏导航栏的页面,原本的高度要向上调整一个导航栏+状态栏的高度。那么iPhoneX的导航栏高度不是44了,我们需要手动获取, 有导航栏的,代码如下: 1 2 3 4 5 6 //获取状态栏的rect CGRect stat ...
分类:移动开发   时间:2018-08-22 12:00:03    阅读次数:978
swift - 代码创建 pickerView 显示或隐藏横线
1 import UIKit 2 3 class VC1: UIViewController { 4 5 fileprivate lazy var pickerV : UIPickerView = { 6 let v = UIPickerView(frame: CGRect(x: 100, y: 1... ...
分类:编程语言   时间:2018-07-20 13:57:16    阅读次数:623
Swift 通过touchesBegan 方法获取用户点击的view,模拟连续点击效果
var mV:UIView! override func viewDidLoad() { super.viewDidLoad() mV = UIView(frame: CGRect(x: 100, y: 100, width: 100, height: 100 )) mV.backgroundCol ...
分类:编程语言   时间:2018-05-29 23:00:03    阅读次数:1319
关于UIWebView 加载网络PDF 实现翻页效果的那些事
首先呢 这里说的是加载网络的pdf 可不是本地的哦 新建一个view 主要是用于循环渲染绘制pdf单页面内容 .h重写init方法 用于自定义 接收docRef文件和传入的page页面 - (instancetype)initWithFrame:(CGRect)frame documentRef:( ...
分类:Web程序   时间:2018-05-24 15:15:46    阅读次数:291
CGContextRef 使用小记
1. 用CGContextRef 画文字 在 UIView的 - (void)drawRect:(CGRect)rect {} 方法中进行 CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetShouldAntialia... ...
分类:其他好文   时间:2018-05-12 17:30:22    阅读次数:191
iOS-文本段落样式NSMutableParagraphStyle与NSParagraphStyle的使用和一些富文本处理属性
开发过程中,经常会遇到动态计算行高的问题, - (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options attributes:(nullable NSDictionary<NSString * ...
分类:移动开发   时间:2018-04-15 19:49:29    阅读次数:306
Core Animation 文档翻译—附录C(KVC扩展)
前言   关于 "CAAnimation" 和 "CALayer" 类,核心动画扩展了NSKeyValueCoding协议。这个扩展为一些keys添加了默认值,扩大了封装协议,添加了为CGpoint、CGRect、CGSize和 "CATransform3D" 类型的支持。   ...
分类:其他好文   时间:2018-02-08 20:11:01    阅读次数:284
583条   上一页 1 2 3 4 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!