【发布时间】:2015-02-04 21:51:33
【问题描述】:
我创建了简单的时间表小部件,但是当我尝试在 iOS 模拟器中对其进行测试时,它会显示类似
时间表[4012:108619] 未能从 3965 继承 CoreMedia 权限:(null)
并且小部件没有显示出来。 这是我的代码。
#import "TodayViewController.h"
#import <NotificationCenter/NotificationCenter.h>
@interface TodayViewController () <NCWidgetProviding, UITableViewDataSource, UITableViewDelegate>
@end
@implementation TodayViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TableCell"];
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 7;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler {
// Perform any setup necessary in order to update the view.
// If an error is encountered, use NCUpdateResultFailed
// If there's no update required, use NCUpdateResultNoData
// If there's an update, use NCUpdateResultNewData
completionHandler(NCUpdateResultNewData);
}
@end
【问题讨论】:
标签: ios objective-c xcode6 ios8-extension notificationcenter