Fix several UI issues

This commit is contained in:
Cameron Gutman 2018-08-26 16:43:45 -07:00
parent 2e479837ed
commit 44f64e1a35
3 changed files with 13 additions and 4 deletions

View File

@ -112,6 +112,9 @@ static UIImage* noImage;
[_appLabel setTextAlignment:NSTextAlignmentCenter];
[_appLabel setLineBreakMode:NSLineBreakByWordWrapping];
[_appLabel setNumberOfLines:0];
#if TARGET_OS_TV
[_appLabel setFont:[UIFont systemFontOfSize:16]];
#endif
[_appLabel setText:_app.name];
[_appButton addSubview:_appLabel];
}

View File

@ -18,7 +18,12 @@
CGSize _labelSize;
}
static const float REFRESH_CYCLE = 2.0f;
#if TARGET_OS_TV
static const int LABEL_DY = 40;
#else
static const int LABEL_DY = 20;
#endif
- (id) init {
self = [super init];

View File

@ -33,18 +33,19 @@
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" prefetchingEnabled="YES" id="8P0-wP-bDe">
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.33333334329999997" green="0.33333334329999997" blue="0.33333334329999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="50" minimumInteritemSpacing="50" id="m6l-TM-5FZ">
<size key="itemSize" width="350" height="450"/>
<size key="itemSize" width="300" height="400"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="80" minY="80" maxX="80" maxY="80"/>
<inset key="sectionInset" minX="80" minY="0.0" maxX="80" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="AppCell" id="gXq-M2-pFh">
<rect key="frame" x="80" y="80" width="350" height="450"/>
<rect key="frame" x="80" y="0.0" width="300" height="400"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
<rect key="frame" x="0.0" y="0.0" width="350" height="450"/>
<rect key="frame" x="0.0" y="0.0" width="300" height="400"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</collectionViewCell>