Вот мой ответ от другого вопроса.
Первый необходимо сослаться на Adobe Reader ActiveX Control
Библиотека типов Управления Браузером Adobe Acrobat 1.0
%programfiles& \Common Files\Adobe\Acrobat\ActiveX\AcroPDF.dll
Затем Вы просто перетаскиваете его в свой Windows Form от Панели инструментов.
И используют некоторый код как это для инициализации элемента управления ActiveX.
private void InitializeAdobe(string filePath)
{
try
{
this.axAcroPDF1.LoadFile(filePath);
this.axAcroPDF1.src = filePath;
this.axAcroPDF1.setShowToolbar(false);
this.axAcroPDF1.setView("FitH");
this.axAcroPDF1.setLayoutMode("SinglePage");
this.axAcroPDF1.Show();
}
catch (Exception ex)
{
throw;
}
}
Удостоверяются, когда Ваши завершения Формы, что Вы избавляетесь от элемента управления ActiveX
this.axAcroPDF1.Dispose();
this.axAcroPDF1 = null;
иначе Acrobat, могли бы быть разбросаны, лежа.
Я упустил одну вещь. В setEditing: вместо вызова reloadData я должен был сделать:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[self.tableView setEditing:editing animated:animated]; // not needed if super is a UITableViewController
NSMutableArray* paths = [[NSMutableArray alloc] init];
// fill paths of insertion rows here
if( editing )
[self.tableView insertRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationBottom];
else
[self.tableView deleteRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationBottom];
[paths release];
}
Ответ на щелчки в строке может выполняться методом didSelectRowAtIndexPath
для indexPath.row == [количество элементов]
. Для анимации я предлагаю взглянуть здесь , на метод insertRowsAtIndexPaths: withRowAnimation:
. Там есть сообщение о том, как его использовать здесь .