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

% Added protection against superview being nil and crashing #46

Merged
merged 2 commits into from Jun 17, 2017
Merged

% Added protection against superview being nil and crashing #46

merged 2 commits into from Jun 17, 2017

Conversation

sgruby
Copy link
Contributor

@sgruby sgruby commented Jun 2, 2017

I've seen a few crashes that look like:

Thread 0 Crashed: 0 SwipeCellKit 0x0000000100b32264 function signature specialization <Arg[1] = Dead> of SwipeCellKit.SwipeTableViewCell.point (inside : __C.CGPoint, with : __ObjC.UIEvent?) -> Swift.Bool (SwipeTableViewCell.swift:337) 1 SwipeCellKit 0x0000000100b2efe4 @objc SwipeCellKit.SwipeTableViewCell.point (inside : __C.CGPoint, with : __ObjC.UIEvent?) -> Swift.Bool (SwipeTableViewCell.swift:0) 2 UIKit 0x00000001955d3394 -[UIView(Geometry) hitTest:withEvent:] + 272 3 UIKit 0x0000000195770778 -[UITableViewCell hitTest:withEvent:] + 108

Which points to "superview" being "dead". I have no idea how superview would be non-existent, but it is a good idea to avoid forced unwrapping, in my opinion.

This change guards against superview being nil.

@kurabi
Copy link
Member

kurabi commented Jun 17, 2017

Thanks. This look good.

@kurabi kurabi merged commit 39c6df5 into SwipeCellKit:develop Jun 17, 2017
kjpolaszek added a commit to HTD-Health/SwipeCellKit that referenced this pull request Sep 10, 2017
* develop:
  Updated documentation link.
  Added Swift 4 Tag.
  Update twitter handle.
  Bumped Version.
  Update CHANGELOG.md
  Updated README.md to include notes about Swift 4.
  Fixes SwipeCellKit#48. This method was used to disable 3D touch previewing but this is now problematic to do in iOS 11 as this method inadvertently enables that iOS has disabled. Developers much now handling the disabling/enabling of 3D touch when cell is swiped with the aid of `SwipeTableViewCellDelegate`.
  Fix issue SwipeCellKit#51 where UIFeedbackGenerator crashes on non-haptic iOS devices only for 10.0.0
  Fix issue SwipeCellKit#50 in relation to pixel misalignment on image & title of a swipe action.
  Bumped version.
  Update Docs
  Update CHANGELOG.md
  % Added protection against superview being nil and crashing (SwipeCellKit#46)
  Added highlighted background color for action button (SwipeCellKit#52)
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