Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Enables UISegmentedControl touch #283

Merged
merged 1 commit into from
Feb 28, 2017
Merged

Conversation

mumme
Copy link
Contributor

@mumme mumme commented Feb 14, 2017

Copy link
Contributor

@rastersize rastersize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small code style issue that should be fixed.

But I’m also wondering if we shouldn’t just change the UIButton check to a more generic UIControl check. Since any, even custom, controls would then work automatically. Which might be desired. Would like your (@mumme) and CA’s input @mhallendal @cerihughes on it though.

@@ -432,6 +432,11 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceive
UIView *currentView = touch.view;

while (currentView != nil && currentView != self.view) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨 Remove the empty line

@@ -432,6 +432,11 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceive
UIView *currentView = touch.view;

while (currentView != nil && currentView != self.view) {

if ([currentView isKindOfClass:[UISegmentedControl class]]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should not add this check and instead change the UIButton check to UIControl?

@mhallendal @cerihughes What do you and CA think?

@spotify-ci-bot
Copy link

3 Messages
📖 Executed 343 tests, with 0 failures (0 unexpected) in 8.124 (9.484) seconds
📖 Executed 340 tests, with 0 failures (0 unexpected) in 6.831 (8.173) seconds
📖 Executed 9 tests, with 0 failures (0 unexpected) in 150.590 (150.637) seconds

Generated by 🚫 danger

@codecov-io
Copy link

Codecov Report

Merging #283 into master will decrease coverage by -0.08%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
- Coverage   93.48%   93.41%   -0.08%     
==========================================
  Files          72       72              
  Lines        5051     5055       +4     
==========================================
  Hits         4722     4722              
- Misses        329      333       +4
Impacted Files Coverage Δ
sources/HUBComponentWrapper.m 74.39% <ø> (-0.91%)
sources/HUBUtilities.h 72.91% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ddf2d2...449536f. Read the comment docs.

@marmelroy
Copy link
Contributor

I was intrigued by the fact that we were traversing the view hierarchy looking for specific subclasses and created an alternative PR - #285

@rastersize
Copy link
Contributor

I’d be in favour of merging this (after changing to look for UIControl) and the concept of #285 into a single change. That is:

  1. Look for a gesture controller ala. Alternative to https://github.com/spotify/HubFramework/pull/283 #285 if not found proceed to,
  2. Go through the view hierarchy and look for a UIControl.

@rastersize
Copy link
Contributor

@mhallendal @marmelroy @mumme What do you think of this ☝️

@rastersize rastersize merged commit 3f2b7db into master Feb 28, 2017
@rastersize rastersize deleted the add-segmented-control-touch branch February 28, 2017 16:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants