CGFloat scanWindowH = Width - kMargin * 2;
CGFloat scanWindowW = Width - kMargin * 2;
_scanWindow = [[UIView alloc] initWithFrame:CGRectMake(0,0, scanWindowW, scanWindowH)];
_scanWindow.center = self.view.center;
_scanWindow.clipsToBounds = YES;
[self.view addSubview:_scanWindow];
_scanNetImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"scan_net"]];
_scanNetImageView.frame = _scanWindow.frame;
_scanNetImageView.center = self.view.center;
CGFloat buttonWH = 18;
[_scanWindow addSubview:_scanNetImageView];
UIButton *topLeft = [[UIButton alloc] initWithFrame:CGRectMake(1, 0, buttonWH, buttonWH)];
[topLeft setImage:[UIImage imageNamed:@"scan_1"] forState:UIControlStateNormal];
[_scanWindow addSubview:topLeft];
UIButton *topRight = [[UIButton alloc] initWithFrame:CGRectMake(scanWindowW - buttonWH - 1, 0, buttonWH, buttonWH)];
[topRight setImage:[UIImage imageNamed:@"scan_2"] forState:UIControlStateNormal];
[_scanWindow addSubview:topRight];
UIButton *bottomLeft = [[UIButton alloc] initWithFrame:CGRectMake(1, scanWindowH - buttonWH, buttonWH, buttonWH)];
[bottomLeft setImage:[UIImage imageNamed:@"scan_3"] forState:UIControlStateNormal];
[_scanWindow addSubview:bottomLeft];
UIButton *bottomRight = [[UIButton alloc] initWithFrame:CGRectMake(topRight.frame.origin.x, bottomLeft.frame.origin.y, buttonWH, buttonWH)];
[bottomRight setImage:[UIImage imageNamed:@"scan_4"] forState:UIControlStateNormal];
[_scanWindow addSubview:bottomRight];