Fixing feed detail view for iPhone X.

This commit is contained in:
Samuel Clay 2017-10-18 21:18:19 -07:00
parent 5bd9971163
commit 294fc822fd
3 changed files with 68 additions and 25 deletions

View file

@ -86,7 +86,8 @@
self.storyTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
self.storyTitlesTable.separatorColor = UIColorFromRGB(0xE9E8E4);
self.view.backgroundColor = UIColorFromRGB(0xf4f4f4);
spacerBarButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
spacerBarButton.width = 0;
@ -1215,10 +1216,27 @@
height = height - kTableViewShortRowDifference;
}
fleuron.frame = CGRectMake(0, 0, self.view.frame.size.width, height);
fleuron.translatesAutoresizingMaskIntoConstraints = NO;
fleuron.contentMode = UIViewContentModeCenter;
fleuron.tag = 99;
[cell.contentView addSubview:fleuron];
[cell.contentView addConstraint:[NSLayoutConstraint constraintWithItem:fleuron
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0 constant:height]];
[cell.contentView addConstraint:[NSLayoutConstraint constraintWithItem:fleuron
attribute:NSLayoutAttributeCenterX
relatedBy:NSLayoutRelationEqual
toItem:cell.contentView
attribute:NSLayoutAttributeCenterX
multiplier:1.0 constant:0]];
[cell.contentView addConstraint:[NSLayoutConstraint constraintWithItem:fleuron
attribute:NSLayoutAttributeCenterY
relatedBy:NSLayoutRelationEqual
toItem:cell.contentView
attribute:NSLayoutAttributeCenterY
multiplier:1.0 constant:0]];
cell.backgroundColor = [UIColor clearColor];
return cell;
} else {//if ([appDelegate.storyLocationsCount]) {
@ -2159,6 +2177,7 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
self.searchBar.keyboardAppearance = UIKeyboardAppearanceDefault;
}
self.view.backgroundColor = UIColorFromRGB(0xf4f4f4);
self.storyTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
self.storyTitlesTable.separatorColor = UIColorFromRGB(0xE9E8E4);
[self.storyTitlesTable reloadData];

View file

@ -137,6 +137,7 @@ static UIFont *userLabelFont;
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:
UIColorFromFixedRGB(0x4C4D4A)}
forState:UIControlStateHighlighted];
self.view.backgroundColor = UIColorFromRGB(0xf4f4f4);
self.navigationController.navigationBar.tintColor = UIColorFromRGB(0x8F918B);
self.navigationController.navigationBar.translucent = NO;
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
@ -955,6 +956,7 @@ static UIFont *userLabelFont;
self.settingsBarButton.tintColor = UIColorFromRGB(0x8F918B);
self.refreshControl.tintColor = UIColorFromLightDarkRGB(0x0, 0xffffff);
self.refreshControl.backgroundColor = UIColorFromRGB(0xE3E6E0);
self.view.backgroundColor = UIColorFromRGB(0xf4f4f4);
NBBarButtonItem *barButton = self.addBarButton.customView;
[barButton setImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"nav_icn_add.png"]] forState:UIControlStateNormal];

View file

@ -1,8 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="FeedDetailViewController">
@ -18,43 +25,58 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" bouncesZoom="NO" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="4">
<tableView clipsSubviews="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" bouncesZoom="NO" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="4">
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="dataSource" destination="-1" id="30"/>
<outlet property="delegate" destination="-1" id="37"/>
</connections>
</tableView>
<view hidden="YES" opaque="NO" contentMode="scaleToFill" id="6Mr-6Q-kKI">
<rect key="frame" x="8" y="95" width="304" height="195"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<view hidden="YES" opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Mr-6Q-kKI">
<rect key="frame" x="8" y="86" width="304" height="192"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="No stories to display." textAlignment="center" lineBreakMode="wordWrap" numberOfLines="3" baselineAdjustment="alignBaselines" minimumFontSize="10" id="Ryt-Dy-u2n">
<rect key="frame" x="0.0" y="99" width="304" height="83"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<animations/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="No stories to display." textAlignment="center" lineBreakMode="wordWrap" numberOfLines="3" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Ryt-Dy-u2n">
<rect key="frame" x="54" y="96" width="196" height="83"/>
<constraints>
<constraint firstAttribute="height" constant="83" id="g8l-4O-b8W"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="0.75644388689999997" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.75644385814666748" green="0.75644385814666748" blue="0.75644385814666748" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" alpha="0.40000000596046448" contentMode="scaleToFill" image="big_world.png" id="Kdh-D5-esJ">
<rect key="frame" x="120" y="27" width="64" height="64"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<imageView userInteractionEnabled="NO" alpha="0.40000000596046448" contentMode="scaleToFill" image="big_world.png" translatesAutoresizingMaskIntoConstraints="NO" id="Kdh-D5-esJ">
<rect key="frame" x="120" y="24" width="64" height="64"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="1c2-mE-46C"/>
<constraint firstAttribute="width" constant="64" id="Odo-if-TOJ"/>
</constraints>
</imageView>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Ryt-Dy-u2n" firstAttribute="top" secondItem="Kdh-D5-esJ" secondAttribute="bottom" constant="8" id="7Qq-YR-iIb"/>
<constraint firstItem="Ryt-Dy-u2n" firstAttribute="centerX" secondItem="6Mr-6Q-kKI" secondAttribute="centerX" id="Vbq-qw-aIB"/>
<constraint firstItem="Kdh-D5-esJ" firstAttribute="top" secondItem="6Mr-6Q-kKI" secondAttribute="top" constant="24" id="h5M-MY-XQt"/>
<constraint firstAttribute="bottom" secondItem="Ryt-Dy-u2n" secondAttribute="bottom" constant="13" id="obe-cx-X64"/>
<constraint firstItem="Kdh-D5-esJ" firstAttribute="centerX" secondItem="6Mr-6Q-kKI" secondAttribute="centerX" id="yZM-8t-dSN"/>
</constraints>
</view>
</subviews>
<animations/>
<color key="backgroundColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<constraints>
<constraint firstItem="3cs-AJ-WzR" firstAttribute="trailing" secondItem="6Mr-6Q-kKI" secondAttribute="trailing" constant="8" id="4oQ-NR-Xjf"/>
<constraint firstItem="6Mr-6Q-kKI" firstAttribute="centerX" secondItem="1" secondAttribute="centerX" id="5KU-uV-AMF"/>
<constraint firstItem="4" firstAttribute="leading" secondItem="3cs-AJ-WzR" secondAttribute="leading" id="6SF-3m-dmB"/>
<constraint firstItem="4" firstAttribute="bottom" secondItem="1" secondAttribute="bottom" id="FtD-pN-AaO"/>
<constraint firstItem="4" firstAttribute="top" secondItem="1" secondAttribute="top" id="Gtv-2z-WY8"/>
<constraint firstItem="6Mr-6Q-kKI" firstAttribute="leading" secondItem="3cs-AJ-WzR" secondAttribute="leading" constant="8" id="MNk-r4-01O"/>
<constraint firstItem="4" firstAttribute="trailing" secondItem="3cs-AJ-WzR" secondAttribute="trailing" id="MvI-qm-bdt"/>
<constraint firstItem="6Mr-6Q-kKI" firstAttribute="centerY" secondItem="4" secondAttribute="centerYWithinMargins" constant="-67.5" id="umc-BG-1FN"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="3cs-AJ-WzR"/>
</view>
</objects>
<resources>