一,效果图。
二,工程图。
三,代码。
ViewController.h
#import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
ViewController.m
#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]; }
时间: 2024-12-07 13:37:22