m13pdfkit

Make done button in M13PDFKit as Back Button

走远了吗. 提交于 2019-12-12 03:03:46
问题 I'm using M13PDFKit. The done button in this image, i want to make it as back button. 回答1: Goto PDFKBasicPDFViewer.m and follow the steps. Step 1: Button code: self.backButtonTitle = @"Done"; [buttonsArray addObject:[[UIBarButtonItem alloc] initWithTitle:self.backButtonTitle style:UIBarButtonItemStylePlain target:self action:@selector(dismissed)]]; Step 2: Dismiss View: - (void)dismissed { [self.navigationController popToRootViewControllerAnimated:YES]; } Output: 来源: https://stackoverflow.com