gpt4 book ai didi

ios - 此类与键 pdfView 的键值编码不兼容

转载 作者:行者123 更新时间:2023-11-29 12:55:53 24 4
gpt4 key购买 nike

<分区>

我正在制作一个有点基本的 ios 应用程序,我试图让用户单击 uitableview 中的一个单元格,然后让它打开一个 pdf。不过,我遇到了一个奇怪的错误。当我点击单元格时,应用程序崩溃,这是我的错误

014-01-14 20:15:09.782 CCHA App[1171:60b] *** Terminating app due to uncaught exception       'NSUnknownKeyException', reason: '[<PDFDetailViewController 0x15680a10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key pdfView.'
*** First throw call stack:
(0x3000ef4b 0x3a44f6af 0x3000ec61 0x3094e18b 0x3095fdd5 0x2ff7ee6f 0x32ae0f87 0x32a42917 0x328a4389 0x327861bd 0x32786139 0x329123eb 0x32830273 0x3283007d 0x32830015 0x32781da3 0x32408c6b 0x3240447b 0x3240430d 0x32403d1f 0x32403b2f 0x323fd85d 0x2ffda1cd 0x2ffd7b71 0x2ffd7eb3 0x2ff42c27 0x2ff42a0b 0x34c69283 0x327e6049 0x18269 0x3a957ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

这是我的一些代码!

//
// PDFDetailViewController.h
// CCHA App
//
// Created on 1/14/14.
// Copyright (c) 2014 CCHA. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface PDFDetailViewController : UIViewController {

}
@property (strong, nonatomic) IBOutlet UIWebView *PDFWebView;


@end

//
// PDFDetailViewController.m
// CCHA App
//
// Created on 1/14/14.
// Copyright (c) 2014 CCHA. All rights reserved.
//

#import "PDFDetailViewController.h"

@interface PDFDetailViewController ()

@end

@implementation PDFDetailViewController

@synthesize PDFWebView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.

NSString *path = [[NSBundle mainBundle] pathForResource:@"TestingDoc" ofType:@"pdf"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[PDFWebView loadRequest:request];
[PDFWebView setScalesPageToFit:YES];

}

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

@end

我无法弄清楚为什么会这样,我们将不胜感激任何帮助。谢谢!!

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com