Mhurd has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/142988

Change subject: Fixes for page history and language selector crashes.
......................................................................

Fixes for page history and language selector crashes.

Recent changes to "showAlert" to make it work with modally
presented views was causing crashes with non UIViewController
storyboard elements. This happened because showAlert is
adding its view to whatever view controller invokes it
(at most once) and UITableViewControllers don't play nice
with autolayout if you try to add an autolayout constrained
view to their view. Super lame. Quick fix was to simply
use UIViewControllers in the storyboard (which then
contain the UITableViews as subviews).

Fixed bug with article language selection not using
MWPageTitle.

Updated page history date heading background colors to match
chrome color.

Change-Id: I9fad5d8ff75aeedd089bc8d9f0272ff4cfa9529d
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/Base.lproj/Main_iPhone.storyboard
R wikipedia/View Controllers/Languages/LanguagesViewController.h
R wikipedia/View Controllers/Languages/LanguagesViewController.m
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
M wikipedia/View Controllers/PageHistory/PageHistoryViewController.h
M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
8 files changed, 146 insertions(+), 99 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/88/142988/1

diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index fb3d9b2..e5a637d 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -25,7 +25,7 @@
                04142A8F184F974E006EF779 /* NSDate-Utilities.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04142A8E184F974E006EF779 /* NSDate-Utilities.m 
*/; };
                0415581C18ADFA5D00B81A59 /* UIImage+ColorMask.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m 
*/; };
                041A3B5E18E11ED90079FF1C /* LanguagesCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 041A3B5918E11ED90079FF1C /* LanguagesCell.m */; 
};
-               041A3B6218E11ED90079FF1C /* LanguagesTableVC.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m 
*/; };
+               041A3B6218E11ED90079FF1C /* LanguagesViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 041A3B5D18E11ED90079FF1C /* 
LanguagesViewController.m */; };
                041C55D21950B27D006CE0EF /* EditSummaryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 041C55D11950B27D006CE0EF /* 
EditSummaryViewController.m */; };
                04272E7B1940EEBC00CC682F /* AssetsFile.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04272E791940EEBC00CC682F /* AssetsFile.m */; };
                04292FF2185FBA70002A13FC /* SearchResultCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04292FF0185FBA70002A13FC /* SearchResultCell.m 
*/; };
@@ -215,8 +215,8 @@
                0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= "UIImage+ColorMask.m"; sourceTree = "<group>"; };
                041A3B5818E11ED90079FF1C /* LanguagesCell.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LanguagesCell.h; sourceTree = "<group>"; };
                041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= LanguagesCell.m; sourceTree = "<group>"; };
-               041A3B5C18E11ED90079FF1C /* LanguagesTableVC.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LanguagesTableVC.h; sourceTree = "<group>"; };
-               041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= LanguagesTableVC.m; sourceTree = "<group>"; };
+               041A3B5C18E11ED90079FF1C /* LanguagesViewController.h */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path 
= LanguagesViewController.h; sourceTree = "<group>"; };
+               041A3B5D18E11ED90079FF1C /* LanguagesViewController.m */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; 
path = LanguagesViewController.m; sourceTree = "<group>"; };
                041C55D01950B27D006CE0EF /* EditSummaryViewController.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = EditSummaryViewController.h; sourceTree = "<group>"; };
                041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = EditSummaryViewController.m; sourceTree = "<group>"; 
};
                04272E781940EEBC00CC682F /* AssetsFile.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
AssetsFile.h; sourceTree = "<group>"; };
@@ -737,8 +737,8 @@
                041A3B5718E11ED90079FF1C /* Languages */ = {
                        isa = PBXGroup;
                        children = (
-                               041A3B5C18E11ED90079FF1C /* LanguagesTableVC.h 
*/,
-                               041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m 
*/,
+                               041A3B5C18E11ED90079FF1C /* 
LanguagesViewController.h */,
+                               041A3B5D18E11ED90079FF1C /* 
LanguagesViewController.m */,
                                041A3B5818E11ED90079FF1C /* LanguagesCell.h */,
                                041A3B5918E11ED90079FF1C /* LanguagesCell.m */,
                        );
@@ -1877,7 +1877,7 @@
                                0400EB0318AAEEC60043ECE2 /* 
UINavigationController+SearchNavStack.m in Sources */,
                                04B78A5318A580AF0050EBF5 /* LoginOp.m in 
Sources */,
                                04530AF51935BF4D00022512 /* 
ModalMenuAndContentViewController.m in Sources */,
-                               041A3B6218E11ED90079FF1C /* LanguagesTableVC.m 
in Sources */,
+                               041A3B6218E11ED90079FF1C /* 
LanguagesViewController.m in Sources */,
                                0493C2CC1952373100EBB973 /* 
CoreDataHousekeeping.m in Sources */,
                                04D34DAD1863D2D600610A87 /* TFHppleElement.m in 
Sources */,
                                043F18E118D9691D00D8489A /* 
TopActionSheetLabel.m in Sources */,
diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard 
b/wikipedia/Base.lproj/Main_iPhone.storyboard
index 3d919f6..abd01c9 100644
--- a/wikipedia/Base.lproj/Main_iPhone.storyboard
+++ b/wikipedia/Base.lproj/Main_iPhone.storyboard
@@ -6,61 +6,81 @@
         <capability name="Alignment constraints with different attributes" 
minToolsVersion="5.1"/>
     </dependencies>
     <scenes>
-        <!--Languages TableVC-->
-        <scene sceneID="y29-zj-Zrl">
+        <!--Languages View Controller-->
+        <scene sceneID="GRT-6z-zsK">
             <objects>
-                <tableViewController restorationIdentifier="LanguagesTableVC" 
storyboardIdentifier="LanguagesTableVC" id="3GB-b2-gF9" 
customClass="LanguagesTableVC" sceneMemberID="viewController">
-                    <tableView key="view" opaque="NO" clipsSubviews="YES" 
clearsContextBeforeDrawing="NO" contentMode="scaleToFill" 
alwaysBounceVertical="YES" dataMode="prototypes" style="plain" 
separatorStyle="default" rowHeight="76" sectionHeaderHeight="22" 
sectionFooterHeight="22" id="dR5-oe-p62">
+                <viewController 
restorationIdentifier="LanguagesViewController" 
storyboardIdentifier="LanguagesViewController" id="vqp-1K-wjM" 
customClass="LanguagesViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="gGs-4d-iMW"/>
+                        <viewControllerLayoutGuide type="bottom" 
id="i1a-f9-VJ9"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="myx-u3-Hjg">
                         <rect key="frame" x="0.0" y="0.0" width="320" 
height="568"/>
-                        <autoresizingMask key="autoresizingMask" 
widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" 
colorSpace="calibratedWhite"/>
-                        <prototypes>
-                            <tableViewCell contentMode="scaleToFill" 
selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" 
indentationWidth="0.0" reuseIdentifier="LanguagesCell" rowHeight="60" 
id="NLy-Ez-0uz" customClass="LanguagesCell">
-                                <rect key="frame" x="0.0" y="22" width="320" 
height="60"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                                <tableViewCellContentView key="contentView" 
opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" 
tableViewCell="NLy-Ez-0uz" id="lgX-l4-ILe">
-                                    <rect key="frame" x="0.0" y="0.0" 
width="320" height="59"/>
-                                    <autoresizingMask key="autoresizingMask"/>
-                                    <subviews>
-                                        <label opaque="NO" clipsSubviews="YES" 
userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" 
text="Language" lineBreakMode="tailTruncation" 
baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" 
translatesAutoresizingMaskIntoConstraints="NO" id="djd-0J-VZY" 
userLabel="Language">
-                                            <rect key="frame" x="20" y="9" 
width="280" height="21"/>
-                                            <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                            <fontDescription 
key="fontDescription" type="system" pointSize="17"/>
-                                            <color key="textColor" 
cocoaTouchSystemColor="darkTextColor"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                        <label opaque="NO" clipsSubviews="YES" 
userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" 
verticalHuggingPriority="251" text="Canonical Language" 
lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" 
adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" 
id="Vkd-3W-cSt" userLabel="Canonical Language">
-                                            <rect key="frame" x="20" y="30" 
width="280" height="15"/>
-                                            <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                            <fontDescription 
key="fontDescription" type="system" pointSize="12"/>
-                                            <color key="textColor" 
white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="centerY" 
secondItem="djd-0J-VZY" secondAttribute="bottom" id="EGt-dx-oGg"/>
-                                        <constraint firstAttribute="trailing" 
secondItem="djd-0J-VZY" secondAttribute="trailing" constant="20" 
id="NB7-8t-fex"/>
-                                        <constraint firstAttribute="trailing" 
secondItem="Vkd-3W-cSt" secondAttribute="trailing" constant="20" 
id="RMq-56-VX9"/>
-                                        <constraint firstItem="djd-0J-VZY" 
firstAttribute="leading" secondItem="lgX-l4-ILe" secondAttribute="leading" 
constant="20" id="hHx-qv-5sv"/>
-                                        <constraint firstItem="Vkd-3W-cSt" 
firstAttribute="top" secondItem="lgX-l4-ILe" secondAttribute="centerY" 
id="i6n-aZ-iCP"/>
-                                        <constraint firstItem="Vkd-3W-cSt" 
firstAttribute="leading" secondItem="lgX-l4-ILe" secondAttribute="leading" 
constant="20" id="ubg-XW-22m"/>
-                                    </constraints>
-                                </tableViewCellContentView>
+                        <autoresizingMask key="autoresizingMask" 
flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" 
contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" 
style="plain" separatorStyle="none" rowHeight="76" sectionHeaderHeight="22" 
sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" 
id="iFX-H4-bkt">
+                                <rect key="frame" x="0.0" y="0.0" width="320" 
height="568"/>
+                                <autoresizingMask key="autoresizingMask" 
widthSizable="YES" heightSizable="YES"/>
+                                <color key="backgroundColor" white="1" 
alpha="1" colorSpace="calibratedWhite"/>
+                                <prototypes>
+                                    <tableViewCell contentMode="scaleToFill" 
selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" 
indentationWidth="0.0" reuseIdentifier="LanguagesCell" rowHeight="60" 
id="aOG-CK-VHw" customClass="LanguagesCell">
+                                        <rect key="frame" x="0.0" y="22" 
width="320" height="60"/>
+                                        <autoresizingMask 
key="autoresizingMask"/>
+                                        <tableViewCellContentView 
key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" 
contentMode="center" tableViewCell="aOG-CK-VHw" id="u7F-wb-Bsy">
+                                            <rect key="frame" x="0.0" y="0.0" 
width="320" height="60"/>
+                                            <autoresizingMask 
key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" 
clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" 
horizontalHuggingPriority="251" text="Language" lineBreakMode="wordWrap" 
numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" 
preferredMaxLayoutWidth="280" translatesAutoresizingMaskIntoConstraints="NO" 
id="jxY-ej-I9e" userLabel="Language">
+                                                    <rect key="frame" x="20" 
y="9" width="280" height="21"/>
+                                                    <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription 
key="fontDescription" type="system" pointSize="17"/>
+                                                    <color key="textColor" 
cocoaTouchSystemColor="darkTextColor"/>
+                                                    <nil 
key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" 
clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" 
horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Canonical 
Language" lineBreakMode="wordWrap" numberOfLines="0" 
baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" 
preferredMaxLayoutWidth="280" translatesAutoresizingMaskIntoConstraints="NO" 
id="SER-n4-DZC" userLabel="Canonical Language">
+                                                    <rect key="frame" x="20" 
y="30" width="280" height="15"/>
+                                                    <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription 
key="fontDescription" type="system" pointSize="12"/>
+                                                    <color key="textColor" 
white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                    <nil 
key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint 
firstItem="jxY-ej-I9e" firstAttribute="leading" secondItem="u7F-wb-Bsy" 
secondAttribute="leading" constant="20" id="5J4-8r-TMr"/>
+                                                <constraint 
firstItem="SER-n4-DZC" firstAttribute="top" secondItem="u7F-wb-Bsy" 
secondAttribute="centerY" id="HJm-lO-VX5"/>
+                                                <constraint 
firstAttribute="centerY" secondItem="jxY-ej-I9e" secondAttribute="bottom" 
id="ZiT-jt-mEk"/>
+                                                <constraint 
firstItem="SER-n4-DZC" firstAttribute="leading" secondItem="u7F-wb-Bsy" 
secondAttribute="leading" constant="20" id="lFC-OI-QEK"/>
+                                                <constraint 
firstAttribute="trailing" secondItem="jxY-ej-I9e" secondAttribute="trailing" 
constant="20" id="nPM-TU-iQb"/>
+                                                <constraint 
firstAttribute="trailing" secondItem="SER-n4-DZC" secondAttribute="trailing" 
constant="20" id="pT2-fa-Bzz"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="canonicalLabel" 
destination="SER-n4-DZC" id="hCb-Th-Sls"/>
+                                            <outlet property="textLabel" 
destination="jxY-ej-I9e" id="qRy-50-FNA"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
                                 <connections>
-                                    <outlet property="canonicalLabel" 
destination="Vkd-3W-cSt" id="dkK-yv-9Gd"/>
-                                    <outlet property="textLabel" 
destination="djd-0J-VZY" id="257-Ys-BSa"/>
+                                    <outlet property="dataSource" 
destination="vqp-1K-wjM" id="YdH-D0-vDJ"/>
+                                    <outlet property="delegate" 
destination="vqp-1K-wjM" id="lRQ-Yf-fLg"/>
                                 </connections>
-                            </tableViewCell>
-                        </prototypes>
-                        <connections>
-                            <outlet property="dataSource" 
destination="3GB-b2-gF9" id="hjE-Le-vMc"/>
-                            <outlet property="delegate" 
destination="3GB-b2-gF9" id="50L-a7-AmO"/>
-                        </connections>
-                    </tableView>
-                </tableViewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" 
id="erJ-jP-eM0" userLabel="First Responder" sceneMemberID="firstResponder"/>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" 
colorSpace="custom" customColorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstItem="iFX-H4-bkt" 
firstAttribute="top" secondItem="myx-u3-Hjg" secondAttribute="top" 
id="KuM-Yc-6ep"/>
+                            <constraint firstAttribute="trailing" 
secondItem="iFX-H4-bkt" secondAttribute="trailing" id="Obk-X3-7Sz"/>
+                            <constraint firstItem="i1a-f9-VJ9" 
firstAttribute="top" secondItem="iFX-H4-bkt" secondAttribute="bottom" 
id="XpI-qv-xig"/>
+                            <constraint firstItem="iFX-H4-bkt" 
firstAttribute="leading" secondItem="myx-u3-Hjg" secondAttribute="leading" 
id="lcB-co-f32"/>
+                        </constraints>
+                    </view>
+                    <connections>
+                        <outlet property="tableView" destination="iFX-H4-bkt" 
id="k4b-bt-h64"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" 
id="gyb-US-ppN" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="111" y="-3525"/>
+            <point key="canvasLocation" x="111" y="-3528"/>
         </scene>
         <!--Table of Contents-->
         <scene sceneID="reM-Qa-okT">
@@ -117,30 +137,50 @@
             <point key="canvasLocation" x="-407" y="698"/>
         </scene>
         <!--Page History View Controller-->
-        <scene sceneID="P9W-EJ-Sh4">
+        <scene sceneID="nqw-r1-g0T">
             <objects>
-                <tableViewController 
restorationIdentifier="PageHistoryViewController" 
storyboardIdentifier="PageHistoryViewController" id="8V4-Y7-UO5" 
customClass="PageHistoryViewController" sceneMemberID="viewController">
-                    <tableView key="view" opaque="NO" clipsSubviews="YES" 
clearsContextBeforeDrawing="NO" contentMode="scaleToFill" 
alwaysBounceVertical="YES" dataMode="prototypes" style="plain" 
separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" 
sectionFooterHeight="22" id="f8b-40-ZUd">
+                <viewController 
restorationIdentifier="PageHistoryViewController" 
storyboardIdentifier="PageHistoryViewController" id="Sst-9G-sfn" 
customClass="PageHistoryViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="CrM-z1-iCh"/>
+                        <viewControllerLayoutGuide type="bottom" 
id="E9r-0V-9NR"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="CX5-jI-6FW">
                         <rect key="frame" x="0.0" y="0.0" width="320" 
height="568"/>
-                        <autoresizingMask key="autoresizingMask" 
widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" 
colorSpace="calibratedWhite"/>
-                        <prototypes>
-                            <tableViewCell contentMode="scaleToFill" 
selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" 
indentationWidth="0.0" reuseIdentifier="PageHistoryCell" id="7aI-2Z-g7p">
-                                <rect key="frame" x="0.0" y="22" width="320" 
height="44"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                                <tableViewCellContentView key="contentView" 
opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" 
tableViewCell="7aI-2Z-g7p" id="XOz-8p-5mi">
-                                    <rect key="frame" x="0.0" y="0.0" 
width="320" height="43"/>
-                                    <autoresizingMask key="autoresizingMask"/>
-                                </tableViewCellContentView>
-                            </tableViewCell>
-                        </prototypes>
-                        <connections>
-                            <outlet property="dataSource" 
destination="8V4-Y7-UO5" id="C2k-mT-uGu"/>
-                            <outlet property="delegate" 
destination="8V4-Y7-UO5" id="8LD-eA-w8U"/>
-                        </connections>
-                    </tableView>
-                </tableViewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" 
id="mKQ-r2-KIR" userLabel="First Responder" sceneMemberID="firstResponder"/>
+                        <autoresizingMask key="autoresizingMask" 
flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <subviews>
+                            <tableView opaque="NO" clipsSubviews="YES" 
clearsContextBeforeDrawing="NO" contentMode="scaleToFill" 
alwaysBounceVertical="YES" dataMode="prototypes" style="plain" 
separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" 
sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" 
id="WRJ-V2-0NJ">
+                                <rect key="frame" x="0.0" y="0.0" width="320" 
height="568"/>
+                                <autoresizingMask key="autoresizingMask" 
widthSizable="YES" heightSizable="YES"/>
+                                <color key="backgroundColor" white="1" 
alpha="1" colorSpace="calibratedWhite"/>
+                                <prototypes>
+                                    <tableViewCell contentMode="scaleToFill" 
selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" 
indentationWidth="0.0" reuseIdentifier="PageHistoryCell" id="56M-wR-cLr">
+                                        <rect key="frame" x="0.0" y="22" 
width="320" height="44"/>
+                                        <autoresizingMask 
key="autoresizingMask"/>
+                                        <tableViewCellContentView 
key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" 
contentMode="center" tableViewCell="56M-wR-cLr" id="l9s-wb-bu0">
+                                            <rect key="frame" x="0.0" y="0.0" 
width="320" height="43"/>
+                                            <autoresizingMask 
key="autoresizingMask"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" 
destination="Sst-9G-sfn" id="sSA-ds-Syi"/>
+                                    <outlet property="delegate" 
destination="Sst-9G-sfn" id="ive-iz-BWf"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" 
colorSpace="custom" customColorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstItem="WRJ-V2-0NJ" 
firstAttribute="top" secondItem="CX5-jI-6FW" secondAttribute="top" 
id="AKp-DS-Rex"/>
+                            <constraint firstAttribute="trailing" 
secondItem="WRJ-V2-0NJ" secondAttribute="trailing" id="JWM-i1-CGb"/>
+                            <constraint firstItem="E9r-0V-9NR" 
firstAttribute="top" secondItem="WRJ-V2-0NJ" secondAttribute="bottom" 
id="Zty-qj-HQn"/>
+                            <constraint firstItem="WRJ-V2-0NJ" 
firstAttribute="leading" secondItem="CX5-jI-6FW" secondAttribute="leading" 
id="wgh-XR-lq3"/>
+                        </constraints>
+                    </view>
+                    <connections>
+                        <outlet property="tableView" destination="WRJ-V2-0NJ" 
id="GLo-Lc-K92"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" 
id="fAe-Dp-1gv" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             <point key="canvasLocation" x="111" y="-4881"/>
         </scene>
@@ -1680,12 +1720,12 @@
                         <segue destination="MJ8-O3-bkn" kind="custom" 
identifier="modal_segue_show_saved_pages" customClass="EmptySegue" 
id="jCG-jF-amh"/>
                         <segue destination="kv0-ra-y1C" kind="custom" 
identifier="modal_segue_show_primary_menu" customClass="EmptySegue" 
id="8fj-tN-bkR"/>
                         <segue destination="LWA-GV-VZP" kind="custom" 
identifier="modal_segue_show_secondary_menu" customClass="EmptySegue" 
id="gAv-y8-Bq7"/>
-                        <segue destination="3GB-b2-gF9" kind="custom" 
identifier="modal_segue_show_languages" customClass="EmptySegue" 
id="buE-sD-nl6"/>
-                        <segue destination="8V4-Y7-UO5" kind="custom" 
identifier="modal_segue_show_page_history" customClass="EmptySegue" 
id="10f-jM-smU"/>
                         <segue destination="myl-z3-aa0" kind="custom" 
identifier="modal_segue_show_credits" customClass="EmptySegue" id="C0v-U4-AQG"/>
                         <segue destination="rJv-oV-2mv" kind="custom" 
identifier="modal_segue_show_edit_summary" customClass="EmptySegue" 
id="bLt-sJ-X6S"/>
                         <segue destination="mbm-n6-GWW" kind="custom" 
identifier="modal_segue_show_login" customClass="EmptySegue" id="CtI-5v-HDU"/>
                         <segue destination="LsX-JK-bT6" kind="custom" 
identifier="modal_segue_show_create_account" customClass="EmptySegue" 
id="FYS-KO-VcP"/>
+                        <segue destination="Sst-9G-sfn" kind="custom" 
identifier="modal_segue_show_page_history" customClass="EmptySegue" 
id="XIR-ro-Nuv"/>
+                        <segue destination="vqp-1K-wjM" kind="custom" 
identifier="modal_segue_show_languages" customClass="EmptySegue" 
id="4tK-6e-A2j"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" 
id="41a-r2-anV" userLabel="First Responder" sceneMemberID="firstResponder"/>
diff --git a/wikipedia/View Controllers/Languages/LanguagesTableVC.h 
b/wikipedia/View Controllers/Languages/LanguagesViewController.h
similarity index 71%
rename from wikipedia/View Controllers/Languages/LanguagesTableVC.h
rename to wikipedia/View Controllers/Languages/LanguagesViewController.h
index d71fa5a..cf71438 100644
--- a/wikipedia/View Controllers/Languages/LanguagesTableVC.h
+++ b/wikipedia/View Controllers/Languages/LanguagesViewController.h
@@ -4,7 +4,7 @@
 #import <UIKit/UIKit.h>
 #import "TopMenuViewController.h"
 
-@interface LanguagesTableVC : UITableViewController
+@interface LanguagesViewController : UIViewController <UITableViewDataSource, 
UITableViewDelegate>
 
 @property (nonatomic) BOOL downloadLanguagesForCurrentArticle;
 
@@ -14,4 +14,6 @@
 
 @property (weak, nonatomic) id truePresentingVC;
 
+@property (strong, nonatomic) IBOutlet UITableView *tableView;
+
 @end
diff --git a/wikipedia/View Controllers/Languages/LanguagesTableVC.m 
b/wikipedia/View Controllers/Languages/LanguagesViewController.m
similarity index 97%
rename from wikipedia/View Controllers/Languages/LanguagesTableVC.m
rename to wikipedia/View Controllers/Languages/LanguagesViewController.m
index 822b321..35fd6df 100644
--- a/wikipedia/View Controllers/Languages/LanguagesTableVC.m
+++ b/wikipedia/View Controllers/Languages/LanguagesViewController.m
@@ -1,7 +1,7 @@
 //  Created by Monte Hurd on 1/23/14.
 //  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
 
-#import "LanguagesTableVC.h"
+#import "LanguagesViewController.h"
 #import "WikipediaAppUtils.h"
 #import "SessionSingleton.h"
 #import "DownloadLangLinksOp.h"
@@ -18,7 +18,7 @@
 
 #pragma mark - Private properties
 
-@interface LanguagesTableVC ()
+@interface LanguagesViewController ()
 
 @property (strong, nonatomic) NSArray *languagesData;
 @property (strong, nonatomic) NSMutableArray *filteredLanguagesData;
@@ -28,7 +28,7 @@
 
 @end
 
-@implementation LanguagesTableVC
+@implementation LanguagesViewController
 
 - (instancetype)initWithCoder:(NSCoder *)coder
 {
@@ -187,7 +187,7 @@
                                       
                                       [[NSOperationQueue mainQueue] 
addOperationWithBlock: ^ {
                                           //[self showAlert:@"Language links 
loaded."];
-                                          //[self fadeAlert];
+                                          [self fadeAlert];
 
                                           self.languagesData = result;
                                           [self reloadTableDataFiltered];
diff --git a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
index ab13c81..bca3474 100644
--- a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
+++ b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
@@ -6,7 +6,7 @@
 #import "QueuesSingleton.h"
 #import "SessionSingleton.h"
 #import "WikipediaAppUtils.h"
-#import "LanguagesTableVC.h"
+#import "LanguagesViewController.h"
 #import "UIViewController+HideKeyboard.h"
 #import "UIView+TemporaryAnimatedXF.h"
 #import "UIViewController+Alert.h"
@@ -514,16 +514,16 @@
 {
     [self performModalSequeWithID: @"modal_segue_show_languages"
                   transitionStyle: UIModalTransitionStyleCoverVertical
-                            block: ^(LanguagesTableVC *languagesTableVC){
-                                languagesTableVC.invokingVC = self;
+                            block: ^(LanguagesViewController *languagesVC){
+                                languagesVC.invokingVC = self;
                             }];
 }
 
 - (void)languageItemSelectedNotification:(NSNotification *)notification
 {
     // Ensure action is only taken if the secondary menu view controller 
presented the lang picker.
-    LanguagesTableVC *languagesTableVC = notification.object;
-    if (languagesTableVC.invokingVC != self) return;
+    LanguagesViewController *languagesVC = notification.object;
+    if (languagesVC.invokingVC != self) return;
 
     NSDictionary *selectedLangInfo = [notification userInfo];
     
diff --git a/wikipedia/View Controllers/PageHistory/PageHistoryViewController.h 
b/wikipedia/View Controllers/PageHistory/PageHistoryViewController.h
index 9a3bc60..8534bbf 100644
--- a/wikipedia/View Controllers/PageHistory/PageHistoryViewController.h
+++ b/wikipedia/View Controllers/PageHistory/PageHistoryViewController.h
@@ -5,11 +5,13 @@
 #import "MWNetworkOp.h"
 #import "TopMenuViewController.h"
 
-@interface PageHistoryViewController : UITableViewController 
<NetworkOpDelegate>
+@interface PageHistoryViewController : UIViewController <NetworkOpDelegate, 
UITableViewDataSource, UITableViewDelegate>
 
 @property (nonatomic) NavBarMode navBarMode;
 
 @property (weak, nonatomic) id truePresentingVC;
 @property (weak, nonatomic) TopMenuViewController *topMenuViewController;
 
+@property (strong, nonatomic) IBOutlet UITableView *tableView;
+
 @end
diff --git a/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m 
b/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
index 50ed594..6a7c70b 100644
--- a/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
+++ b/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
@@ -14,6 +14,7 @@
 #import "WikiGlyph_Chars.h"
 #import "RootViewController.h"
 #import "UIViewController+ModalPop.h"
+#import "Defines.h"
 
 @interface PageHistoryViewController (){
 
@@ -219,7 +220,7 @@
 -(UIView *)tableView:(UITableView *)tableView 
viewForHeaderInSection:(NSInteger)section
 {
     UIView *view = [[UIView alloc] initWithFrame:CGRectZero];
-    view.backgroundColor = [UIColor colorWithRed:0.93 green:0.93 blue:0.93 
alpha:1.0];
+    view.backgroundColor = CHROME_COLOR;
     view.autoresizesSubviews = YES;
     UILabel *label = [[UILabel alloc] initWithFrame:
                       CGRectMake(10, view.bounds.origin.y, 
view.bounds.size.width, view.bounds.size.height)
diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index 3078888..27ecee1 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -37,7 +37,7 @@
 #import "RootViewController.h"
 #import "TopMenuViewController.h"
 #import "BottomMenuViewController.h"
-#import "LanguagesTableVC.h"
+#import "LanguagesViewController.h"
 #import "ModalMenuAndContentViewController.h"
 #import "UIViewController+ModalPresent.h"
 #import "Section+DisplayHtml.h"
@@ -1953,21 +1953,23 @@
 {
     [self performModalSequeWithID: @"modal_segue_show_languages"
                   transitionStyle: UIModalTransitionStyleCoverVertical
-                            block: ^(LanguagesTableVC *languagesTableVC){
-                                
languagesTableVC.downloadLanguagesForCurrentArticle = YES;
-                                languagesTableVC.invokingVC = self;
+                            block: ^(LanguagesViewController *languagesVC){
+                                languagesVC.downloadLanguagesForCurrentArticle 
= YES;
+                                languagesVC.invokingVC = self;
                             }];
 }
 
 - (void)languageItemSelectedNotification:(NSNotification *)notification
 {
     // Ensure action is only taken if the web view controller presented the 
lang picker.
-    LanguagesTableVC *languagesTableVC = notification.object;
-    if (languagesTableVC.invokingVC != self) return;
+    LanguagesViewController *languagesVC = notification.object;
+    if (languagesVC.invokingVC != self) return;
 
     NSDictionary *selectedLangInfo = [notification userInfo];
 
-    [NAV loadArticleWithTitle: selectedLangInfo[@"*"]
+    MWPageTitle *pageTitle = [MWPageTitle 
titleWithString:selectedLangInfo[@"*"]];
+
+    [NAV loadArticleWithTitle: pageTitle
                        domain: selectedLangInfo[@"code"]
                      animated: NO
               discoveryMethod: DISCOVERY_METHOD_SEARCH

-- 
To view, visit https://gerrit.wikimedia.org/r/142988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fad5d8ff75aeedd089bc8d9f0272ff4cfa9529d
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <mh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to