Giter Club home page Giter Club logo

Comments (6)

devedbox avatar devedbox commented on May 16, 2024 1

需要在初始化VC的时候设置URL,注意方法的调用顺序。-loadURL只是加载一个普通的URL,并不会在加载的时候设置URL的Ivar,你可以使用KVC试试

from axwebviewcontroller.

LinJiaXing1102 avatar LinJiaXing1102 commented on May 16, 2024

我发现注释掉viewDidLoad里面的if判断语句中的[self loadURL:[NSURL fileURLWithPath:kAX404NotFoundHTMLPath]];就可以解决了,但这明显是不行的

from axwebviewcontroller.

devedbox avatar devedbox commented on May 16, 2024

麻烦提供下示例代码@linjiaxing1992

from axwebviewcontroller.

LinJiaXing1102 avatar LinJiaXing1102 commented on May 16, 2024

一、
#import <UIKit/UIKit.h>
#import "AXWebViewController.h"

@interface PushViewController : AXWebViewController

@EnD

二、
#import "PushViewController.h"

@interface PushViewController ()

@EnD

@implementation PushViewController

  • (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];

    [self loadURL:[NSURL URLWithString:@"https://www.baidu.com"]];
    }

下载的demo也是继承的方法不能加载页面,直接显示404NotFound的界面

环境 :Xcode8.1 与 iOS 10.1

from axwebviewcontroller.

LinJiaXing1102 avatar LinJiaXing1102 commented on May 16, 2024

之前只是alloc init ,并没有设置url 。
已解决 谢谢

from axwebviewcontroller.

devedbox avatar devedbox commented on May 16, 2024

不客气

from axwebviewcontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.