1.对象创建(实例化), 两种创建方式: alloc/init, initWithNibName2.awakeFromNib, 使用IB的时候,即实例化用的是initWithNibName才会调用此方法3.设置输出口(outlet), IBOutlet属性连接到View,调用其get/set方法4....
分类:
其他好文 时间:
2015-10-04 13:33:57
阅读次数:
216
#import "MJViewController.h"@interface MJViewController () @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;@property (weak, nonatomic) I...
分类:
移动开发 时间:
2015-10-01 11:41:31
阅读次数:
224
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;@property (weak, nonatomic) IBOutl...
分类:
移动开发 时间:
2015-09-30 19:36:49
阅读次数:
326
自定义Cell如图一个View上面放了四个Label分别连线到.m文件中@property (weak, nonatomic) IBOutlet UILabel *nameLabel;@property (weak, nonatomic) IBOutlet UILabel *positionLabe...
分类:
其他好文 时间:
2015-09-27 22:54:06
阅读次数:
454
1,使用storyboard创建日期选择控件首先我们将一个UIDatePicker控件和一个按钮直接添加到Main.Storyboard上。该按钮是为了点击时弹出提示框显示当前选择的日期和时间。同时在ViewController.swift中使用IBOutlet建立起控件和事件的关联,具体代码如下....
分类:
编程语言 时间:
2015-09-25 15:59:05
阅读次数:
875
方法使用:引入头文件#import "UIImagePickerController+Block.h"我这拖出来的两个属性@property (weak, nonatomic) IBOutlet UIImageView *showImageView;- (IBAction)openClick;// ...
分类:
其他好文 时间:
2015-09-25 07:09:05
阅读次数:
176
实现的效果如下所示:代码如下:ViewController.h#import @interface ViewController : UIViewController@property (weak, nonatomic) IBOutlet UIPickerView *cityPickView;- (...
分类:
其他好文 时间:
2015-09-24 19:20:18
阅读次数:
143
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UITextField *nameTextField;@property (weak, nonatomic) IBOu...
分类:
其他好文 时间:
2015-09-22 16:23:48
阅读次数:
155
先看一段代码。复制代码appdelegate.h@property (weak) IBOutlet NSMatrix *StockType;@property (weak) IBOutlet NSMatrix *market;appdelegate.mNSCell *st=[market selec...
分类:
移动开发 时间:
2015-09-19 09:37:16
阅读次数:
216
#import "YYViewController.h"@interface YYViewController () @property (weak, nonatomic) IBOutlet UIScrollView *scrollview;/** * 页码 */@property (weak, ....
分类:
移动开发 时间:
2015-09-18 15:30:45
阅读次数:
215