mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-28 06:25:04 -04:00
Empty table view text location fix
This commit is contained in:
parent
3acc1ddf08
commit
621d733cf3
@ -26,8 +26,8 @@ class CloudBooksController: UITableViewController, NSFetchedResultsControllerDel
|
|||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
// tableView.emptyDataSetSource = self
|
tableView.emptyDataSetSource = self
|
||||||
// tableView.emptyDataSetDelegate = self
|
tableView.emptyDataSetDelegate = self
|
||||||
tableView.tableFooterView = UIView()
|
tableView.tableFooterView = UIView()
|
||||||
|
|
||||||
refreshControl = RefreshLibControl()
|
refreshControl = RefreshLibControl()
|
||||||
|
@ -10,8 +10,9 @@ import UIKit
|
|||||||
import CoreData
|
import CoreData
|
||||||
import DZNEmptyDataSet
|
import DZNEmptyDataSet
|
||||||
|
|
||||||
class DownloadTasksController: UITableViewController, NSFetchedResultsControllerDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
|
class DownloadTasksController: UIViewController, NSFetchedResultsControllerDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
|
||||||
|
|
||||||
|
@IBOutlet weak var tableView: UITableView!
|
||||||
var timer: NSTimer?
|
var timer: NSTimer?
|
||||||
|
|
||||||
// MARK: - Override
|
// MARK: - Override
|
||||||
@ -84,16 +85,16 @@ class DownloadTasksController: UITableViewController, NSFetchedResultsController
|
|||||||
|
|
||||||
// MARK: - TableView Data Source
|
// MARK: - TableView Data Source
|
||||||
|
|
||||||
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
|
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
|
||||||
return fetchedResultController.sections?.count ?? 0
|
return fetchedResultController.sections?.count ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
guard let sectionInfo = fetchedResultController.sections?[section] else {return 0}
|
guard let sectionInfo = fetchedResultController.sections?[section] else {return 0}
|
||||||
return sectionInfo.numberOfObjects
|
return sectionInfo.numberOfObjects
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
|
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
|
||||||
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
|
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
|
||||||
self.configureCell(cell, atIndexPath: indexPath)
|
self.configureCell(cell, atIndexPath: indexPath)
|
||||||
return cell
|
return cell
|
||||||
@ -137,19 +138,19 @@ class DownloadTasksController: UITableViewController, NSFetchedResultsController
|
|||||||
|
|
||||||
// MARK: Other Data Source
|
// MARK: Other Data Source
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||||
guard tableView.numberOfSections > 1 else {return nil}
|
guard tableView.numberOfSections > 1 else {return nil}
|
||||||
guard let languageName = fetchedResultController.sections?[section].name else {return nil}
|
guard let languageName = fetchedResultController.sections?[section].name else {return nil}
|
||||||
return languageName
|
return languageName
|
||||||
}
|
}
|
||||||
|
|
||||||
override func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? {
|
func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? {
|
||||||
let sectionIndexTitles = fetchedResultController.sectionIndexTitles
|
let sectionIndexTitles = fetchedResultController.sectionIndexTitles
|
||||||
guard sectionIndexTitles.count > 2 else {return nil}
|
guard sectionIndexTitles.count > 2 else {return nil}
|
||||||
return sectionIndexTitles
|
return sectionIndexTitles
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int {
|
func tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int {
|
||||||
return fetchedResultController.sectionForSectionIndexTitle(title, atIndex: index)
|
return fetchedResultController.sectionForSectionIndexTitle(title, atIndex: index)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,13 +168,13 @@ class DownloadTasksController: UITableViewController, NSFetchedResultsController
|
|||||||
// header.textLabel?.font = UIFont.boldSystemFontOfSize(14)
|
// header.textLabel?.font = UIFont.boldSystemFontOfSize(14)
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
|
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {}
|
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
|
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
|
||||||
guard let downloadTask = self.fetchedResultController.objectAtIndexPath(indexPath) as? DownloadTask else {return nil}
|
guard let downloadTask = self.fetchedResultController.objectAtIndexPath(indexPath) as? DownloadTask else {return nil}
|
||||||
|
|
||||||
var actions = [UITableViewRowAction]()
|
var actions = [UITableViewRowAction]()
|
||||||
|
@ -26,9 +26,6 @@ extension DownloadTasksController {
|
|||||||
return NSAttributedString(string: string, attributes: attributes)
|
return NSAttributedString(string: string, attributes: attributes)
|
||||||
}
|
}
|
||||||
|
|
||||||
func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
|
||||||
return scrollView.contentInset.top - 64
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension LocalBooksController {
|
extension LocalBooksController {
|
||||||
@ -37,10 +34,6 @@ extension LocalBooksController {
|
|||||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||||
return NSAttributedString(string: string, attributes: attributes)
|
return NSAttributedString(string: string, attributes: attributes)
|
||||||
}
|
}
|
||||||
|
|
||||||
func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
|
||||||
return scrollView.contentInset.top - 64
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension BookDetailController {
|
extension BookDetailController {
|
||||||
@ -49,10 +42,6 @@ extension BookDetailController {
|
|||||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||||
return NSAttributedString(string: string, attributes: attributes)
|
return NSAttributedString(string: string, attributes: attributes)
|
||||||
}
|
}
|
||||||
|
|
||||||
func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
|
||||||
return scrollView.contentInset.top - 64
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension LanguageFilterController {
|
extension LanguageFilterController {
|
||||||
@ -62,7 +51,7 @@ extension LanguageFilterController {
|
|||||||
return NSAttributedString(string: string, attributes: attributes)
|
return NSAttributedString(string: string, attributes: attributes)
|
||||||
}
|
}
|
||||||
|
|
||||||
func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
// func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
||||||
return scrollView.contentInset.top - 64
|
// return scrollView.contentInset.top - 64
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
@ -11,13 +11,15 @@ import CoreData
|
|||||||
import Operations
|
import Operations
|
||||||
import DZNEmptyDataSet
|
import DZNEmptyDataSet
|
||||||
|
|
||||||
class LocalBooksController: UITableViewController, NSFetchedResultsControllerDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
|
class LocalBooksController: UIViewController, NSFetchedResultsControllerDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
|
||||||
|
|
||||||
|
@IBOutlet weak var tableView: UITableView!
|
||||||
|
|
||||||
// MARK: - Override
|
// MARK: - Override
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
required init?(coder aDecoder: NSCoder) {
|
||||||
super.init(coder: aDecoder)
|
super.init(coder: aDecoder)
|
||||||
title = ""
|
title = "Local"
|
||||||
tabBarItem.title = LocalizedStrings.LibraryTabTitle.local
|
tabBarItem.title = LocalizedStrings.LibraryTabTitle.local
|
||||||
tabBarItem.image = UIImage(named: "Folder")
|
tabBarItem.image = UIImage(named: "Folder")
|
||||||
tabBarItem.selectedImage = UIImage(named: "FolderFilled")
|
tabBarItem.selectedImage = UIImage(named: "FolderFilled")
|
||||||
@ -61,16 +63,16 @@ class LocalBooksController: UITableViewController, NSFetchedResultsControllerDel
|
|||||||
|
|
||||||
// MARK: - TableView Data Source
|
// MARK: - TableView Data Source
|
||||||
|
|
||||||
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
|
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
|
||||||
return fetchedResultController.sections?.count ?? 0
|
return fetchedResultController.sections?.count ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
guard let sectionInfo = fetchedResultController.sections?[section] else {return 0}
|
guard let sectionInfo = fetchedResultController.sections?[section] else {return 0}
|
||||||
return sectionInfo.numberOfObjects
|
return sectionInfo.numberOfObjects
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
|
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
|
||||||
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
|
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
|
||||||
self.configureCell(cell, atIndexPath: indexPath)
|
self.configureCell(cell, atIndexPath: indexPath)
|
||||||
return cell
|
return cell
|
||||||
@ -89,43 +91,43 @@ class LocalBooksController: UITableViewController, NSFetchedResultsControllerDel
|
|||||||
|
|
||||||
// MARK: Other Data Source
|
// MARK: Other Data Source
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||||
guard tableView.numberOfSections > 1 else {return nil}
|
guard tableView.numberOfSections > 1 else {return nil}
|
||||||
guard let languageName = fetchedResultController.sections?[section].name else {return nil}
|
guard let languageName = fetchedResultController.sections?[section].name else {return nil}
|
||||||
return languageName
|
return languageName
|
||||||
}
|
}
|
||||||
|
|
||||||
override func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? {
|
func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? {
|
||||||
let sectionIndexTitles = fetchedResultController.sectionIndexTitles
|
let sectionIndexTitles = fetchedResultController.sectionIndexTitles
|
||||||
guard sectionIndexTitles.count > 2 else {return nil}
|
guard sectionIndexTitles.count > 2 else {return nil}
|
||||||
return sectionIndexTitles
|
return sectionIndexTitles
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int {
|
func tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int {
|
||||||
return fetchedResultController.sectionForSectionIndexTitle(title, atIndex: index)
|
return fetchedResultController.sectionForSectionIndexTitle(title, atIndex: index)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Table View Delegate
|
// MARK: - Table View Delegate
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||||
guard tableView.numberOfSections > 1 else {return 0.0}
|
guard tableView.numberOfSections > 1 else {return 0.0}
|
||||||
guard let headerText = self.tableView(tableView, titleForHeaderInSection: section) else {return 0.0}
|
guard let headerText = self.tableView(tableView, titleForHeaderInSection: section) else {return 0.0}
|
||||||
guard headerText != "" else {return 0.0}
|
guard headerText != "" else {return 0.0}
|
||||||
return 20.0
|
return 20.0
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
|
func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
|
||||||
guard let header = view as? UITableViewHeaderFooterView else {return}
|
guard let header = view as? UITableViewHeaderFooterView else {return}
|
||||||
header.textLabel?.font = UIFont.boldSystemFontOfSize(14)
|
header.textLabel?.font = UIFont.boldSystemFontOfSize(14)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
|
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {}
|
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {}
|
||||||
|
|
||||||
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
|
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
|
||||||
let delete = UITableViewRowAction(style: .Destructive, title: LocalizedStrings.delete) { (action, indexPath) -> Void in
|
let delete = UITableViewRowAction(style: .Destructive, title: LocalizedStrings.delete) { (action, indexPath) -> Void in
|
||||||
guard let book = self.fetchedResultController.objectAtIndexPath(indexPath) as? Book else {return}
|
guard let book = self.fetchedResultController.objectAtIndexPath(indexPath) as? Book else {return}
|
||||||
self.managedObjectContext.performBlock({ () -> Void in
|
self.managedObjectContext.performBlock({ () -> Void in
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.7.1606</string>
|
<string>1.7.1634</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
@ -11,14 +11,15 @@
|
|||||||
<!--Cloud-->
|
<!--Cloud-->
|
||||||
<scene sceneID="x2g-Rm-HUS">
|
<scene sceneID="x2g-Rm-HUS">
|
||||||
<objects>
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="TMf-0g-nhn" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
<tableViewController id="NBP-9l-DA2" customClass="CloudBooksController" customModule="Kiwix" customModuleProvider="target" sceneMemberID="viewController">
|
<tableViewController id="NBP-9l-DA2" customClass="CloudBooksController" customModule="Kiwix" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="sit-w1-Gpr">
|
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="sit-w1-Gpr">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="CVW-Rc-hA9" customClass="BasicBookCell" customModule="Kiwix" customModuleProvider="target">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="CVW-Rc-hA9" customClass="BasicBookCell" customModule="Kiwix" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="CVW-Rc-hA9" id="xiL-PL-4ko">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="CVW-Rc-hA9" id="xiL-PL-4ko">
|
||||||
<frame key="frameInset" width="375" height="43.5"/>
|
<frame key="frameInset" width="375" height="43.5"/>
|
||||||
@ -107,10 +108,10 @@
|
|||||||
<outlet property="delegate" destination="NBP-9l-DA2" id="sqX-J8-zlB"/>
|
<outlet property="delegate" destination="NBP-9l-DA2" id="sqX-J8-zlB"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tableView>
|
</tableView>
|
||||||
|
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||||
<tabBarItem key="tabBarItem" title="Cloud" id="f2P-kQ-k9n"/>
|
<tabBarItem key="tabBarItem" title="Cloud" id="f2P-kQ-k9n"/>
|
||||||
<navigationItem key="navigationItem" id="JNh-sG-ihV"/>
|
<navigationItem key="navigationItem" id="JNh-sG-ihV"/>
|
||||||
</tableViewController>
|
</tableViewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="TMf-0g-nhn" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="-143" y="-2082"/>
|
<point key="canvasLocation" x="-143" y="-2082"/>
|
||||||
</scene>
|
</scene>
|
||||||
@ -126,8 +127,8 @@
|
|||||||
</tabBar>
|
</tabBar>
|
||||||
<connections>
|
<connections>
|
||||||
<segue destination="NBP-9l-DA2" kind="relationship" relationship="viewControllers" id="Zb0-fu-dUz"/>
|
<segue destination="NBP-9l-DA2" kind="relationship" relationship="viewControllers" id="Zb0-fu-dUz"/>
|
||||||
<segue destination="1jT-pv-sMM" kind="relationship" relationship="viewControllers" id="qHz-6T-Iyf"/>
|
<segue destination="7U1-44-aEc" kind="relationship" relationship="viewControllers" id="4Zm-9B-3Cv"/>
|
||||||
<segue destination="UgF-wM-QR2" kind="relationship" relationship="viewControllers" id="gII-bh-8JM"/>
|
<segue destination="7F2-9D-s8D" kind="relationship" relationship="viewControllers" id="Gql-Nm-iFI"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tabBarController>
|
</tabBarController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="fdG-uk-I8F" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="fdG-uk-I8F" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
@ -335,13 +336,115 @@
|
|||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="724" y="-1203"/>
|
<point key="canvasLocation" x="724" y="-1203"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Local-->
|
<!--Download-->
|
||||||
<scene sceneID="raW-mN-OFh">
|
<scene sceneID="Dfc-4k-8uO">
|
||||||
<objects>
|
<objects>
|
||||||
<tableViewController id="UgF-wM-QR2" customClass="LocalBooksController" customModule="Kiwix" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController id="7U1-44-aEc" customClass="DownloadTasksController" customModule="Kiwix" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="nsT-i8-6kX">
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="kxT-1r-Dgp"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="g59-Ou-zU4"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="Lfq-oN-mpU">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="8u2-KO-TvT">
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<prototypes>
|
||||||
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="82" id="ekT-ed-PU9" customClass="DownloadBookCell" customModule="Kiwix" customModuleProvider="target">
|
||||||
|
<rect key="frame" x="0.0" y="92" width="375" height="82"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ekT-ed-PU9" id="oM4-Hy-Mkf">
|
||||||
|
<frame key="frameInset" width="375" height="81.5"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" minimumFontSize="8" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hji-3G-yaJ">
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||||
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Too-68-SzG">
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="32" id="Y0e-hv-sVn"/>
|
||||||
|
<constraint firstAttribute="width" constant="32" id="go0-rs-4oQ"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="g0o-rT-qxm"/>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.10000000149011612" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="v8H-ZV-HNV">
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||||
|
<color key="textColor" red="0.33333333329999998" green="0.33333333329999998" blue="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0%" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Zg-Xf-xgS">
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="50" id="7Tn-he-LJu"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||||
|
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="6Zg-Xf-xgS" firstAttribute="leading" secondItem="Hji-3G-yaJ" secondAttribute="trailing" constant="2" id="5lO-Sp-t2G"/>
|
||||||
|
<constraint firstItem="v8H-ZV-HNV" firstAttribute="leading" secondItem="oM4-Hy-Mkf" secondAttribute="leadingMargin" id="7FW-0t-ljT"/>
|
||||||
|
<constraint firstAttribute="leadingMargin" secondItem="Too-68-SzG" secondAttribute="leading" constant="-2" id="9Vd-3e-m5f"/>
|
||||||
|
<constraint firstAttribute="bottomMargin" secondItem="v8H-ZV-HNV" secondAttribute="bottom" constant="-8" id="9ac-Vl-xk9"/>
|
||||||
|
<constraint firstAttribute="trailingMargin" secondItem="6Zg-Xf-xgS" secondAttribute="trailing" id="D9Q-Dz-SXA"/>
|
||||||
|
<constraint firstItem="g0o-rT-qxm" firstAttribute="top" secondItem="Too-68-SzG" secondAttribute="bottom" constant="4" id="IJR-yJ-4xs"/>
|
||||||
|
<constraint firstItem="g0o-rT-qxm" firstAttribute="trailing" secondItem="oM4-Hy-Mkf" secondAttribute="trailingMargin" id="OFh-b3-2bf"/>
|
||||||
|
<constraint firstAttribute="topMargin" secondItem="Hji-3G-yaJ" secondAttribute="top" id="U1i-uZ-le4"/>
|
||||||
|
<constraint firstItem="6Zg-Xf-xgS" firstAttribute="centerY" secondItem="Hji-3G-yaJ" secondAttribute="centerY" id="YMh-ny-Ldi"/>
|
||||||
|
<constraint firstItem="6Zg-Xf-xgS" firstAttribute="height" secondItem="Hji-3G-yaJ" secondAttribute="height" id="b9b-x4-38M"/>
|
||||||
|
<constraint firstAttribute="topMargin" secondItem="Too-68-SzG" secondAttribute="top" id="d1d-HJ-OWT"/>
|
||||||
|
<constraint firstItem="g0o-rT-qxm" firstAttribute="leading" secondItem="oM4-Hy-Mkf" secondAttribute="leadingMargin" id="egX-0j-bnY"/>
|
||||||
|
<constraint firstItem="Hji-3G-yaJ" firstAttribute="height" secondItem="Too-68-SzG" secondAttribute="height" id="fh9-1t-9il"/>
|
||||||
|
<constraint firstItem="Hji-3G-yaJ" firstAttribute="leading" secondItem="Too-68-SzG" secondAttribute="trailing" constant="6" id="u7a-MC-Z6U"/>
|
||||||
|
<constraint firstItem="v8H-ZV-HNV" firstAttribute="top" secondItem="g0o-rT-qxm" secondAttribute="bottom" constant="4" id="ybT-oZ-V6L"/>
|
||||||
|
<constraint firstItem="v8H-ZV-HNV" firstAttribute="trailing" secondItem="oM4-Hy-Mkf" secondAttribute="trailingMargin" id="zdf-lg-EBb"/>
|
||||||
|
</constraints>
|
||||||
|
</tableViewCellContentView>
|
||||||
|
<connections>
|
||||||
|
<outlet property="detailLabel" destination="v8H-ZV-HNV" id="nxi-1k-SWg"/>
|
||||||
|
<outlet property="favIcon" destination="Too-68-SzG" id="nfU-AD-1Ji"/>
|
||||||
|
<outlet property="progressLabel" destination="6Zg-Xf-xgS" id="9Tf-0y-Ix7"/>
|
||||||
|
<outlet property="progressView" destination="g0o-rT-qxm" id="Jaw-Zr-uJY"/>
|
||||||
|
<outlet property="titleLabel" destination="Hji-3G-yaJ" id="mZ2-S6-XEO"/>
|
||||||
|
<segue destination="5Sz-gR-dgz" kind="showDetail" identifier="ShowBookDetail" id="eUy-Zq-fkw"/>
|
||||||
|
</connections>
|
||||||
|
</tableViewCell>
|
||||||
|
</prototypes>
|
||||||
|
</tableView>
|
||||||
|
</subviews>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="8u2-KO-TvT" secondAttribute="trailing" id="0KV-wg-nPy"/>
|
||||||
|
<constraint firstItem="g59-Ou-zU4" firstAttribute="top" secondItem="8u2-KO-TvT" secondAttribute="bottom" constant="-49" id="8Do-5k-TXo"/>
|
||||||
|
<constraint firstItem="8u2-KO-TvT" firstAttribute="top" secondItem="kxT-1r-Dgp" secondAttribute="bottom" constant="-64" id="lcE-f1-hpD"/>
|
||||||
|
<constraint firstItem="8u2-KO-TvT" firstAttribute="leading" secondItem="Lfq-oN-mpU" secondAttribute="leading" id="pQk-Tb-XMY"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
<tabBarItem key="tabBarItem" title="Download" id="k3e-zU-RVs"/>
|
||||||
|
<connections>
|
||||||
|
<outlet property="tableView" destination="8u2-KO-TvT" id="Sb0-Ir-O7u"/>
|
||||||
|
</connections>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="3RF-Uc-QdV" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="724" y="-2082.008995502249"/>
|
||||||
|
</scene>
|
||||||
|
<!--Local-->
|
||||||
|
<scene sceneID="d9I-Yb-VwG">
|
||||||
|
<objects>
|
||||||
|
<viewController id="7F2-9D-s8D" customClass="LocalBooksController" customModule="Kiwix" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="Cko-ed-ceh"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="Drp-Si-aLW"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="sGb-6r-dsG">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Ofc-dk-yGh">
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="nka-b0-ZmD" customClass="BasicBookCell" customModule="Kiwix" customModuleProvider="target">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="nka-b0-ZmD" customClass="BasicBookCell" customModule="Kiwix" customModuleProvider="target">
|
||||||
@ -435,98 +538,24 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</tableViewCell>
|
</tableViewCell>
|
||||||
</prototypes>
|
</prototypes>
|
||||||
<connections>
|
|
||||||
<outlet property="dataSource" destination="UgF-wM-QR2" id="4rw-4Y-Q8E"/>
|
|
||||||
<outlet property="delegate" destination="UgF-wM-QR2" id="yB7-In-Cv3"/>
|
|
||||||
</connections>
|
|
||||||
</tableView>
|
</tableView>
|
||||||
<tabBarItem key="tabBarItem" title="Local" id="R3g-0K-R80"/>
|
|
||||||
</tableViewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="yJG-EP-Ec3" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="1644" y="-2082"/>
|
|
||||||
</scene>
|
|
||||||
<!--Download-->
|
|
||||||
<scene sceneID="sjb-AJ-Set">
|
|
||||||
<objects>
|
|
||||||
<tableViewController id="1jT-pv-sMM" customClass="DownloadTasksController" customModule="Kiwix" customModuleProvider="target" sceneMemberID="viewController">
|
|
||||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" id="PmA-ei-OQx">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
<prototypes>
|
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="82" id="ekT-ed-PU9" customClass="DownloadBookCell" customModule="Kiwix" customModuleProvider="target">
|
|
||||||
<rect key="frame" x="0.0" y="92" width="375" height="82"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ekT-ed-PU9" id="oM4-Hy-Mkf">
|
|
||||||
<frame key="frameInset" width="375" height="81.5"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
<subviews>
|
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" minimumFontSize="8" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hji-3G-yaJ">
|
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
|
||||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
<nil key="highlightedColor"/>
|
|
||||||
</label>
|
|
||||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Too-68-SzG">
|
|
||||||
<constraints>
|
|
||||||
<constraint firstAttribute="height" constant="32" id="Y0e-hv-sVn"/>
|
|
||||||
<constraint firstAttribute="width" constant="32" id="go0-rs-4oQ"/>
|
|
||||||
</constraints>
|
|
||||||
</imageView>
|
|
||||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="g0o-rT-qxm"/>
|
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.10000000149011612" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="v8H-ZV-HNV">
|
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
|
||||||
<color key="textColor" red="0.33333333329999998" green="0.33333333329999998" blue="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
<nil key="highlightedColor"/>
|
|
||||||
</label>
|
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0%" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Zg-Xf-xgS">
|
|
||||||
<constraints>
|
|
||||||
<constraint firstAttribute="width" constant="50" id="7Tn-he-LJu"/>
|
|
||||||
</constraints>
|
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
|
||||||
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
<nil key="highlightedColor"/>
|
|
||||||
</label>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="6Zg-Xf-xgS" firstAttribute="leading" secondItem="Hji-3G-yaJ" secondAttribute="trailing" constant="2" id="5lO-Sp-t2G"/>
|
<constraint firstItem="Drp-Si-aLW" firstAttribute="top" secondItem="Ofc-dk-yGh" secondAttribute="bottom" constant="-49" id="27R-n8-mas"/>
|
||||||
<constraint firstItem="v8H-ZV-HNV" firstAttribute="leading" secondItem="oM4-Hy-Mkf" secondAttribute="leadingMargin" id="7FW-0t-ljT"/>
|
<constraint firstItem="Ofc-dk-yGh" firstAttribute="leading" secondItem="sGb-6r-dsG" secondAttribute="leading" id="DsH-KT-BSc"/>
|
||||||
<constraint firstAttribute="leadingMargin" secondItem="Too-68-SzG" secondAttribute="leading" constant="-2" id="9Vd-3e-m5f"/>
|
<constraint firstAttribute="trailing" secondItem="Ofc-dk-yGh" secondAttribute="trailing" id="hNG-fK-7Bf"/>
|
||||||
<constraint firstAttribute="bottomMargin" secondItem="v8H-ZV-HNV" secondAttribute="bottom" constant="-8" id="9ac-Vl-xk9"/>
|
<constraint firstItem="Ofc-dk-yGh" firstAttribute="top" secondItem="Cko-ed-ceh" secondAttribute="bottom" constant="-64" id="kiZ-jv-os8"/>
|
||||||
<constraint firstAttribute="trailingMargin" secondItem="6Zg-Xf-xgS" secondAttribute="trailing" id="D9Q-Dz-SXA"/>
|
|
||||||
<constraint firstItem="g0o-rT-qxm" firstAttribute="top" secondItem="Too-68-SzG" secondAttribute="bottom" constant="4" id="IJR-yJ-4xs"/>
|
|
||||||
<constraint firstItem="g0o-rT-qxm" firstAttribute="trailing" secondItem="oM4-Hy-Mkf" secondAttribute="trailingMargin" id="OFh-b3-2bf"/>
|
|
||||||
<constraint firstAttribute="topMargin" secondItem="Hji-3G-yaJ" secondAttribute="top" id="U1i-uZ-le4"/>
|
|
||||||
<constraint firstItem="6Zg-Xf-xgS" firstAttribute="centerY" secondItem="Hji-3G-yaJ" secondAttribute="centerY" id="YMh-ny-Ldi"/>
|
|
||||||
<constraint firstItem="6Zg-Xf-xgS" firstAttribute="height" secondItem="Hji-3G-yaJ" secondAttribute="height" id="b9b-x4-38M"/>
|
|
||||||
<constraint firstAttribute="topMargin" secondItem="Too-68-SzG" secondAttribute="top" id="d1d-HJ-OWT"/>
|
|
||||||
<constraint firstItem="g0o-rT-qxm" firstAttribute="leading" secondItem="oM4-Hy-Mkf" secondAttribute="leadingMargin" id="egX-0j-bnY"/>
|
|
||||||
<constraint firstItem="Hji-3G-yaJ" firstAttribute="height" secondItem="Too-68-SzG" secondAttribute="height" id="fh9-1t-9il"/>
|
|
||||||
<constraint firstItem="Hji-3G-yaJ" firstAttribute="leading" secondItem="Too-68-SzG" secondAttribute="trailing" constant="6" id="u7a-MC-Z6U"/>
|
|
||||||
<constraint firstItem="v8H-ZV-HNV" firstAttribute="top" secondItem="g0o-rT-qxm" secondAttribute="bottom" constant="4" id="ybT-oZ-V6L"/>
|
|
||||||
<constraint firstItem="v8H-ZV-HNV" firstAttribute="trailing" secondItem="oM4-Hy-Mkf" secondAttribute="trailingMargin" id="zdf-lg-EBb"/>
|
|
||||||
</constraints>
|
</constraints>
|
||||||
</tableViewCellContentView>
|
</view>
|
||||||
|
<tabBarItem key="tabBarItem" title="Local" id="YcZ-Z5-yVM"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="detailLabel" destination="v8H-ZV-HNV" id="nxi-1k-SWg"/>
|
<outlet property="tableView" destination="Ofc-dk-yGh" id="jPp-jZ-xVx"/>
|
||||||
<outlet property="favIcon" destination="Too-68-SzG" id="nfU-AD-1Ji"/>
|
|
||||||
<outlet property="progressLabel" destination="6Zg-Xf-xgS" id="9Tf-0y-Ix7"/>
|
|
||||||
<outlet property="progressView" destination="g0o-rT-qxm" id="Jaw-Zr-uJY"/>
|
|
||||||
<outlet property="titleLabel" destination="Hji-3G-yaJ" id="mZ2-S6-XEO"/>
|
|
||||||
<segue destination="5Sz-gR-dgz" kind="showDetail" identifier="ShowBookDetail" id="eUy-Zq-fkw"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</tableViewCell>
|
</viewController>
|
||||||
</prototypes>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="bcg-9M-Ggg" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
<connections>
|
|
||||||
<outlet property="dataSource" destination="1jT-pv-sMM" id="6Fl-Vq-IMf"/>
|
|
||||||
<outlet property="delegate" destination="1jT-pv-sMM" id="c9L-pM-eiZ"/>
|
|
||||||
</connections>
|
|
||||||
</tableView>
|
|
||||||
<tabBarItem key="tabBarItem" title="Download" id="Re6-71-CgJ"/>
|
|
||||||
</tableViewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="y49-5w-Edz" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="724" y="-2082.008995502249"/>
|
<point key="canvasLocation" x="1644" y="-2082.008995502249"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Language Filter Controller-->
|
<!--Language Filter Controller-->
|
||||||
<scene sceneID="IeL-6r-fE6">
|
<scene sceneID="IeL-6r-fE6">
|
||||||
@ -685,6 +714,6 @@
|
|||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
<inferredMetricsTieBreakers>
|
<inferredMetricsTieBreakers>
|
||||||
<segue reference="YBq-US-fwE"/>
|
<segue reference="hUB-db-MDL"/>
|
||||||
</inferredMetricsTieBreakers>
|
</inferredMetricsTieBreakers>
|
||||||
</document>
|
</document>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.7.2035</string>
|
<string>1.7.2073</string>
|
||||||
<key>NSExtension</key>
|
<key>NSExtension</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSExtensionMainStoryboard</key>
|
<key>NSExtensionMainStoryboard</key>
|
||||||
|
@ -19,21 +19,5 @@
|
|||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
shouldBeEnabled = "Yes"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "Kiwix-iOS/Controller/Library/LocalBooksController.swift"
|
|
||||||
timestampString = "494262895.106702"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "40"
|
|
||||||
endingLineNumber = "40"
|
|
||||||
landmarkName = "prepareForSegue(segue:sender:)"
|
|
||||||
landmarkType = "7">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
@ -12,6 +12,7 @@ import Operations
|
|||||||
class RefreshLibraryOperation: GroupOperation {
|
class RefreshLibraryOperation: GroupOperation {
|
||||||
|
|
||||||
private(set) var hasUpdate = false
|
private(set) var hasUpdate = false
|
||||||
|
private(set) var firstTime = false
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
let retrive = Retrive()
|
let retrive = Retrive()
|
||||||
@ -22,6 +23,7 @@ class RefreshLibraryOperation: GroupOperation {
|
|||||||
process.addObserver(DidFinishObserver { (operation, errors) in
|
process.addObserver(DidFinishObserver { (operation, errors) in
|
||||||
guard let operation = operation as? Process else {return}
|
guard let operation = operation as? Process else {return}
|
||||||
self.hasUpdate = operation.hasUpdate
|
self.hasUpdate = operation.hasUpdate
|
||||||
|
self.firstTime = operation.firstTime
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,6 +52,7 @@ private class Retrive: Operation, ResultOperationType {
|
|||||||
private class Process: Operation, NSXMLParserDelegate, AutomaticInjectionOperationType {
|
private class Process: Operation, NSXMLParserDelegate, AutomaticInjectionOperationType {
|
||||||
var requirement: NSData?
|
var requirement: NSData?
|
||||||
private(set) var hasUpdate = false
|
private(set) var hasUpdate = false
|
||||||
|
private(set) var firstTime = false
|
||||||
private let context: NSManagedObjectContext
|
private let context: NSManagedObjectContext
|
||||||
private var oldBookIDs = Set<String>()
|
private var oldBookIDs = Set<String>()
|
||||||
private var newBookIDs = Set<String>()
|
private var newBookIDs = Set<String>()
|
||||||
@ -110,6 +113,7 @@ private class Process: Operation, NSXMLParserDelegate, AutomaticInjectionOperati
|
|||||||
})
|
})
|
||||||
|
|
||||||
saveManagedObjectContexts()
|
saveManagedObjectContexts()
|
||||||
|
firstTime = Preference.libraryLastRefreshTime == nil
|
||||||
Preference.libraryLastRefreshTime = NSDate()
|
Preference.libraryLastRefreshTime = NSDate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,17 +11,6 @@ import Operations
|
|||||||
|
|
||||||
// MARK: - Alerts
|
// MARK: - Alerts
|
||||||
|
|
||||||
class SpaceNotEnoughAlert: AlertOperation<CloudBooksController> {
|
|
||||||
let comment = "Library: Download Space Not Enough Alert"
|
|
||||||
init(book: Book, presentationContext: CloudBooksController) {
|
|
||||||
super.init(presentAlertFrom: presentationContext)
|
|
||||||
|
|
||||||
title = NSLocalizedString("Space Not Enough", comment: comment)
|
|
||||||
message = NSLocalizedString("You don't have enough remaining space to download this book.", comment: comment)
|
|
||||||
addActionWithTitle(LocalizedStrings.ok)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class RefreshLibraryLanguageFilterAlert: AlertOperation<CloudBooksController> {
|
class RefreshLibraryLanguageFilterAlert: AlertOperation<CloudBooksController> {
|
||||||
let comment = "Library: Language Filter Alert"
|
let comment = "Library: Language Filter Alert"
|
||||||
let context = UIApplication.appDelegate.managedObjectContext
|
let context = UIApplication.appDelegate.managedObjectContext
|
||||||
@ -79,13 +68,13 @@ class RefreshLibraryLanguageFilterAlert: AlertOperation<CloudBooksController> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class RefreshLibraryInternetRequiredAlert: AlertOperation<CloudBooksController> {
|
class RefreshLibraryInternetRequiredAlert: AlertOperation<CloudBooksController> {
|
||||||
let comment = "Library: Internet Required Alert"
|
let comment = "Library, Internet Required Alert"
|
||||||
init(presentationContext: CloudBooksController) {
|
init(presentationContext: CloudBooksController) {
|
||||||
super.init(presentAlertFrom: presentationContext)
|
super.init(presentAlertFrom: presentationContext)
|
||||||
|
|
||||||
title = NSLocalizedString("Internet Connection Required", comment: comment)
|
title = NSLocalizedString("Internet Required", comment: comment)
|
||||||
message = NSLocalizedString("You need to connect to the Internet to refresh the library.", comment: comment)
|
message = NSLocalizedString("Please connect to the Internet to refresh library.", comment: comment)
|
||||||
addActionWithTitle(LocalizedStrings.ok)
|
addActionWithTitle(LocalizedStrings.Common.ok)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user