效果图:
工程图:
代码:
#import "ViewController.h" //加入头文件 #import "VWWWaterView.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. VWWWaterView *waterView = [[VWWWaterView alloc]initWithFrame:self.view.bounds]; [self.view addSubview:waterView]; }