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

iOS improvements #94

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Adlai-Holler
Copy link
Contributor

@joshaber This one's a biggie, sorry. I wanted to get the demo working in decent shape before PR. What we've got is

  • Add Switch element for UISwitch
  • Make Button lay itself out correctly
  • Make Button respect more control states
  • Use isEqualToAttributedString: when possible
  • Add contentInset and scrollIndicatorInsets to TableView
  • Spruce up the demo with a fancy navigation controller

The changes seemed to have exposed layout bugs in other chunks of the framework, so we'll tackle those later. The layout of elements in the table header is wonky when you switch between demo screens and on first appearance. Curious if you have ideas about the causes there.

Handle all control states, not just some
Add Switch element
Ensnazz demo
Use isEqualToAttributedString: when needed
Add contentInset & scrollIndicatorInsets properties to table view
@joshaber joshaber self-assigned this Jul 18, 2015
@joshaber
Copy link
Owner

Hmm, so if I apply the following patch:

diff --git a/Few-iOS/TableView.swift b/Few-iOS/TableView.swift
index de5c1bf..eaf8269 100644
--- a/Few-iOS/TableView.swift
+++ b/Few-iOS/TableView.swift
@@ -322,14 +322,10 @@ public class TableView: Element {
        tableView.scrollIndicatorInsets = scrollIndicatorInsets
        if let header = header {
            handler.headerView.updateWithElement(header)
-           let layout = header.assembleLayoutNode().layout(maxWidth: tableView.frame.width)
-           layout.apply(handler.headerView)
            tableView.tableHeaderView = handler.headerView
        }
        if let footer = footer {
            handler.footerView.updateWithElement(footer)
-           let layout = footer.assembleLayoutNode().layout(maxWidth: tableView.frame.width)
-           layout.apply(handler.footerView)
            tableView.tableFooterView = handler.footerView
        }
        return tableView

It gets rid of the table header jank. But the section header still shifts. I'm not sure what's going on there.

@ghost
Copy link

ghost commented Aug 4, 2016

The new report. Don't understand. Is the front end development. I am learning.

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

Successfully merging this pull request may close these issues.

None yet

2 participants