Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with prefersLargeTitles set to true #21

Open
csr opened this issue Dec 13, 2018 · 1 comment
Open

Issue with prefersLargeTitles set to true #21

csr opened this issue Dec 13, 2018 · 1 comment

Comments

@csr
Copy link

csr commented Dec 13, 2018

Hey there, there seems to be an issue when the navigation bar prefersLargeTitles property is set to true. Do you perhaps know why this is happening? I've attached an image. Edit: this is always happening regardless of prefersLargeTitles.

Edit: I installed the framework through Carthage: github "teambition/TBEmptyDataSet".
Edit: it happens on iPhone X and older devices as well.

test3

@csr
Copy link
Author

csr commented Dec 13, 2018

Code:

class TestController: UITableViewController, TBEmptyDataSetDelegate, TBEmptyDataSetDataSource {

override func viewDidLoad() {
    super.viewDidLoad()
    tableView.emptyDataSetDataSource = self
    tableView.emptyDataSetDelegate = self
    tableView.backgroundColor = .black
    tableView.tableFooterView = UIView()
}

func titleForEmptyDataSet(in scrollView: UIScrollView) -> NSAttributedString? {
    let attributedString = NSAttributedString(string: "EMPTY_STATE_TITLE".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.white])
    return attributedString
}

func descriptionForEmptyDataSet(in scrollView: UIScrollView) -> NSAttributedString? {
    let attributedString = NSAttributedString(string: "EMPTY_STATE_DESCRIPTION".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.white])
    return attributedString
}

func imageForEmptyDataSet(in scrollView: UIScrollView) -> UIImage? {
    return #imageLiteral(resourceName: "empty-state-image")
}    
}

I'm currently using an offset of -100 for now with the hope this gets fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant