我的应用程序中有一个每日引用节,这个引用是从互联网上的一个网页中获得的。我一直在尝试使用Today扩展添加引用,以便可以在那里查看,但扩展始终为空白。
我已经添加了带有故事板的Today扩展文件,在代码的实现文件中,我有以下内容:
我已经添加了带有故事板的Today扩展文件,在代码的实现文件中,我有以下内容:
#import "TodayViewController.h"
#import <NotificationCenter/NotificationCenter.h>
@interface TodayViewController () <NCWidgetProviding>
@end
@implementation TodayViewController
-(void)viewDidLoad {
[super viewDidLoad];
self.title = @"Today's Scripture";
self.preferredContentSize = CGSizeMake(320, 50);
[reader loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.316apps.com/testingdailyreader.html"]cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60.0]];
// timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(tick) userInfo:nil repeats:YES];
}
@end
然而,我得到的只是一个空行,通知中心上显示“无法加载”。我做错了什么?