//
|
// AboutOurViewController.m
|
// PapayaPlayerDaqo
|
//
|
// Created by weikou on 15/8/4.
|
// Copyright (c) 2015年 wgj. All rights reserved.
|
//
|
|
#import "SettingWebView.h"
|
|
@interface SettingWebView ()
|
|
@end
|
|
@implementation SettingWebView
|
|
- (void)viewDidLoad {
|
[super viewDidLoad];
|
self.title = _webTitle;
|
|
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
|
[button setImage:[[UIImage imageNamed:@"详情页面返回"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
|
[button addTarget:self action:@selector(back:)
|
forControlEvents:UIControlEventTouchUpInside];
|
button.frame = CGRectMake(0, 0, 32, 32);
|
UIBarButtonItem *iconBarItem=[[UIBarButtonItem alloc] initWithCustomView:button];
|
self.navigationItem.leftBarButtonItem = iconBarItem;
|
//设置使用模态跳转的返回按钮
|
if(_ispresent){
|
//隐藏状态栏
|
[[UIApplication sharedApplication] setStatusBarHidden:YES];
|
//添加返回按钮
|
CGFloat height = 15;
|
if (KIsiPhoneX) {
|
height = 35;
|
}
|
UIButton *backButton=[[UIButton alloc] initWithFrame:CGRectMake(15, height, 32, 32)];
|
[backButton setImage:[UIImage imageNamed:@"取消登录"] forState:UIControlStateNormal];
|
[backButton addTarget:self action:@selector(presentBack) forControlEvents:UIControlEventTouchUpInside];
|
[self.view addSubview:backButton];
|
}
|
CGFloat height = 64;
|
if (KIsiPhoneX) {
|
height = 84;
|
}
|
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, height, KScreenW, KScreenH - height)];
|
NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:_requestURL]];
|
[self.view addSubview: webView];
|
[webView loadRequest:request];
|
|
// Do any additional setup after loading the view from its nib.
|
}
|
-(void)presentBack{
|
[self dismissViewControllerAnimated:YES completion:^{
|
//状态栏重现
|
[[UIApplication sharedApplication] setStatusBarHidden:NO];
|
}];
|
}
|
|
- (void)didReceiveMemoryWarning {
|
[super didReceiveMemoryWarning];
|
// Dispose of any resources that can be recreated.
|
}
|
|
-(void)back:(id)sender{
|
[self.navigationController popViewControllerAnimated:YES];
|
}
|
|
/*
|
#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.
|
}
|
*/
|
|
@end
|