码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
Swift开发教程--如何计算字符串的宽度和高度
直接上代码,如下: /**     *  获取字符串的宽度和高度     *     *  @param text:NSString     *  @param font:UIFont     *     *  @return CGRect     */     class func getTextRectSize(text:NSString,font:UIFont,siz...
分类:编程语言   时间:2015-08-19 20:33:41    阅读次数:300
iphone绘图的几个基本概念CGPoint、CGSize、CGRect、CGRectMake、window(窗口)、视图(view)
我一般情况下不会使用interface builder去画界面,而是用纯代码去创建界面,不是装B,而是刚从vi转到xcode不久,不太习惯interface builder而已。当然如果需要我也会使用它。一个东西的存在没有绝对的好与坏,只是存在时间与空间决定了它的价值。(忘了讲了,我的环境是xcod...
分类:Windows程序   时间:2015-08-19 10:43:57    阅读次数:147
列表示图
样式展示.h文件#import @interface NALLabelsMatrix : UIView { NSArray *columnsWidths; uint numRows; uint dy;}- (id)initWithFrame:(CGRect)frame andColumnsWi...
分类:其他好文   时间:2015-08-18 15:42:24    阅读次数:114
UIView添加手势 然后UITableView 添加进这个View 导致UITableView 的单元格点击事件无效
#import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; UIView * v = [[UIView alloc] initWithFrame:CGRect...
分类:其他好文   时间:2015-08-17 21:54:16    阅读次数:6214
UITableView 和 UITableViewCell 的基本配置和常用属性
一:UITableView的几个重要属性 1,style样式, 在初始化时设置 - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style; 其中UITableViewStyle枚举类型为: ...
分类:其他好文   时间:2015-08-15 22:44:07    阅读次数:276
IOS中Llabel整理
·UILable是iPhone界面最基本的控件,主要用来显示文本信息。·常用属性和方法有:1、创建CGRect rect = CGRectMake(100, 200, 50, 50);UILabel *label = [[UILabel alloc] initWithFrame:rect];2、te...
分类:移动开发   时间:2015-08-14 22:43:04    阅读次数:254
drawRect
有了view的子类,只要重载一个方法drawRect-(void)drawRect:(CGRect)aRect;它的参数是个矩形,这个矩形就是你要重绘的区域,你可以忽略参数,它只是为了性能优化,只在固定的区域绘图.注意!!!永远不要去调用drawRect,因为drawRect不是让你调用的,而是系...
分类:其他好文   时间:2015-08-14 13:33:36    阅读次数:137
改变tabbar的高度做法
1 UITabBarController *tabBarController =[[UITabBarController alloc] init];2 CGRect frame = self.window.bounds;3 tabBarController.tabBar.frame ...
分类:其他好文   时间:2015-08-13 13:48:31    阅读次数:141
iOS-UITextView-文本输入视图的使用
#import "ViewController.h" @interface ViewController () {     UIView *bgView;     UITextView *inputView;     CGRect keyBoardRect;     NSMutableArray *allContent; } @end ...
分类:移动开发   时间:2015-08-11 16:16:17    阅读次数:158
(转) 改变UITextField placeHolder颜色、字体 、输入光标位置等
我们有时需要定制化UITextField对象的风格,可以添加许多不同的重写方法,来改变文本字段的显示行为。这些方法都会返回一个CGRect结构,制定了文本字段每个部件的边界范围,甚至修改placeHolder颜色,字体。– textRectForBounds: //重写来重置文字区域– drawT....
分类:其他好文   时间:2015-08-11 15:41:45    阅读次数:174
583条   上一页 1 ... 27 28 29 30 31 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!