Skip to content

Commit

Permalink
iOS: Added panels for easier view switching in ResumePlaybackViewCont…
Browse files Browse the repository at this point in the history
…roller. Added layout for iPad (still have to fix rotation issues).
  • Loading branch information
ycastonguay committed Nov 19, 2013
1 parent a46f756 commit 0bd4013
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 190 deletions.
30 changes: 10 additions & 20 deletions MPfm/MPfm.iOS/Classes/Controllers/ResumePlaybackViewController.cs
Expand Up @@ -51,10 +51,11 @@ public override void ViewDidLoad()
tableView.WeakDataSource = this;
tableView.WeakDelegate = this;

lblLoading.Alpha = 1;
activityIndicator.Alpha = 1;
lblTitle.Alpha = 0;
tableView.Alpha = 0;
viewLoading.BackgroundColor = GlobalTheme.BackgroundColor;
viewTable.BackgroundColor = GlobalTheme.BackgroundColor;
viewAppNotLinked.BackgroundColor = GlobalTheme.BackgroundColor;
viewLoading.Alpha = 1;
viewTable.Alpha = 0;
viewAppNotLinked.Alpha = 0;

activityIndicator.StartAnimating();
Expand Down Expand Up @@ -144,12 +145,6 @@ public float HeightForRow(UITableView tableView, NSIndexPath indexPath)
return 130;
}

partial void actionResumePlayback(NSObject sender)
{
//var indexPath = tableView.IndexPathForSelectedRow;
//Console.WriteLine("indexPath: {0}", indexPath);
}

partial void actionOpenCloudPreferences(NSObject sender)
{
OnOpenPreferencesView();
Expand Down Expand Up @@ -238,15 +233,12 @@ public void RefreshDevices(IEnumerable<ResumePlaybackEntity> entities)
InvokeOnMainThread(() => {
if(activityIndicator.IsAnimating)
{
lblTitle.Alpha = 0;
tableView.Alpha = 0;
viewTable.Alpha = 0;
activityIndicator.StopAnimating();
UIView.Animate(0.2, () => {
lblTitle.Alpha = 1;
tableView.Alpha = 1;
lblLoading.Alpha = 0;
activityIndicator.Alpha = 0;
viewTable.Alpha = 1;
viewLoading.Alpha = 0;
});
}
Expand All @@ -262,10 +254,8 @@ public void RefreshAppLinkedStatus(bool isAppLinked)
activityIndicator.StopAnimating();
UIView.Animate(0.2, () => {
lblLoading.Alpha = 0;
activityIndicator.Alpha = 0;
lblTitle.Alpha = isAppLinked ? 1 : 0;
tableView.Alpha = isAppLinked ? 1 : 0;
viewLoading.Alpha = 0;
viewTable.Alpha = isAppLinked ? 1 : 0;
viewAppNotLinked.Alpha = isAppLinked ? 0 : 1;
});
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

213 changes: 92 additions & 121 deletions MPfm/MPfm.iOS/XIB/iPad/ResumePlaybackViewController_iPad.xib
@@ -1,121 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">11C25</string>
<string key="IBDocument.InterfaceBuilderVersion">1919</string>
<string key="IBDocument.AppKitVersion">1138.11</string>
<string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">916</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0" />
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="606714003">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIView" id="766721923">
<reference key="NSNextResponder" />
<int key="NSvFlags">292</int>
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
<reference key="NSSuperview" />
<reference key="NSWindow" />
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="841351856" />
<reference key="destination" ref="766721923" />
</object>
<int key="connectionID">3</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0" />
<reference key="children" ref="1000" />
<nil key="parent" />
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856" />
<reference key="parent" ref="0" />
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="606714003" />
<reference key="parent" ref="0" />
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="766721923" />
<reference key="parent" ref="0" />
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">ResumePlaybackViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties" />
<nil key="activeLocalization" />
<dictionary class="NSMutableDictionary" key="localizations" />
<nil key="sourceID" />
<int key="maxID">3</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">ResumePlaybackViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">ResumePlaybackViewController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">916</string>
</data>
</archive>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="4510" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ResumePlaybackViewController">
<connections>
<outlet property="activityIndicator" destination="zqE-Kr-AWw" id="LXi-oV-eLn"/>
<outlet property="btnOpenCloudPreferences" destination="Efp-8k-bge" id="FGZ-wi-hqf"/>
<outlet property="lblTitle" destination="Hed-CQ-i6h" id="9Kb-hs-sOB"/>
<outlet property="tableView" destination="NBn-Z1-i2D" id="f7d-W7-x8N"/>
<outlet property="view" destination="2" id="3"/>
<outlet property="viewAppNotLinked" destination="V1L-Pw-VhV" id="9IQ-2V-eQj"/>
<outlet property="viewLoading" destination="wCQ-4t-DOC" id="644-db-pp8"/>
<outlet property="viewTable" destination="4aF-TN-K15" id="TZk-Ph-WkN"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="2">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" id="wCQ-4t-DOC">
<rect key="frame" x="309" y="437" width="150" height="150"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loading..." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0aF-GA-5oI">
<rect key="frame" x="41" y="89" width="69" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Light" family="Helvetica Neue" pointSize="16"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="whiteLarge" id="zqE-Kr-AWw">
<rect key="frame" x="57" y="42" width="37" height="37"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" red="1" green="0.0" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" id="V1L-Pw-VhV">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="This application is not linked with a cloud account." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uaN-Ro-KUm">
<rect key="frame" x="238" y="456" width="292" height="43"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Light" family="Helvetica Neue" pointSize="16"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Efp-8k-bge" customClass="MPfmButton">
<rect key="frame" x="238" y="523" width="292" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="14"/>
<state key="normal" title="Open Cloud Preferences">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="actionOpenCloudPreferences:" destination="-1" eventType="touchUpInside" id="Kyk-de-HCB"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="4aF-TN-K15">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Select a device to resume playback:" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Hed-CQ-i6h">
<rect key="frame" x="14" y="11" width="218" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Light" family="Helvetica Neue" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="NBn-Z1-i2D">
<rect key="frame" x="0.0" y="39" width="768" height="985"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="blackOpaque"/>
</view>
</objects>
</document>
Expand Up @@ -118,7 +118,7 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.70000000000000007" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.12549019610000001" green="0.15686274510000001" blue="0.18039215689999999" alpha="0.5" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.84999999999999998" colorSpace="calibratedWhite"/>
Expand Down

0 comments on commit 0bd4013

Please sign in to comment.