码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
核心动画12-转盘(了解)
// WheelButton.m // 12-转盘(了解) #import "WheelButton.h" @implementation WheelButton // 设置UIImageView的尺寸 // contentRect:按钮的尺寸 - (CGRect)imageRectForConte... ...
分类:其他好文   时间:2017-04-16 11:58:44    阅读次数:212
IOS 图形上下文栈
- (void)drawRect:(CGRect)rect { // 获取上下文 CGContextRef ctx = UIGraphicsGetCurrentContext(); // 保存一份最纯洁的图形上下文 // 调用一次该方法就会拷贝一个上下文到栈中 CGContextSaveGState... ...
分类:移动开发   时间:2017-03-21 21:59:19    阅读次数:160
UIcolor转UIImage
+ (UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0, 0, 1, 1); UIGraphicsBeginImageContext(rect.size); CGContextRef context = UI ...
分类:其他好文   时间:2017-03-13 12:44:32    阅读次数:134
类似刷新微博后,顶部显示更新数量的动画。
@interface welcomeLabel : UILabel +(void)setTopTipLabelWithFrame:(CGRect)frame name:(NSString *)name andNavController:(UINavigationController *)nav; @ ...
分类:其他好文   时间:2017-03-10 16:18:44    阅读次数:124
Swift - 点击箭头旋转
let arrowImage = UIImageView(image: UIImage(named: "Machine_arrow")!.imageWithRenderingMode(.AlwaysTemplate)) let arrowButton = UIButton(frame: CGRect ...
分类:编程语言   时间:2017-02-24 13:39:07    阅读次数:315
页面顶部实现拉伸效果代码
//顶顶部拉伸图片 lazy var headView:MyInfoHeaderView = { //let hframe = CGRect(x: 0, y: 0, width: swidth, height: swidth/self.imgRation) // let hview = Bundle ...
分类:其他好文   时间:2017-02-10 16:24:58    阅读次数:171
iOS开发-UI (八)TableView
知识点: 1.UITableView使用 2.UITableView分段功能 3.UITableViewCell重用机制 UITableView使用 1.UITableView作用 2.UITableView创建 - (id)initWithFrame:(CGRect)frame style:(UI ...
分类:移动开发   时间:2017-02-07 22:23:55    阅读次数:296
swift 自定义UIRadioButton(待完善)
import UIKit class UIRadioButton: UIButton { private var ischeck = false override init(frame: CGRect) { super.init(frame: frame) self.layer.borderColo ...
分类:编程语言   时间:2017-01-10 13:16:57    阅读次数:265
自定义一个searchBar
#import "CZSearchBar.h" @implementation CZSearchBar - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { self.font ...
分类:其他好文   时间:2017-01-09 23:31:04    阅读次数:189
iOS:小技巧
记录下一些不常用技巧,以防忘记,复制用。 1、获取当前的View在Window的frame: 1 2 UIWindow * window=[[[UIApplication sharedApplication] delegate] window]; CGRect rect=[_myButton con ...
分类:移动开发   时间:2016-12-14 11:41:05    阅读次数:354
583条   上一页 1 ... 4 5 6 7 8 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!