EventEditViewController
次のコードで新しいイベントを追加するために を初期化しています。
- (void)presentEventEditViewControllerWithEventStore:(EKEventStore*)eventStore
{
EKEventEditViewController* vc = [[EKEventEditViewController alloc] init];
vc.eventStore = eventStore;
vc.delegate = self; // Probably self
EKEvent* event = [EKEvent eventWithEventStore:eventStore];
event.title = @"";
event.startDate = [NSDate date];
event.endDate = [NSDate date];
event.URL = [NSURL URLWithString:@""];
event.notes = @"";
event.allDay = NO;
vc.event = event;
vc.editViewDelegate = self;
[self presentViewController:vc animated:NO completion:nil];
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
UITableView *tableView = ((UITableViewController *)viewController).tableView;
if ([viewController isKindOfClass:[UITableViewController class]]) {
//((UITableViewController *)viewController).tableView.backgroundColor = [UIColor clearColor];
for (NSInteger j = 0; j < [tableView numberOfSections]; ++j)
{
for (NSInteger i = 0; i < [tableView numberOfRowsInSection:j]; ++i)
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:j]];
cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Background-1.png"]];
cell.textLabel.textColor = [UIColor whiteColor];
cell.textLabel.backgroundColor = [UIColor clearColor];
}
}
}
}
UITableViewCell
UITableViewは正常に表示されますが、iPhoneの画面に表示されなくなるまでスクロールを開始してからスクロールバックすると、TableViewCell
その画像が忘れられて標準に変わりますUITableViewCell
(背景画像やカスタマイズなし)。
スクロール前のスクリーンショット: http://postimg.org/image/vzlj3t5o9/ )
スクロール後のスクリーンショット: ( http://postimg.org/image/c30836v2v/ )
この問題を解決するにはどうすればよいですか?
前もって感謝します!