XIB使用,登陆界面小试牛刀创建一个新的视图控制器,具体操作参见点击查看在创建好的VCRoot.xib里面拖动需要的控件,并拖动给相应的控件添加属性,给登陆按钮添加事件。VCRoot.h文件里面:#import @interface VCRoot : UIViewController//IBOutlet表示从xib中创建的
@property (weak, nonato...
分类:
移动开发 时间:
2016-07-31 15:58:35
阅读次数:
165
1.保存到iOS照片库需要引入QuartzCore.framework框架,具体代码如下:.h文件#import <QuartzCore/QuartzCore.h>UIImageView *imageView;@property (nonatomic, retain) IBOutlet UIImag ...
分类:
移动开发 时间:
2016-07-15 00:39:58
阅读次数:
236
#import "ViewController.h" @interface ViewController (){ // 储存第二个选取器 NSArray *cityArr; NSArray *townArr; } @property (weak, nonatomic) IBOutlet UIPick ...
分类:
其他好文 时间:
2016-07-06 23:08:35
阅读次数:
240
#import "ViewController.h" #import "LhbToolBar.h" @interface ViewController ()<LhbToolBarDelegate> @property (weak, nonatomic) IBOutlet UITextField *t ...
分类:
其他好文 时间:
2016-06-09 19:45:37
阅读次数:
185
1.包含MapKit框架(参考包含官方框架博文) 2.添加MapView控件和IBOut属性,并在storyboard连接两者(包括delegate,即让MapView所在的视图控制器成为该控件的delegate) @property (nonatomic, weak) IBOutlet MKMap ...
分类:
移动开发 时间:
2016-06-09 17:19:45
阅读次数:
277
1.IBAction: 1> 能保证方法可以连线 2> 相当于void 2.IBOutlet: 1> 能保证属性可以连线 3.常见错误 setValue:forUndefinedKey:]: this class is not key value coding 错误原因是:连线出问题了 4.Xcod ...
分类:
移动开发 时间:
2016-05-29 12:06:32
阅读次数:
174
#import "ViewController.h" #import "WDJQuestions.h" @interface ViewController () /** * 显示金币 */ @property (weak, nonatomic) IBOutlet UIButton *moneyBtn ...
分类:
其他好文 时间:
2016-05-22 00:39:22
阅读次数:
164
加入两张图片和mav声音的文件 @interface ViewController : UIViewController@property (weak,nonatomic) IBOutlet UIImageView *imageView;@end .m文件 #import "ViewControll ...
分类:
其他好文 时间:
2016-05-20 11:46:35
阅读次数:
154
在可视化编程下 #import "BaseViewController.h" @interface BaseViewController () @property (weak, nonatomic) IBOutlet UIImageView *imageView; @end @implementat ...
分类:
其他好文 时间:
2016-05-19 23:17:53
阅读次数:
315
#import "ViewController.h" @interface ViewController () // 可视化编程拖出的UIImageView属性 @property (weak, nonatomic) IBOutlet UIImageView *imageView; // 定义数组存 ...
分类:
其他好文 时间:
2016-05-19 23:15:28
阅读次数:
441