mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-27 05:49:25 -04:00
empty table view background
This commit is contained in:
parent
987c633a14
commit
afe93874e3
21
Kiwix-iOS/Assets.xcassets/Library/BookColor.imageset/Contents.json
vendored
Normal file
21
Kiwix-iOS/Assets.xcassets/Library/BookColor.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "open-book.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
Kiwix-iOS/Assets.xcassets/Library/BookColor.imageset/open-book.png
vendored
Normal file
BIN
Kiwix-iOS/Assets.xcassets/Library/BookColor.imageset/open-book.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
@ -10,19 +10,18 @@ import UIKit
|
||||
import DZNEmptyDataSet
|
||||
|
||||
extension CloudBooksController {
|
||||
|
||||
func imageForEmptyDataSet(scrollView: UIScrollView!) -> UIImage! {
|
||||
return UIImage(named: "CloudColor")
|
||||
}
|
||||
|
||||
func titleForEmptyDataSet(scrollView: UIScrollView!) -> NSAttributedString! {
|
||||
let string = NSLocalizedString("There are some books in the cloud", comment: "Cloud Book Controller")
|
||||
let string = NSLocalizedString("There are some books in the cloud", comment: "Library, cloud tab")
|
||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
}
|
||||
|
||||
func buttonTitleForEmptyDataSet(scrollView: UIScrollView!, forState state: UIControlState) -> NSAttributedString! {
|
||||
let string = isRefreshing ? NSLocalizedString("Refreshing...", comment: "Cloud Book Controller") : NSLocalizedString("Refresh", comment: "Cloud Book Controller")
|
||||
let string = isRefreshing ? NSLocalizedString("Refreshing...", comment: "Library, cloud tab") : NSLocalizedString("Refresh", comment: "Library, cloud tab")
|
||||
let attributes = [NSFontAttributeName: UIFont.boldSystemFontOfSize(17), NSForegroundColorAttributeName: isRefreshing ? UIColor.grayColor() : AppColors.theme]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
}
|
||||
@ -35,33 +34,52 @@ extension CloudBooksController {
|
||||
func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
||||
return -navigationController!.navigationBar.frame.height
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension DownloadTasksController {
|
||||
func imageForEmptyDataSet(scrollView: UIScrollView!) -> UIImage! {
|
||||
return UIImage(named: "DownloadColor")
|
||||
}
|
||||
|
||||
func titleForEmptyDataSet(scrollView: UIScrollView!) -> NSAttributedString! {
|
||||
let string = NSLocalizedString("No Download Tasks", comment: "")
|
||||
let string = NSLocalizedString("No Download Tasks", comment: "Library, download tab")
|
||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
}
|
||||
}
|
||||
|
||||
extension LocalBooksController {
|
||||
func imageForEmptyDataSet(scrollView: UIScrollView!) -> UIImage! {
|
||||
return UIImage(named: "FolderColor")
|
||||
}
|
||||
|
||||
func titleForEmptyDataSet(scrollView: UIScrollView!) -> NSAttributedString! {
|
||||
let string = NSLocalizedString("No Local Books on Device", comment: "Library, local tab")
|
||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
}
|
||||
|
||||
func descriptionForEmptyDataSet(scrollView: UIScrollView!) -> NSAttributedString! {
|
||||
let string = NSLocalizedString("Add Book by download in app or iTunes File Sharing. New books will show up here automatically.", comment: "Library, local tab")
|
||||
let paragraph = NSMutableParagraphStyle()
|
||||
paragraph.lineBreakMode = .ByWordWrapping
|
||||
paragraph.alignment = .Center
|
||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(14), NSForegroundColorAttributeName: UIColor.lightGrayColor(), NSParagraphStyleAttributeName: paragraph]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
}
|
||||
|
||||
func verticalOffsetForEmptyDataSet(scrollView: UIScrollView!) -> CGFloat {
|
||||
return tabBarController!.navigationController!.navigationBar.frame.maxY
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension LocalBooksController {
|
||||
func titleForEmptyDataSet(scrollView: UIScrollView!) -> NSAttributedString! {
|
||||
let string = NSLocalizedString("No Local Books on Device", comment: "")
|
||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
return -tabBarController!.navigationController!.navigationBar.frame.maxY
|
||||
}
|
||||
}
|
||||
|
||||
extension BookDetailController {
|
||||
func imageForEmptyDataSet(scrollView: UIScrollView!) -> UIImage! {
|
||||
return UIImage(named: "BookColor")
|
||||
}
|
||||
|
||||
func titleForEmptyDataSet(scrollView: UIScrollView!) -> NSAttributedString! {
|
||||
let string = NSLocalizedString("Choose A Book", comment: "")
|
||||
let string = NSLocalizedString("Tap on A Book to See Detail", comment: "")
|
||||
let attributes = [NSFontAttributeName: UIFont.systemFontOfSize(18), NSForegroundColorAttributeName: UIColor.darkGrayColor()]
|
||||
return NSAttributedString(string: string, attributes: attributes)
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.912</string>
|
||||
<string>1.8.919</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.915</string>
|
||||
<string>1.8.922</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionMainStoryboard</key>
|
||||
|
Loading…
x
Reference in New Issue
Block a user