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

Commit 078a6d6

Browse files
committed
More consistent HUBComponentWrapper usage and fixing target device family issue
1 parent 69ae7b4 commit 078a6d6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

HubFramework.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,13 +2851,13 @@
28512851
ONLY_ACTIVE_ARCH = YES;
28522852
PRODUCT_BUNDLE_IDENTIFIER = "com.spotify.HubFramework-tvOS";
28532853
PRODUCT_NAME = HubFramework;
2854-
SDKROOT = appletvos10.1;
2854+
SDKROOT = appletvos;
28552855
SKIP_INSTALL = YES;
28562856
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
28572857
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
28582858
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
28592859
SWIFT_VERSION = 3.0.1;
2860-
TARGETED_DEVICE_FAMILY = "1,2";
2860+
TARGETED_DEVICE_FAMILY = 3;
28612861
TVOS_DEPLOYMENT_TARGET = 9.0;
28622862
VERSIONING_SYSTEM = "apple-generic";
28632863
VERSION_INFO_PREFIX = "";
@@ -2909,12 +2909,12 @@
29092909
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
29102910
PRODUCT_BUNDLE_IDENTIFIER = "com.spotify.HubFramework-tvOS";
29112911
PRODUCT_NAME = HubFramework;
2912-
SDKROOT = appletvos10.1;
2912+
SDKROOT = appletvos;
29132913
SKIP_INSTALL = YES;
29142914
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
29152915
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
29162916
SWIFT_VERSION = 3.0.1;
2917-
TARGETED_DEVICE_FAMILY = "1,2";
2917+
TARGETED_DEVICE_FAMILY = 3;
29182918
TVOS_DEPLOYMENT_TARGET = 9.0;
29192919
VERSIONING_SYSTEM = "apple-generic";
29202920
VERSION_INFO_PREFIX = "";

sources/HUBViewController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ - (BOOL)collectionViewShouldBeginScrolling:(HUBCollectionView *)collectionView
786786
- (BOOL)collectionView:(UICollectionView *)collectionView canFocusItemAtIndexPath:(NSIndexPath *)indexPath
787787
{
788788
HUBComponentCollectionViewCell *cell = (HUBComponentCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
789-
HUBComponentWrapper * wrapper = [self componentWrapperFromCell:cell];
789+
HUBComponentWrapper * const wrapper = [self componentWrapperFromCell:cell];
790790
return wrapper.visibleChildren.count == 0;
791791
}
792792
#endif
@@ -1566,10 +1566,10 @@ - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
15661566

15671567
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
15681568
HUBComponentCollectionViewCell *previousItem = (HUBComponentCollectionViewCell *)context.previouslyFocusedView;
1569-
HUBComponentWrapper *previousWrapper = [self componentWrapperFromCell:previousItem];
1569+
HUBComponentWrapper * const previousWrapper = [self componentWrapperFromCell:previousItem];
15701570
[previousWrapper updateViewForFocusState:HUBComponentFocusStateNone];
15711571
HUBComponentCollectionViewCell *nextItem = (HUBComponentCollectionViewCell *)context.nextFocusedView;
1572-
HUBComponentWrapper *nextWrapper = [self componentWrapperFromCell:nextItem];
1572+
HUBComponentWrapper * const nextWrapper = [self componentWrapperFromCell:nextItem];
15731573
[nextWrapper updateViewForFocusState:HUBComponentFocusStateInFocus];
15741574
}
15751575

0 commit comments

Comments
 (0)