// WheelButton.m // 12-转盘(了解) #import "WheelButton.h" @implementation WheelButton // 设置UIImageView的尺寸 // contentRect:按钮的尺寸 - (CGRect)imageRectForConte... ...
分类:
其他好文 时间:
2017-04-16 11:58:44
阅读次数:
212
- (void)drawRect:(CGRect)rect { // 获取上下文 CGContextRef ctx = UIGraphicsGetCurrentContext(); // 保存一份最纯洁的图形上下文 // 调用一次该方法就会拷贝一个上下文到栈中 CGContextSaveGState... ...
分类:
移动开发 时间:
2017-03-21 21:59:19
阅读次数:
160
+ (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
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
知识点: 1.UITableView使用 2.UITableView分段功能 3.UITableViewCell重用机制 UITableView使用 1.UITableView作用 2.UITableView创建 - (id)initWithFrame:(CGRect)frame style:(UI ...
分类:
移动开发 时间:
2017-02-07 22:23:55
阅读次数:
296
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
#import "CZSearchBar.h" @implementation CZSearchBar - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { self.font ...
分类:
其他好文 时间:
2017-01-09 23:31:04
阅读次数:
189
记录下一些不常用技巧,以防忘记,复制用。 1、获取当前的View在Window的frame: 1 2 UIWindow * window=[[[UIApplication sharedApplication] delegate] window]; CGRect rect=[_myButton con ...
分类:
移动开发 时间:
2016-12-14 11:41:05
阅读次数:
354