摘要: Date Picker控件:中文:日期/时间选取器UIDatePicker有一个实例方法setDate:animated,以编程的方式选择日期。UIDatePicker有四种模式(model): Time(... 阅读全文
posted @ 2015-03-11 23:23 pocket_live 阅读(588) 评论(0) 推荐(0) 编辑
摘要: Picker View控件:中文:单滚轮选择器自定义选择器需要遵守两个协议:数据源协议和委托协议UIPickerView有一个实例方法selectRow:(NSInteger)inComponent:(NSInteger)animated:(BOOL),以编程的方式来选择值。UIPickerView... 阅读全文
posted @ 2015-03-11 23:22 pocket_live 阅读(539) 评论(0) 推荐(0) 编辑
摘要: UIPickerView常用属性 -- 小总结 一.UIPickerView1.UIPickerView的常见属性// 数据源(用来告诉UIPickerView有多少列多少行)@property(nonatomic,assign) id dataSource;// 代理(用来告诉UIPickerVi... 阅读全文
posted @ 2015-03-11 23:20 pocket_live 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 设置代理:例如:// 以UIPickerView为例 picker.dataSource = self; picker.delegate = self; picker.showsSelectionIndicator = YES; // 这个弄成YES, picker中间就... 阅读全文
posted @ 2015-03-11 23:19 pocket_live 阅读(156) 评论(0) 推荐(0) 编辑
摘要: stringWithFormat 和 initWithFormat 有何不同?+ stringWithFormat:– initWithFormat:一个类方法,一个实例方法 都是格式化字符串1、 initWithFormat是实例方法只能通过 NSString* str = [[NSStr... 阅读全文
posted @ 2015-03-11 23:16 pocket_live 阅读(278) 评论(0) 推荐(0) 编辑
摘要: #pragma 用法: 任何以#pragma开头的代码都是一条编译器指令。使弹出菜单更加有效。例如: // 在菜单中添加了一条分隔线。 #pragma mark - // 创建一个文本条目。... 阅读全文
posted @ 2015-03-11 23:15 pocket_live 阅读(120) 评论(0) 推荐(0) 编辑
摘要: UISwitch控件属性:1. onTintColor 处于on时switch 的颜色 switchImage.onTintColor = [UIColor grayColor];2.tintColor 处于off时switch 的颜色 switchImage.tintColor =... 阅读全文
posted @ 2015-03-11 23:11 pocket_live 阅读(140) 评论(0) 推荐(0) 编辑
摘要: UIView控件属性:1.alpha设置视图的透明度.默认为1. // 完全透明 view.alpha = 0; // 不透明 view.alpha = 1;2.clipsToBounds // 默认是NO,当设置为yes时,超出当前视图的尺寸的内容和子视图不会显示。 vie... 阅读全文
posted @ 2015-03-11 23:10 pocket_live 阅读(141) 评论(0) 推荐(0) 编辑
摘要: UIImageView控件属性:1.Image 设置图片,默认显示 UIImageView *_imageView = [[UIImageView alloc]init];_imageView.image = [UIImage imageNamed:@"me.png"];2.highlightedI... 阅读全文
posted @ 2015-03-11 23:09 pocket_live 阅读(117) 评论(0) 推荐(0) 编辑
摘要: UITextView控件属性:1.text: 设置textView中文本_textView.text = @"Now is the time for all good developers to come to serve their country.\n\nNow is the time for ... 阅读全文
posted @ 2015-03-11 23:08 pocket_live 阅读(166) 评论(0) 推荐(0) 编辑