Skip to content

Commit

Permalink
Fix redraw deadlock on AutoResizingTableHeaderView and AutoResizingTa…
Browse files Browse the repository at this point in the history
…bleFooterView with double assigment of height
  • Loading branch information
moglistree committed Aug 19, 2019
1 parent b208df2 commit b6ed7cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.10.4
- Bugfix: Fix issue with ui refresh deadlock

## 1.10.3
- Bugfix: Fix table section header/footer height calculation on iOS 10

Expand Down
2 changes: 2 additions & 0 deletions Form.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@
INFOPLIST_FILE = Form/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.10.4;
PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Form;
PRODUCT_NAME = Form;
SKIP_INSTALL = YES;
Expand All @@ -863,6 +864,7 @@
INFOPLIST_FILE = Form/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.10.4;
PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Form;
PRODUCT_NAME = Form;
SKIP_INSTALL = YES;
Expand Down
2 changes: 1 addition & 1 deletion Form/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.10.3</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
10 changes: 6 additions & 4 deletions Form/UITableView+Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ private class AutoResizingTableHeaderView: AutoResizingTableSubviewBase {
override func layoutSubviews() {
super.layoutSubviews()

frame.size.height = embeddedView.bounds.height
if frame.size.height == 0 { // 0 has special meaning, not what we want
if embeddedView.bounds.height == 0 { // 0 has special meaning, not what we want
frame.size.height = .headerFooterAlmostZero
} else {
frame.size.height = embeddedView.bounds.height
}

tableView?.tableHeaderView = self
Expand All @@ -93,9 +94,10 @@ private class AutoResizingTableFooterView: AutoResizingTableSubviewBase {
override func layoutSubviews() {
super.layoutSubviews()

frame.size.height = embeddedView.bounds.height
if frame.size.height == 0 { // 0 has special meaning, not what we want
if embeddedView.bounds.height == 0 { // 0 has special meaning, not what we want
frame.size.height = .headerFooterAlmostZero
} else {
frame.size.height = embeddedView.bounds.height
}

tableView?.tableFooterView = self
Expand Down

0 comments on commit b6ed7cc

Please sign in to comment.