@interface ViewController () { dispatch_source_t _timer; } @property (weak, nonatomic) IBOutlet UILabel *timeLab; @end @implementation ViewController ... ...
分类:
其他好文 时间:
2017-08-04 15:21:58
阅读次数:
108
在 .h 文件里: @property (retain, nonatomic) IBOutlet UIButton *btnMyButton; 在函数方法中: btnMyButton.enabled = NO; // disable my button btnMyButton.enabled = Y ...
分类:
移动开发 时间:
2017-06-30 19:59:48
阅读次数:
209
继续上一话中的计算器Demo。上一话讲到类必须被初始化。类中的属性也必须被初始化,所以你不能仅仅声明而不给它一个处置,那么问题来了,我们从storyboard中拖拽的@IBOutlet为什么仅仅有声明而不须要初始化呢,这是由于它的类型依然是一个optional,在你初始化之前已经被赋值为nil了,这 ...
分类:
移动开发 时间:
2017-05-31 22:15:04
阅读次数:
318
视图的大小应该是随时可控的。今天我们就来实现对一个View的缩放动画。该动画的实现与位移动画,透明度动画稍有不同。详细实现例如以下: import UIKit class ScaleViewController: UIViewController { @IBOutlet weak var green ...
分类:
移动开发 时间:
2017-05-25 23:37:55
阅读次数:
199
#import "QLCWebViewController.h" #import @interface QLCWebViewController () @property (weak, nonatomic) IBOutlet UIView *contentView; @property (weak,... ...
分类:
Web程序 时间:
2017-05-15 21:01:44
阅读次数:
275
案例效果: (1)导入所需的素材,然后用storyboard把上半截位置和大小相对固定的东西布局起来。当然,这些控件也要定义成对应地IBOutlet和IBAction方便兴许使用它们。 注意:本案例在3.5inch设备上显示最佳,所以须要设置一下。 (2)首先实现点击“下一题”的功能 - (IBAc ...
分类:
移动开发 时间:
2017-05-12 20:22:54
阅读次数:
366
// ViewController.m // 01-CALayer-基本使用(了解) #import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UIView *redVie... ...
分类:
其他好文 时间:
2017-04-14 13:24:38
阅读次数:
163
class ViewController1: UIViewController { @IBOutlet weak var imageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() //获得整个App的Bundl... ...
分类:
移动开发 时间:
2017-04-02 12:31:33
阅读次数:
251
// ViewController.m // 12-掌握-webView #import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UIWebView *webView; ... ...
分类:
Web程序 时间:
2017-03-24 17:30:13
阅读次数:
219
// 监听slider滑动 - (IBAction)valueChnage:(UISlider *)sender; @property (weak, nonatomic) IBOutlet NJView *circleView; @end @implementation NJViewControll... ...
分类:
移动开发 时间:
2017-03-21 23:01:39
阅读次数:
1025