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

Commit

Permalink
More consistent HUBComponentWrapper usage and fixing target device fa…
Browse files Browse the repository at this point in the history
…mily issue
  • Loading branch information
marmelroy committed Dec 27, 2016
1 parent 69ae7b4 commit 078a6d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions HubFramework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2851,13 +2851,13 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.spotify.HubFramework-tvOS";
PRODUCT_NAME = HubFramework;
SDKROOT = appletvos10.1;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0.1;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -2909,12 +2909,12 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.spotify.HubFramework-tvOS";
PRODUCT_NAME = HubFramework;
SDKROOT = appletvos10.1;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0.1;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down
6 changes: 3 additions & 3 deletions sources/HUBViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ - (BOOL)collectionViewShouldBeginScrolling:(HUBCollectionView *)collectionView
- (BOOL)collectionView:(UICollectionView *)collectionView canFocusItemAtIndexPath:(NSIndexPath *)indexPath
{
HUBComponentCollectionViewCell *cell = (HUBComponentCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
HUBComponentWrapper * wrapper = [self componentWrapperFromCell:cell];
HUBComponentWrapper * const wrapper = [self componentWrapperFromCell:cell];
return wrapper.visibleChildren.count == 0;
}
#endif
Expand Down Expand Up @@ -1566,10 +1566,10 @@ - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated

- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
HUBComponentCollectionViewCell *previousItem = (HUBComponentCollectionViewCell *)context.previouslyFocusedView;
HUBComponentWrapper *previousWrapper = [self componentWrapperFromCell:previousItem];
HUBComponentWrapper * const previousWrapper = [self componentWrapperFromCell:previousItem];
[previousWrapper updateViewForFocusState:HUBComponentFocusStateNone];
HUBComponentCollectionViewCell *nextItem = (HUBComponentCollectionViewCell *)context.nextFocusedView;
HUBComponentWrapper *nextWrapper = [self componentWrapperFromCell:nextItem];
HUBComponentWrapper * const nextWrapper = [self componentWrapperFromCell:nextItem];
[nextWrapper updateViewForFocusState:HUBComponentFocusStateInFocus];
}

Expand Down

0 comments on commit 078a6d6

Please sign in to comment.