摘要:
头文件#import @interface ViewController : UIViewController@property (nonatomic,strong) UIButton *myButton;@end实现#import "ViewController.h"@interfaceViewController ()@end@implementation ViewController- (void) buttonIsPressed: (UIButton *) paramSender { NSLog(@"Button is pressed.");}- 阅读全文
摘要:
textField在Interfa Builder中不能改变高度,但是在代码中可以,无论怎么改变其高度,行数始终是1头文件#import @interface ViewController : UIViewController //为了监听用户触发的事件,例如开始输入,完成输入等,text Field要有自己的代理,这个代理遵守协议@property (nonatomic,strong) UITextField *textField;@property (nonatomic,strong) UILabel *labelCounter;@end实现#import "ViewContr. 阅读全文