Я создал простой виджет расписания, но когда я пытаюсь проверить его в IOS симуляторе, он говорит что-то вродеIOS-Сегодня виджет не отображается при загрузке
Расписания [4012: 108619] Не удались наследовать разрешения CoreMedia от 3965: (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. –
Вижу, вы должны были упомянуть об этом. Ответ обновлен. –
Странно, но то же самое происходит. Можно ли использовать пользовательскую высоту UITableView в виджетах? –