//
//  SuiteWVTestViewController.m
//  SuiteApp
//
//  Created by junmo on 2018/12/18.
//  Copyright © 2018年 微博@iOS程序犭袁. All rights reserved.
//


#import "SuiteWVUIWebViewController.h"
#import "SuiteWVTestViewController.h"
#import "SuiteWVWebViewController.h"

@interface SuiteWVTestViewController ()

@property (nonatomic, strong) UIButton *button1;
@property (nonatomic, strong) UIButton *button2;

@end

@implementation SuiteWVTestViewController
#if __has_include(<WindVane/WindVane.h>)

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = UIColor.whiteColor;
    
    CGFloat xStart = 50;
    CGFloat yStart = 100;
    CGFloat yInterval = 50;
    CGFloat width = 200;
    CGFloat height = 40;
    
    _button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button1.frame = CGRectMake(xStart, yStart += yInterval, width, height);
    _button1.backgroundColor = [UIColor blackColor];
    _button1.tintColor = [UIColor whiteColor];
    [_button1 setTitle:@"WVWebViewController" forState:UIControlStateNormal];
    [_button1 addTarget:self action:@selector(openWVWebViewController) forControlEvents:UIControlEventTouchDown];
    [self.view addSubview:_button1];
    
    _button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button2.frame = CGRectMake(xStart, yStart += yInterval, width, height);
    _button2.backgroundColor = [UIColor blackColor];
    _button2.tintColor = [UIColor whiteColor];
    [_button2 setTitle:@"WVWebView" forState:UIControlStateNormal];
    [_button2 addTarget:self action:@selector(openWVWebView) forControlEvents:UIControlEventTouchDown];
    [self.view addSubview:_button2];
}

- (void)openWVWebViewController {
    SuiteWVUIWebViewController *suiteWVVC = [[SuiteWVUIWebViewController alloc] init];
    [self.navigationController pushViewController:suiteWVVC animated:YES];
}

- (void)openWVWebView {
    SuiteWVWebViewController *webViewVC = [[SuiteWVWebViewController alloc] init];
    [self.navigationController pushViewController:webViewVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
#else
#endif
@end

