一、效果图
二、代码
ViewController.h
#import <UIKit>
@interface ViewController : UIViewController
<UITextFieldDelegate>
@end
ViewController.m
#import ViewController.h
#define W [UIScreen mainScreen].bounds.size.width
#define H [UIScreen mainScreen].bounds.size.height
@interface ViewController (