摘要: /** * 当控件不是从xib、storyboard中创建时,就会调用这个方法 */- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { [self setup... 阅读全文
posted @ 2015-11-30 11:16 Z了个L 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 警告原因:尝试去加载的图片不存在 阅读全文
posted @ 2015-11-30 09:18 Z了个L 阅读(138) 评论(0) 推荐(0) 编辑
摘要: UIPageControl *pageControl = [[UIPageControl alloc] init]; // 设置内部的圆点图片[pageControl setValue:[UIImage imageNamed:@"compose_keyboard_dot_normal"] forKe... 阅读全文
posted @ 2015-11-29 19:48 Z了个L 阅读(1196) 评论(0) 推荐(1) 编辑
摘要: /** * 键盘的frame发生改变时调用(显示、隐藏等) */- (void)keyboardWillChangeFrame:(NSNotification *)notification{/** notification.userInfo = @{ // 键盘弹出\隐藏后的fram... 阅读全文
posted @ 2015-11-28 19:04 Z了个L 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 键盘的frame发生改变时发出的通知(位置和尺寸) UIKeyboardWillChangeFrameNotification UIKeyboardDidChangeFrameNotification键盘显示时发出的通知 UIKeyboardWillShowNotification UIKeyboa... 阅读全文
posted @ 2015-11-28 18:49 Z了个L 阅读(159) 评论(0) 推荐(0) 编辑
摘要: UITextField: 1.文字永远是一行,不能显示多行文字 2.有placehoder属性设置占位文字 3.继承自UIControl 4.监听行为 1> 设置代理 2> addTarget:action:forControlEvents: 3> 通知:UITextFieldText... 阅读全文
posted @ 2015-11-28 09:38 Z了个L 阅读(113) 评论(0) 推荐(0) 编辑
摘要: UILabel *titleView = [[UILabel alloc] init]; titleView.width = 200; titleView.height = 44; titleView.textAlignment = NSTextA... 阅读全文
posted @ 2015-11-27 20:03 Z了个L 阅读(853) 评论(0) 推荐(0) 编辑
摘要: UIViewContentModeScaleToFill:图片拉伸至填充整个UIImageView(图片可能会变形) UIViewContentModeScaleAspectFit:图片拉伸至完全显示在UIImageView里面为止(图片不会变形) UIViewContentMod... 阅读全文
posted @ 2015-11-27 15:15 Z了个L 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #import "YZViewController.h"@interface YZViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation YZViewContro... 阅读全文
posted @ 2015-11-27 12:49 Z了个L 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 1>alpha hidden = YES3>userInteraction = NO4>父视图不允许交互,按钮也不能交互5>在父视图可见范围内,可以交互,范围之外不能交互 阅读全文
posted @ 2015-11-26 20:03 Z了个L 阅读(187) 评论(0) 推荐(0) 编辑