摘要: NO1.编辑完UITextField后 点击键盘的return让键盘回收回去 代理方法 一.所在类的文件(.h)遵循UITextFieldDelegate 协议 二.设置代理对象 textField.delegate = self; 三.重写代理方法- (BOOL)textFieldSho... 阅读全文
posted @ 2015-08-22 16:59 誓言の真嗳 阅读(257) 评论(0) 推荐(0) 编辑
摘要: UIButton UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; // UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; ... 阅读全文
posted @ 2015-08-22 16:46 誓言の真嗳 阅读(2132) 评论(0) 推荐(0) 编辑
摘要: UITextField:文本输入框 // 创建一个textField UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(60, 40, 200, 30)]; textField.ba... 阅读全文
posted @ 2015-08-22 16:33 誓言の真嗳 阅读(106) 评论(0) 推荐(0) 编辑
摘要: frame、center和bounds之间的关系 随 frame 改变, center 改变 bounds 不变 frame相对父视图,影响自身大小和位置 center 相对父视图,影响自身位置,不影响自身大小 bounds 相对自身,影响自身大小和子视图位置,不影响自身位置frame ... 阅读全文
posted @ 2015-08-22 15:26 誓言の真嗳 阅读(154) 评论(0) 推荐(0) 编辑
摘要: UILabel // 创建对象 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(30, 250, 100, 30)]; // 设置相关属性 label.backgroundColor = [UICo... 阅读全文
posted @ 2015-08-22 15:07 誓言の真嗳 阅读(78) 评论(0) 推荐(0) 编辑
摘要: UIColor基本使用一、白色 + (UIColor *)colorWithWhite:(CGFloat)white alpha:(CGFloat)alpha; 这个方法根据第一个参数(CGFloat)white(0 ~ 1)的取值显示白色类的颜色,(CGFloat)alpha颜色同名度,除非有... 阅读全文
posted @ 2015-08-22 14:38 誓言の真嗳 阅读(362) 评论(0) 推荐(0) 编辑