Skip to content

Commit

Permalink
* Do away with putting the topic in the navigation prompt and instead…
Browse files Browse the repository at this point in the history
… use section headers.

* Don’t raise an alert for network errors. Instead, this should activate a passive network status indicator. (Refs #22)
* Factor out the various GitHub-related blocks to reduce redundant code.
* Add table view refresh support.
  • Loading branch information
ElDragonRojo committed Aug 6, 2013
1 parent b07da51 commit dce5553
Show file tree
Hide file tree
Showing 10 changed files with 234 additions and 170 deletions.
62 changes: 42 additions & 20 deletions Lemacs/Base.lproj/Main_iPad.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
<scene sceneID="5k8-bd-ZjP">
<objects>
<tableViewController storyboardIdentifier="LETalkViewController" title="Master" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="VZm-kV-EsQ" userLabel="LETalkViewController" customClass="LETalkViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="iOD-Fj-6Ca">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="iOD-Fj-6Ca">
<rect key="frame" x="0.0" y="0.0" width="320" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.6945217252" green="0.89304971690000001" blue="0.99937492610000001" alpha="1" colorSpace="calibratedRGB"/>
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="2ql-lI-R3S" style="IBUITableViewCellStyleDefault" id="NZZ-Nn-the">
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="2ql-lI-R3S" style="IBUITableViewCellStyleDefault" id="NZZ-Nn-the">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="NZZ-Nn-the" id="xaT-YC-TNz">
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2ql-lI-R3S">
<rect key="frame" x="15" y="0.0" width="270" height="43"/>
<rect key="frame" x="15" y="0.0" width="290" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
Expand Down Expand Up @@ -79,6 +79,12 @@
</connections>
</barButtonItem>
</navigationItem>
<refreshControl key="refreshControl" opaque="NO" multipleTouchEnabled="YES" contentMode="center" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="1Dg-yc-033">
<autoresizingMask key="autoresizingMask"/>
<connections>
<action selector="reloadList" destination="VZm-kV-EsQ" eventType="valueChanged" id="nXO-3C-MEb"/>
</connections>
</refreshControl>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="eDd-oR-HlL" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand All @@ -96,16 +102,34 @@
<rect key="frame" x="0.0" y="64" width="703" height="704"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZU7-hf-3EH" userLabel="Spacer">
<rect key="frame" x="0.0" y="0.0" width="8" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" showsHorizontalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jnt-cq-8dQ">
<rect key="frame" x="0.0" y="0.0" width="703" height="704"/>
<rect key="frame" x="0.0" y="30" width="703" height="674"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<connections>
<outlet property="delegate" destination="JEX-9P-axG" id="7ho-8u-Dbf"/>
</connections>
</textView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Topic (required)" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Xpx-ln-tJW">
<rect key="frame" x="8" y="0.0" width="320" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences" autocorrectionType="yes"/>
<connections>
<outlet property="delegate" destination="JEX-9P-axG" id="ceq-es-lEL"/>
</connections>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.6945217252" green="0.89304971690000001" blue="0.99937492610000001" alpha="1" colorSpace="calibratedRGB"/>
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
Expand All @@ -132,6 +156,7 @@
<connections>
<outlet property="segmentedControl" destination="Row-ID-Vk0" id="bxg-g3-Fw7"/>
<outlet property="textView" destination="Jnt-cq-8dQ" id="rms-fJ-Aco"/>
<outlet property="topicField" destination="Xpx-ln-tJW" id="I6O-Hw-lQf"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="FJe-Yq-33r" sceneMemberID="firstResponder"/>
Expand All @@ -158,27 +183,18 @@
<scene sceneID="smW-Zh-WAh">
<objects>
<tableViewController storyboardIdentifier="LETalkListController" title="Master" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" userLabel="LETalkListController" customClass="LETalkListController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="r7i-6Z-zg0">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="grouped" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="r7i-6Z-zg0">
<rect key="frame" x="0.0" y="0.0" width="320" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.6945217252" green="0.89304971690000001" blue="0.99937492610000001" alpha="1" colorSpace="calibratedRGB"/>
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="detailDisclosureButton" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" style="IBUITableViewCellStyleDefault" id="WCw-Qf-5nD">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" id="WCw-Qf-5nD">
<rect key="frame" x="0.0" y="119" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WCw-Qf-5nD" id="n6d-TE-iMm">
<rect key="frame" x="0.0" y="0.0" width="253" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
<rect key="frame" x="15" y="0.0" width="248" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
Expand Down Expand Up @@ -217,6 +233,12 @@
</connections>
</barButtonItem>
</navigationItem>
<refreshControl key="refreshControl" opaque="NO" multipleTouchEnabled="YES" contentMode="center" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="CTx-y3-T1o">
<autoresizingMask key="autoresizingMask"/>
<connections>
<action selector="reloadList" destination="7bK-jq-Zjz" eventType="valueChanged" id="u3I-Lw-jjM"/>
</connections>
</refreshControl>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
</objects>
Expand Down Expand Up @@ -245,6 +267,6 @@
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="P7t-9A-URy"/>
<segue reference="IDC-t5-HAk"/>
</inferredMetricsTieBreakers>
</document>
9 changes: 5 additions & 4 deletions Lemacs/Base.lproj/Main_iPhone.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@
<outlet property="delegate" destination="LeK-Cl-Emu" id="pao-9o-keO"/>
</connections>
</textView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" placeholder="Topic (required)" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="JmJ-I8-eTC">
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" borderStyle="line" placeholder="Topic (required)" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="JmJ-I8-eTC">
<rect key="frame" x="0.0" y="0.0" width="320" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="yes"/>
<connections>
<outlet property="delegate" destination="LeK-Cl-Emu" id="d8S-hS-Jrx"/>
</connections>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.6945217252" green="0.89304971690000001" blue="0.99937492610000001" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="doA-xL-YLh" firstAttribute="top" secondItem="JmJ-I8-eTC" secondAttribute="bottom" id="1Y8-fk-dDh"/>
<constraint firstItem="JmJ-I8-eTC" firstAttribute="leading" secondItem="A8b-Tl-I0D" secondAttribute="leading" id="ABW-iu-wiB"/>
Expand Down Expand Up @@ -107,7 +108,7 @@
<scene sceneID="lLx-8y-duJ">
<objects>
<tableViewController storyboardIdentifier="LETalkViewController" title="Master" useStoryboardIdentifierAsRestorationIdentifier="YES" id="57H-Xs-xKD" userLabel="Talk View Controller" customClass="LETalkViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="150" sectionHeaderHeight="150" sectionFooterHeight="22" id="aIc-pf-KqX">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="150" sectionHeaderHeight="150" sectionFooterHeight="22" id="aIc-pf-KqX">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.6945217252" green="0.89304971690000001" blue="0.99937492610000001" alpha="1" colorSpace="calibratedRGB"/>
Expand Down Expand Up @@ -159,7 +160,7 @@
<scene sceneID="VgW-fR-Quf">
<objects>
<tableViewController storyboardIdentifier="LETalkListController" title="Master" useStoryboardIdentifierAsRestorationIdentifier="YES" id="pGg-6v-bdr" userLabel="Talk List Controller " customClass="LETalkListController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="100" sectionFooterHeight="22" id="mLL-gJ-YKr">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="100" sectionHeaderHeight="100" sectionFooterHeight="22" id="mLL-gJ-YKr">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.6945217252" green="0.89304971690000001" blue="0.99937492610000001" alpha="1" colorSpace="calibratedRGB"/>
Expand Down
Loading

0 comments on commit dce5553

Please sign in to comment.