小编Ber*_*aya的帖子

在 PHP 中获取 PDF 文件的内容

我有一个动画书 jquery 页面和太多的电子书(pdf 格式),无法在上面显示。我需要隐藏这些 PDF,以便我想用 PHP 获取它的内容并用我的 FlipBook jquery 页面显示它。(而不是提供整个pdf,我想将其作为部分提供)。

有什么办法可以用 PHP 获取 PDF 文件的全部内容?我需要根据他们的页面将它们分开。

php pdf parsing

7
推荐指数
1
解决办法
3万
查看次数

滑动操作时UINavigationController崩溃UI(黑屏,视频里面)

我有一个UIViewController推出navigationController 它使用自定义左/后退按钮与interactivePopGestureRecognizer,但是,当我从tableview单击一行我的应用程序有时卡住,按下主页按钮后,然后重新打开应用程序,它继续但导航控制器的滑动操作变得怪异.这是我所说的视频;

https://streamable.com/xvl38

//This is the function that I use to open chat from tableview on didSelectRowAt

func openChat(with nick: String, isFromConversationList: Bool) {
        guard let chatVC = UIStoryboard(name: "Main", bundle: .main).instantiateViewController(withIdentifier: "ChatViewController") as? ChatViewController,
            let rootNC = UIApplication.shared.keyWindow?.rootViewController as? UINavigationController else {
                return
        }
        rootNC.pushViewController(chatVC, animated: true)
}

override func viewDidLoad() {
    super.viewDidLoad()
    navigationController?.interactivePopGestureRecognizer?.delegate = nil
}
override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)   
    self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
override func viewDidDisappear(_ animated: Bool) {
    super.viewDidDisappear(animated)
    self.navigationController?.interactivePopGestureRecognizer?.isEnabled …
Run Code Online (Sandbox Code Playgroud)

ios swift

6
推荐指数
0
解决办法
318
查看次数

在Swift 2.0中以横向模式使用UIImagePickerController

我正在编写仅限LandScape的iPad应用程序,我需要从库中拍照才能发送数据库,但图像上传屏幕仅适用于纵向模式.如何将其更改为横向模式?我读过一些关于UIPickerControllerDelegate的东西不支持横向模式,但是一些应用程序(例如iMessage)已经在使用它了.

这是我的代码:

class signUpViewController: UIViewController,UIPickerViewDataSource, UIPickerViewDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate {


func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) {

    print("Image Selected")

    self.dismissViewControllerAnimated(true, completion: nil)

    profileImageView.image = image

}



@IBAction func importImage(sender: AnyObject) {

    var image = UIImagePickerController()
    image.delegate = self
    image.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
    image.allowsEditing = false

    self.presentViewController(image, animated: true, completion: nil)
}
}
Run Code Online (Sandbox Code Playgroud)

xcode ios swift

5
推荐指数
1
解决办法
5750
查看次数

以编程方式将搜索栏添加到swift中的tableview

我有一个textfield,表示tableview作为其inputview.我想在这个tableview中添加两件事.

1)添加一个搜索栏.
2)在表格视图的顶部添加取消按钮.

class enterYourDealVC: UIViewController, UITableViewDataSource, UITableViewDelegate, UISearchBarDelegate, UISearchDisplayDelegate, UISearchResultsUpdating {
var tableView: UITableView  =   UITableView()
let searchController = UISearchController(searchResultsController: nil)

var dealAirports = [
    airPorts(name: "Airport1", shortcut: "AP1")!),
    airPorts(name: "Airport2", shortcut: "AP2")!)
]
var filteredAirports = [airPorts]()


//view did load
    tableView = UITableView(frame: UIScreen.mainScreen().bounds, style: UITableViewStyle.Plain)
    tableView.delegate      =   self
    tableView.dataSource    =   self
    tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")

    searchController.searchResultsUpdater = self
    searchController.dimsBackgroundDuringPresentation = false
    definesPresentationContext = true
    tableView.tableHeaderView = searchController.searchBar
    toTextField.inputView = self.tableView

//here is my search function
func filterContentForSearchText(searchText: String, …
Run Code Online (Sandbox Code Playgroud)

uitableview uisearchbar ios swift

5
推荐指数
3
解决办法
2万
查看次数

JS增加/减少多个输入数字变量

我一直在尝试增加和减少 'val' 类的值,我将在一页中多次使用它们。我还需要为它们设置 MIN 和 MAX 值。

   <input type="button" value="-" class="decreaseVal">
   <input type="number" min ="1" max="22" value="20" class="val" disabled>
   <input type="button" value="+" class="increaseVal">


   // JS CODE THAT I TRY
   $(".decreaseVal").click(function() {
      var num = $(this).next('input').val();
   });


   $(".increaseVal").click(function() {
      var num = $(this).prev('input').val();
   });
Run Code Online (Sandbox Code Playgroud)

我可以得到它们的值,但我无法改变它们。有什么建议吗?

html javascript jquery

2
推荐指数
1
解决办法
2184
查看次数

标签 统计

ios ×3

swift ×3

html ×1

javascript ×1

jquery ×1

parsing ×1

pdf ×1

php ×1

uisearchbar ×1

uitableview ×1

xcode ×1