내가 작업중인 프로젝트에 대한 몇 가지 팁을 부탁드립니다. 저는 Xcode 초보자입니다. 아마도 내가 생각하는 것보다 더 쉽습니다.HTML 전달 - 데이터 전달 속성 목록
그래서 내가 만들고자하는 응용 프로그램은 두 개의 TableView 사이에서 데이터 콜렉션을 보여 주며 끝에 뷰 컨트롤러에 이미지를 보여줍니다. TableViews와 ViewController 사이의 데이터를 관리하기 위해 Property Lists를 구현했습니다.
여기 내 문제는, 그냥 (이미지 파일이 아닌) 내 리소스 폴더에 저장된 HTML 파일을 (마지막 ViewController에서) 보여주고 싶습니다. 누군가가 그 코드를 작성하도록 도와 줄 수 있습니까?
ViewController.h
#import <UIKit/UIKit.h>
@interface MethodsViewController : UIViewController
@property UIImage *bookCover;
@property IBOutlet UIImageView *bookCoverView;
@end
ViewController.m
#pragma mark -
#pragma mark View Life Cycle
- (void)viewDidLoad {
[super viewDidLoad];
if (self.bookCover) {
[self.bookCoverView setImage:self.bookCover];
}
}
@end
SecondTableView.m : 나는 어떤, 지금까지 이미지의 코드를 작성 할 수있었습니다
세그
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
// Fetch Book Cover
NSDictionary *book = [self.books objectAtIndex:[indexPath row]];
self.bookCover = [UIImage imageNamed:[book objectForKey:@"Cover"]];
// Perform Segue
[self performSegueWithIdentifier:@"MethodsViewController" sender:self];
}
@end
을 : 스토리 보드에서, 다음과 같이
HTML
을로드 할 수 있습니다aWebView
에설정 프레임 :
다음 코드를 시도
NSString
로webText
매개 변수를 얻으려면 -> 선언되지 않은 식별자 "webText"의 사용 –업데이트를보고, 여기서 'webText'에 대한 코드를 추가했습니다. –