Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
takasurazeem committed Oct 22, 2023
1 parent 85647e1 commit b5e7478
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion QuranMajeed/AppDependencyContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import LastPagePersistence
import NotePersistence
import PageBookmarkPersistence
import ReadingService
import Analytics
import Logging
import VLogging

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct _FlexibleView<Data: Collection, Content: View>: View where Data.Element:
remainingWidth = availableWidth
}

remainingWidth = remainingWidth - (elementSize.width + spacing)
remainingWidth -= (elementSize.width + spacing)
}

return rows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,8 @@
import PDFKit
import SwiftUI

// TODO: - Set custom border
//class BorderAnnotation: PDFBorder {
// override func draw(in rect: CGRect) {
// super.draw(in: rect)
// style = .dashed
// }
//}
//
//class MainPDFViewDelegate: NSObject, PDFDocumentDelegate {
//
// func `class`(forAnnotationType annotationType: String) -> AnyClass {
// BorderAnnotation.self
// }
//}


struct PDFKitView: UIViewRepresentable {
public var documentData: Data?
// let documentDelegate = MainPDFViewDelegate()

func makeUIView(context: UIViewRepresentableContext<PDFKitView>) -> PDFView {
// Creating a new PDFVIew and adding a document to it
Expand All @@ -50,11 +33,8 @@ struct PDFKitView: UIViewRepresentable {
border.style = .dashed
border.lineWidth = 3

// annotation.border = border
let lastPage = document.page(at: document.pageCount - 1)
lastPage?.addAnnotation(annotation)
// TODO: - Set custom border
// document.delegate = documentDelegate
pdfView.autoScales = true
}

Expand Down

0 comments on commit b5e7478

Please sign in to comment.