Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/xamarin/mobile-samples

  • Loading branch information...
commit cee96ab67a437f4fb4889e6ea6fdd96d3a32813f 1 parent 1cac1db
@conceptdev conceptdev authored
Showing with 1,788 additions and 5,220 deletions.
  1. +1 −1  AsyncAwait/AsyncAwait.sln
  2. +5 −2 AsyncAwait/README.md
  3. +180 −0 AsyncAwait/iOS/AsyncExtrasController.cs
  4. +58 −0 AsyncAwait/iOS/AsyncExtrasController.designer.cs
  5. +118 −0 AsyncAwait/iOS/AsyncExtrasController.xib
  6. +35 −20 AsyncAwait/iOS/ComparisonsOldvsNew/iOSViewController_new.cs
  7. +84 −36 AsyncAwait/iOS/MainStoryboard.storyboard
  8. +6 −2 AsyncAwait/iOS/iOS.csproj
  9. +55 −37 AsyncAwait/iOS/iOSViewController.cs
  10. +8 −1 AsyncAwait/iOS/iOSViewController.designer.cs
  11. +0 −1  ContentControls/AndroidContentControls/AndroidContentControls.csproj
  12. BIN  ContentControls/iOSContentControls/Default.png
  13. BIN  ContentControls/iOSContentControls/Default@2x.png
  14. BIN  ContentControls/iOSContentControls/Images/Icon/512_icon.png
  15. +8 −4 ContentControls/iOSContentControls/Info.plist
  16. BIN  ContentControls/iOSContentControls/Resources/Default-568h@2x.png
  17. BIN  ContentControls/iOSContentControls/Resources/Icon-60@2x.png
  18. BIN  ContentControls/iOSContentControls/Resources/Icon-Small-40@2x.png
  19. BIN  ContentControls/iOSContentControls/Resources/Icon-Small.png
  20. BIN  ContentControls/iOSContentControls/Resources/Icon-Small@2x.png
  21. BIN  ContentControls/iOSContentControls/Resources/Icon.png
  22. BIN  ContentControls/iOSContentControls/Resources/Icon@2x.png
  23. +54 −327 ContentControls/iOSContentControls/Screens/iPhone/Browsers/BrowsersHome.xib
  24. +42 −280 ContentControls/iOSContentControls/Screens/iPhone/Browsers/InteractiveBrowser.xib
  25. +30 −227 ContentControls/iOSContentControls/Screens/iPhone/Browsers/LocalBrowser.xib
  26. +85 −493 ContentControls/iOSContentControls/Screens/iPhone/Browsers/WebBrowser.xib
  27. +78 −429 ContentControls/iOSContentControls/Screens/iPhone/CustomizingNavBar/CustomizingNavBarScreen.xib
  28. +33 −239 ContentControls/iOSContentControls/Screens/iPhone/Extra Screens/CustomizableTabScreen.xib
  29. +31 −224 ContentControls/iOSContentControls/Screens/iPhone/Maps/AnnotatedMapScreen.xib
  30. +42 −288 ContentControls/iOSContentControls/Screens/iPhone/Maps/BasicMapScreen.xib
  31. +31 −221 ContentControls/iOSContentControls/Screens/iPhone/Maps/MapWithOverlayScreen.xib
  32. +55 −328 ContentControls/iOSContentControls/Screens/iPhone/Maps/MapsHome.xib
  33. +38 −267 ContentControls/iOSContentControls/Screens/iPhone/Search/SearchScreen.xib
  34. +26 −8 ContentControls/iOSContentControls/iOSContentControls.csproj
  35. BIN  ContentControls/iOSContentControls/iTunesArtwork@2x
  36. +1 −1  GraphicsAndAnimation.Android/Resources/Resource.Designer.cs
  37. +0 −1  MWC/MWC.iOS/Info.plist
  38. +4 −3 MWC/MWC.iOS/MWC.iOS.csproj
  39. +2 −1  MultiThreading/AndroidMultiThreading/AndroidMultiThreading.csproj
  40. +6 −0 MultiThreading/AndroidMultiThreading/Properties/AndroidManifest.xml
  41. +40 −1 MultiThreading/AndroidMultiThreading/Resources/Resource.designer.cs
  42. +1 −1  MultiThreading/MultiThreading.sln
  43. +2 −1  Notifications/Notifications.Android/Notifications.Android.csproj
  44. +6 −0 Notifications/Notifications.Android/Properties/AndroidManifest.xml
  45. +95 −95 Notifications/Notifications.sln
  46. BIN  Phoneword/PhonewordiOS/Resources/Default-568h@2x.png
  47. +1 −1  SoMA/SoMA.sln
  48. +6 −2 StandardControls/AndroidStandardControls/AndroidStandardControls.csproj
  49. +1 −0  StandardControls/AndroidStandardControls/Home_Adapter.cs
  50. +19 −0 StandardControls/AndroidStandardControls/Resources/Layout/SeekBarScreen.axml
  51. +4 −0 StandardControls/AndroidStandardControls/Resources/Values/dimen.xml
  52. +60 −0 StandardControls/AndroidStandardControls/Screens/ProgressControls/SeekBarScreen.cs
  53. +2 −2 StandardControls/StandardControls.sln
  54. +2 −1  StandardControls/iOSStandardControls/AppDelegate.cs
  55. BIN  StandardControls/iOSStandardControls/Default-Landscape~ipad.png
  56. BIN  StandardControls/iOSStandardControls/Default-Portrait~ipad.png
  57. BIN  StandardControls/iOSStandardControls/Default.png
  58. BIN  StandardControls/iOSStandardControls/Default@2x.png
  59. BIN  StandardControls/iOSStandardControls/Images/halloween.jpg
  60. +13 −6 StandardControls/iOSStandardControls/Info.plist
  61. BIN  StandardControls/iOSStandardControls/Resources/Default-568h@2x.png
  62. BIN  StandardControls/iOSStandardControls/Resources/Default-Landscape@2x.png
  63. BIN  StandardControls/iOSStandardControls/Resources/Default-Portrait@2x.png
  64. BIN  StandardControls/iOSStandardControls/Resources/Icon-60@2x.png
  65. BIN  StandardControls/iOSStandardControls/Resources/Icon-72.png
  66. BIN  StandardControls/iOSStandardControls/Resources/Icon-72@2x.png
  67. BIN  StandardControls/iOSStandardControls/Resources/Icon-76.png
  68. BIN  StandardControls/iOSStandardControls/Resources/Icon-76@2x.png
  69. BIN  StandardControls/iOSStandardControls/Resources/Icon-Small-40.png
  70. BIN  StandardControls/iOSStandardControls/Resources/Icon-Small-40@2x.png
  71. BIN  StandardControls/iOSStandardControls/Resources/Icon-Small-50.png
  72. BIN  StandardControls/iOSStandardControls/Resources/Icon-Small-50@2x.png
  73. BIN  StandardControls/iOSStandardControls/Resources/Icon-Small.png
  74. BIN  StandardControls/iOSStandardControls/Resources/Icon-Small@2x.png
  75. BIN  StandardControls/iOSStandardControls/Resources/Icon.png
  76. BIN  StandardControls/iOSStandardControls/Resources/Icon@2x.png
  77. +0 −2  StandardControls/iOSStandardControls/Screens/iPhone/DatePicker/DatePicker_iPhone.xib.cs
  78. +10 −1 StandardControls/iOSStandardControls/Screens/iPhone/Home/HomeTableViewController.cs
  79. +1 −1  StandardControls/iOSStandardControls/Screens/iPhone/ScrollView/Controller.cs
  80. +117 −595 StandardControls/iOSStandardControls/Screens/iPhone/SegmentedControl/SegmentedControls_iPhone.xib
  81. +1 −1  StandardControls/iOSStandardControls/Screens/iPhone/TapToZoomScrollView/Controller.cs
  82. +36 −10 StandardControls/iOSStandardControls/iOSStandardControls.csproj
  83. BIN  StandardControls/iOSStandardControls/iTunesArtwork
  84. BIN  StandardControls/iOSStandardControls/iTunesArtwork@2x
  85. +1 −1  TablesLists/TablesLists.sln
  86. +0 −1  TablesLists/iOSTableAndCellStyles/Info.plist
  87. +3 −1 TablesLists/iOSTableAndCellStyles/iOSTableAndCellStyles.csproj
  88. +0 −1  Tasky/Tasky.Core.MD/Tasky.Core.MD.csproj
  89. +2 −2 Tasky/Tasky.sln
  90. +40 −1 Tasky/TaskyDroid/Resources/Resource.designer.cs
  91. +0 −1  Tasky/TaskyDroid/TaskyDroid.csproj
  92. +1 −0  Tasky/TaskyTouch/AppDelegate.cs
  93. +3 −1 Tasky/TaskyTouch/TaskyTouch.csproj
  94. +0 −1  TaskyPro/Tasky.Android/Tasky.Android.csproj
  95. +4 −4 TaskyPro/TaskyMD_Mac.sln
  96. +6 −0 Touch/Touch.Android/Properties/AndroidManifest.xml
  97. +2 −0  Touch/Touch.Android/Touch.Android.csproj
  98. +44 −293 Touch/Touch.iOS/Screens/iPhone/GestureRecognizers/GestureRecognizers_iPhone.xib
  99. +54 −338 Touch/Touch.iOS/Screens/iPhone/Home/Home_iPhone.xib
  100. +59 −378 Touch/Touch.iOS/Screens/iPhone/SimpleTouch/Touches_iPhone.xib
  101. +36 −36 Touch/Touch.sln
View
2  AsyncAwait/AsyncAwait.sln
@@ -41,6 +41,6 @@ Global
{9F8656FD-07A4-44F7-864E-A94E7C27F529}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = Droid\Droid.csproj
+ StartupItem = iOS\iOS.csproj
EndGlobalSection
EndGlobal
View
7 AsyncAwait/README.md
@@ -9,6 +9,9 @@ This sample was first presented in the Xamarin Introduction to C# 5 Async webina
[Xamarin's Introduction to Async article](http://docs.xamarin.com/guides/cross-platform/advanced/async_support_overview)
-The sample apps (for iOS and Android) show a simple implementation of a text & image download using the new C# 5 `async` and `await` syntax.
+The sample apps (for iOS and Android) has two examples:
-Also check out [Miguel's blog post on the subject](http://tirania.org/blog/archive/2013/Aug-15.html).
+* a simple text & image download using the new C# 5 `async` and `await` syntax.
+* another example that shows how to download multiple files in the background and report download progress using `IProgress<T>`/`Progress<T>`. It also demonstrates how to cancel the background downloads using a `CancellationTokenSource`.
+
+Also check out [Miguel's blog post on the subject](http://tirania.org/blog/archive/2013/Aug-15.html).
View
180 AsyncAwait/iOS/AsyncExtrasController.cs
@@ -0,0 +1,180 @@
+using System;
+using System.Threading.Tasks;
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+using System.Threading;
+using System.Net.Http;
+using System.Collections.Generic;
+using System.Net;
+using System.IO;
+using System.Drawing;
+
+namespace iOS
+{
+ public class DownloadBytesProgress
+ {
+
+ public DownloadBytesProgress(string fileName, int bytesReceived, int totalBytes)
+ {
+ Filename = fileName;
+ BytesReceived = bytesReceived;
+ TotalBytes = totalBytes;
+ }
+ public int TotalBytes { get; private set; }
+ public int BytesReceived { get; private set; }
+ public float PercentComplete { get { return (float) BytesReceived / TotalBytes; } }
+ public string Filename { get; private set; }
+ public bool IsFinished { get { return BytesReceived == TotalBytes; } }
+ }
+
+ public partial class AsyncExtrasController : UIViewController
+ {
+ static readonly string[] ListOfImages = new string[]
+ {
+ "http://xamarin.com/images/tour/amazing-ide.png",
+ "http://xamarin.com/images/how-it-works/chalkboard2.jpg",
+ "http://xamarin.com/images/about/team.jpg",
+ "http://xamarin.com/images/prebuilt/rich-feature-set.jpg",
+ "http://cdn1.xamarin.com/webimages/images/features/shared-code-2.pngXXX",
+ "http://xamarin.com/images/tour/4platforms12.jpg",
+ "http://xamarin.com/images/tour/amazing-ide.png",
+ "http://xamarin.com/images/enterprise/multiple_platforms.png",
+ "http://blog.xamarin.com/wp-content/uploads/2013/07/monkey_cowboy.jpg",
+ "http://docs.xamarin.com/guides/cross-platform/getting_started/introducing_xamarin_studio/Images/19.png"
+ };
+
+
+ List<UIProgressView> progressBars = new List<UIProgressView>();
+ CancellationTokenSource cancellationTokenSource;
+
+ public AsyncExtrasController(IntPtr handle) : base (handle)
+ {
+ }
+
+ public override void DidReceiveMemoryWarning()
+ {
+ // Releases the view if it doesn't have a superview.
+ base.DidReceiveMemoryWarning();
+ }
+
+ public override void ViewDidLoad()
+ {
+ base.ViewDidLoad();
+ StartButton.TouchUpInside += StartDownloadsHandler;
+ CancelButton.TouchUpInside += CancelDownloadsHandler;
+ }
+
+ void CancelDownloadsHandler (object sender, EventArgs e)
+ {
+ if (cancellationTokenSource != null)
+ {
+ StatusTextView.Text = "Cancelling downloads....";
+ cancellationTokenSource.Cancel();
+ }
+ }
+
+ async Task<int> GetBytes(string url, CancellationToken cancelToken, IProgress<DownloadBytesProgress> progressIndicator)
+ {
+ int receivedBytes = 0;
+ int totalBytes = -1;
+ WebClient client = new WebClient();
+
+ using (var stream = await client.OpenReadTaskAsync(url))
+ {
+ byte[] buffer = new byte[4096];
+ Int32.TryParse(client.ResponseHeaders[HttpResponseHeader.ContentLength], out totalBytes);
+
+ for (;;)
+ {
+ int len = await stream.ReadAsync(buffer, 0, buffer.Length);
+ if (len == 0)
+ {
+ await Task.Yield();
+ break;
+ }
+
+ receivedBytes += len;
+ cancelToken.ThrowIfCancellationRequested();
+
+ if (progressIndicator != null)
+ {
+ DownloadBytesProgress args = new DownloadBytesProgress(url, receivedBytes, totalBytes);
+ progressIndicator.Report(args);
+ }
+ }
+ }
+ return receivedBytes;
+ }
+
+ async void StartDownloadsHandler (object sender, EventArgs e)
+ {
+ cancellationTokenSource = new CancellationTokenSource();
+
+ InitializeViews();
+
+ List<Task<int>> tasks = CreateTaskForEachFileToDownload();
+
+ HttpClient client = new HttpClient();
+
+ while (tasks.Count > 0)
+ {
+ var t = await Task.WhenAny(tasks);
+ tasks.Remove(t);
+ ProgressBar.Progress = (float)(ListOfImages.Length - tasks.Count) / ListOfImages.Length;
+ try
+ {
+ await t;
+ ProgressTextView.Text += "** Downloaded " + t.Result + " bytes" + Environment.NewLine;
+ }
+ catch (OperationCanceledException)
+ {
+ ProgressTextView.Text += "## Download was cancelled." + Environment.NewLine;
+ break;
+ }
+ catch (Exception exc)
+ {
+ ProgressTextView.Text += "-- Download ERROR: " + exc.Message + Environment.NewLine;
+ }
+ }
+
+ StatusTextView.Text = "Downloads finished.";
+ cancellationTokenSource = null;
+ }
+
+ void InitializeViews()
+ {
+ StatusTextView.Text = "Downloads starting....";
+ ProgressTextView.Text = String.Empty;
+ ProgressBar.Progress = 0;
+
+ foreach (var item in progressBars)
+ {
+ item.RemoveFromSuperview();
+ }
+ }
+
+ List<Task<int>> CreateTaskForEachFileToDownload()
+ {
+ List<Task<int>> tasks = new List<Task<int>>(ListOfImages.Length);
+
+ for (int idx =0; idx< ListOfImages.Length; idx++)
+ {
+ RectangleF frame = new RectangleF(20f, 276f + idx * 20f, 280f, 2f);
+ UIProgressView pb = new UIProgressView(frame);
+ Add(pb);
+
+ Progress<DownloadBytesProgress> progressReporter = new Progress<DownloadBytesProgress>();
+ progressReporter.ProgressChanged += (s, e) =>
+ {
+ pb.Progress = e.PercentComplete;
+ };
+
+ Task<int> task = GetBytes(ListOfImages[idx], cancellationTokenSource.Token, progressReporter);
+ tasks.Add(task);
+ }
+
+ return tasks;
+ }
+ }
+}
+
View
58 AsyncAwait/iOS/AsyncExtrasController.designer.cs
@@ -0,0 +1,58 @@
+// WARNING
+//
+// This file has been generated automatically by Xamarin Studio to store outlets and
+// actions made in the UI designer. If it is removed, they will be lost.
+// Manual changes to this file may not be handled correctly.
+//
+using MonoTouch.Foundation;
+using System.CodeDom.Compiler;
+
+namespace iOS
+{
+ [Register ("AsyncExtrasController")]
+ partial class AsyncExtrasController
+ {
+ [Outlet]
+ MonoTouch.UIKit.UIButton CancelButton { get; set; }
+
+ [Outlet]
+ MonoTouch.UIKit.UIProgressView ProgressBar { get; set; }
+
+ [Outlet]
+ MonoTouch.UIKit.UITextView ProgressTextView { get; set; }
+
+ [Outlet]
+ MonoTouch.UIKit.UIButton StartButton { get; set; }
+
+ [Outlet]
+ MonoTouch.UIKit.UITextView StatusTextView { get; set; }
+
+ void ReleaseDesignerOutlets ()
+ {
+ if (ProgressTextView != null) {
+ ProgressTextView.Dispose ();
+ ProgressTextView = null;
+ }
+
+ if (ProgressBar != null) {
+ ProgressBar.Dispose ();
+ ProgressBar = null;
+ }
+
+ if (StatusTextView != null) {
+ StatusTextView.Dispose ();
+ StatusTextView = null;
+ }
+
+ if (CancelButton != null) {
+ CancelButton.Dispose ();
+ CancelButton = null;
+ }
+
+ if (StartButton != null) {
+ StartButton.Dispose ();
+ StartButton = null;
+ }
+ }
+ }
+}
View
118 AsyncAwait/iOS/AsyncExtrasController.xib
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder" />
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</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>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics" />
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="372490531" />
+ <reference key="destination" ref="191373211" />
+ </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="191373211" />
+ <reference key="parent" ref="0" />
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531" />
+ <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="975951072" />
+ <reference key="parent" ref="0" />
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">AsyncExtrasController</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="1.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">AsyncExtrasController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AsyncExtrasController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">916</string>
+ </data>
+</archive>
View
55 AsyncAwait/iOS/ComparisonsOldvsNew/iOSViewController_new.cs
@@ -9,6 +9,7 @@
using MonoTouch.AssetsLibrary;
using System.Collections.Generic;
using System.Threading;
+
/*
AsyncAwait : C# 5 style async-await
@@ -19,17 +20,18 @@ namespace iOS
public partial class iOSViewController2a : UIViewController
{
string localPath;
- public iOSViewController2a (IntPtr handle) : base (handle)
+
+ public iOSViewController2a(IntPtr handle) : base (handle)
{
}
- public override void ViewDidLoad ()
+ public override void ViewDidLoad()
{
- base.ViewDidLoad ();
+ base.ViewDidLoad();
GetButton.TouchUpInside += HandleTouchUpInside;
}
- async void HandleTouchUpInside (object sender, EventArgs e)
+ async void HandleTouchUpInside(object sender, EventArgs e)
{
ResultLabel.Text = "loading...";
ResultTextView.Text = "loading...\n";
@@ -37,12 +39,13 @@ public override void ViewDidLoad ()
Task<int> sizeTask = DownloadHomepageAsync();
var intResult = await sizeTask;
- ResultLabel.Text = "Length: " + intResult ;
+ ResultLabel.Text = "Length: " + intResult;
}
public async Task<int> DownloadHomepageAsync()
{
- try {
+ try
+ {
var httpClient = new HttpClient();
Task<string> contentsTask = httpClient.GetStringAsync("http://xamarin.com");
@@ -52,10 +55,11 @@ public override void ViewDidLoad ()
int length = contents.Length;
ResultTextView.Text += "Downloaded the html and found out the length.\n\n";
- byte[] imageBytes = await httpClient.GetByteArrayAsync("http://xamarin.com/images/about/team.jpg");
- SaveBytesToFile(imageBytes, "team.jpg");
+ byte[] imageBytes = await httpClient.GetByteArrayAsync("http://xamarin.com/images/about/team.jpg");
+ await SaveBytesToFileAsync(imageBytes, "team.jpg");
ResultTextView.Text += "Downloaded the image.\n";
- DownloadedImageView.Image = UIImage.FromFile (localPath);
+ ResultTextView.Text += "Save the image to a file." + Environment.NewLine;
+ DownloadedImageView.Image = UIImage.FromFile(localPath);
ALAssetsLibrary library = new ALAssetsLibrary();
var dict = new NSDictionary();
@@ -65,30 +69,39 @@ public override void ViewDidLoad ()
ResultTextView.Text += "\n\n\n" + contents; // just dump the entire HTML
return length;
- } catch {
+ }
+ catch
+ {
// do something with error
return -1;
}
}
-
-
- void SaveBytesToFile(byte[] r, string f)
+ async Task SaveBytesToFileAsync(byte[] bytesToSave, string fileName)
{
string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
- string localFilename = f;
- localPath = Path.Combine (documentsPath, localFilename);
- File.WriteAllBytes (localPath, r); // writes to local storage
+ string localFilename = fileName;
+ localPath = Path.Combine(documentsPath, localFilename);
+
+ if (File.Exists(localPath))
+ {
+ File.Delete(localPath);
+ }
+
+ using (FileStream fs = new FileStream(localPath, FileMode.Create, FileAccess.Write))
+ {
+ await fs.WriteAsync(bytesToSave, 0, bytesToSave.Length);
+ }
}
#region irrelevant
- public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
+
+ public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
{
// Return true for supported orientations
return (toInterfaceOrientation == UIInterfaceOrientation.Portrait);
}
-
[Outlet]
MonoTouch.UIKit.UIImageView DownloadedImageView { get; set; }
@@ -101,9 +114,11 @@ public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientat
[Outlet]
MonoTouch.UIKit.UITextView ResultTextView { get; set; }
- [Action ("UIButton9_TouchUpInside:")]
- partial void UIButton9_TouchUpInside (MonoTouch.UIKit.UIButton sender);
+ [Action("UIButton9_TouchUpInside:")]
+ partial void UIButton9_TouchUpInside(MonoTouch.UIKit.UIButton sender);
+
#endregion
+
}
}
View
120 AsyncAwait/iOS/MainStoryboard.storyboard
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="2">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="2">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
</dependencies>
<scenes>
- <!--IOS View Controller-->
+ <!--IOS View Controller - Async-->
<scene sceneID="5">
<objects>
- <viewController id="2" customClass="iOSViewController" sceneMemberID="viewController">
+ <viewController title="Async" id="2" customClass="iOSViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3">
- <rect key="frame" x="0.0" y="20" width="320" height="460"/>
+ <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" minimumFontSize="10" id="7">
@@ -21,19 +21,27 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="9">
- <rect key="frame" x="9" y="20" width="106" height="37"/>
+ <rect key="frame" x="9" y="20" width="81" height="37"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Get Async">
<color key="titleColor" red="0.196078" green="0.30980000000000002" blue="0.52156999999999998" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
- <state key="highlighted">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="1i5-5w-mLZ">
+ <rect key="frame" x="226" y="20" width="81" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <state key="normal" title="Async+">
+ <color key="titleColor" red="0.196078" green="0.30980000000000002" blue="0.52156999999999998" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
+ <connections>
+ <segue destination="TGH-P0-Zxa" kind="modal" id="CgQ-dW-aXv"/>
+ </connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="-" id="12">
- <rect key="frame" x="0.0" y="94" width="320" height="221"/>
+ <rect key="frame" x="0.0" y="94" width="320" height="241"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -44,36 +52,27 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="AXz-Gx-gjO">
- <rect key="frame" x="123" y="19" width="68" height="38"/>
+ <rect key="frame" x="98" y="19" width="47" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Noop">
- <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
- <state key="highlighted">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="14">
- <rect key="frame" x="242" y="19" width="68" height="38"/>
+ <rect key="frame" x="153" y="19" width="68" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Naysync">
- <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
- <state key="highlighted">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </state>
<connections>
- <action selector="Naysync_TouchUpInside:" destination="2" id="touchUpInside-14-0" eventType="touchUpInside"/>
+ <action selector="Naysync_TouchUpInside:" destination="2" eventType="touchUpInside" id="touchUpInside-14-0"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<connections>
+ <outlet property="BetterAsyncButton" destination="1i5-5w-mLZ" id="oCK-O6-XV4"/>
<outlet property="DownloadedImageView" destination="tHf-mQ-sLW" id="cQK-wU-Eq2"/>
<outlet property="GetButton" destination="9" id="name-outlet-9"/>
<outlet property="ResultLabel" destination="7" id="name-outlet-7"/>
@@ -83,23 +82,72 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects>
</scene>
+ <!--Async Extras Controller - Async+-->
+ <scene sceneID="Qs2-j9-gBT">
+ <objects>
+ <viewController title="Async+" id="TGH-P0-Zxa" customClass="AsyncExtrasController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="5De-OT-CEy">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" selectable="NO" id="COP-tW-rdu">
+ <rect key="frame" x="20" y="125" width="280" height="121"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="system" pointSize="12"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ </textView>
+ <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" id="zUx-Wb-nSR">
+ <rect key="frame" x="166" y="103" width="134" height="2"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ </progressView>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" selectable="NO" id="3tF-3Y-Cok">
+ <rect key="frame" x="20" y="58" width="280" height="32"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ </textView>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="vfT-bp-GWO">
+ <rect key="frame" x="20" y="20" width="46" height="30"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <state key="normal" title="Start">
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="8gj-Pq-KRy">
+ <rect key="frame" x="227" y="20" width="66" height="30"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <state key="normal" title="Cancel">
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ </button>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Files Downloaded:" id="ePW-jN-Emi">
+ <rect key="frame" x="20" y="87" width="138" height="30"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ </textView>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ <connections>
+ <outlet property="CancelButton" destination="8gj-Pq-KRy" id="89y-8w-R6h"/>
+ <outlet property="ProgressBar" destination="zUx-Wb-nSR" id="e5O-CD-o4Y"/>
+ <outlet property="ProgressTextView" destination="COP-tW-rdu" id="8BZ-7o-Yl2"/>
+ <outlet property="StartButton" destination="vfT-bp-GWO" id="JfU-Xw-HS3"/>
+ <outlet property="StatusTextView" destination="3tF-3Y-Cok" id="dBn-fY-OUY"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="3Sh-17-gFv" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="815" y="144"/>
+ </scene>
</scenes>
- <classes>
- <class className="iOSViewController" superclassName="UIViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/iOSViewController.h"/>
- <relationships>
- <relationship kind="action" name="UIButton9_TouchUpInside:" candidateClass="UIButton"/>
- <relationship kind="outlet" name="DownloadedImageView" candidateClass="UIImageView"/>
- <relationship kind="outlet" name="GetButton" candidateClass="UIButton"/>
- <relationship kind="outlet" name="ResultLabel" candidateClass="UILabel"/>
- <relationship kind="outlet" name="ResultTextView" candidateClass="UITextView"/>
- </relationships>
- </class>
- </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
- <resources/>
</document>
View
8 AsyncAwait/iOS/iOS.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -99,9 +99,13 @@
</Compile>
<Compile Include="ComparisonsOldvsNew\iOSViewController_old.cs" />
<Compile Include="ComparisonsOldvsNew\iOSViewController_new.cs" />
+ <Compile Include="AsyncExtrasController.cs" />
+ <Compile Include="AsyncExtrasController.designer.cs">
+ <DependentUpon>AsyncExtrasController.cs</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainStoryboard.storyboard" />
</ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
</Project>
View
92 AsyncAwait/iOS/iOSViewController.cs
@@ -9,26 +9,31 @@
using MonoTouch.AssetsLibrary;
using System.Collections.Generic;
using System.Threading;
+
/*
AsyncAwait : C#
*/
+using System.Diagnostics;
+
+
namespace iOS
{
public partial class iOSViewController : UIViewController
{
- public iOSViewController (IntPtr handle) : base (handle)
+ public iOSViewController(IntPtr handle) : base (handle)
{
}
+
string localPath;
- public override void ViewDidLoad ()
+ public override void ViewDidLoad()
{
- base.ViewDidLoad ();
-
- GetButton.TouchUpInside += async (sender, e) => {
+ base.ViewDidLoad();
+ GetButton.TouchUpInside += async (sender, e) =>
+ {
Task<int> sizeTask = DownloadHomepageAsync();
ResultLabel.Text = "loading...";
@@ -39,16 +44,34 @@ public override void ViewDidLoad ()
var intResult = await sizeTask;
// when the Task<int> returns, the value is available and we can display on the UI
- ResultLabel.Text = "Length: " + intResult ;
+ ResultLabel.Text = "Length: " + intResult;
// effectively returns void
};
+
}
+ async Task SaveBytesToFileAsync(byte[] bytesToSave, string fileName)
+ {
+ string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
+ string localFilename = fileName;
+ localPath = Path.Combine(documentsPath, localFilename);
+
+ if (File.Exists(localPath))
+ {
+ File.Delete(localPath);
+ }
+
+ using (FileStream fs = new FileStream(localPath, FileMode.Create, FileAccess.Write))
+ {
+ await fs.WriteAsync(bytesToSave, 0, bytesToSave.Length);
+ }
+ }
public async Task<int> DownloadHomepageAsync()
{
- try {
+ try
+ {
var httpClient = new HttpClient(); // Xamarin supports HttpClient!
//
@@ -68,17 +91,17 @@ public override void ViewDidLoad ()
// download image bytes
ResultTextView.Text += "Start downloading image.\n";
- byte[] imageBytes = await httpClient.GetByteArrayAsync("http://xamarin.com/images/about/team.jpg"); // async method!
- SaveBytesToFile(imageBytes, "team.jpg");
+ byte[] imageBytes = await httpClient.GetByteArrayAsync("http://xamarin.com/images/about/team.jpg"); // async method!
ResultTextView.Text += "Downloaded the image.\n";
-
- DownloadedImageView.Image = UIImage.FromFile (localPath);
+ await SaveBytesToFileAsync(imageBytes, "team.jpg");
+ ResultTextView.Text += "Save the image to a file." + Environment.NewLine;
+ DownloadedImageView.Image = UIImage.FromFile(localPath);
//
// save image to Photo Album using async-ified iOS API
ALAssetsLibrary library = new ALAssetsLibrary();
var dict = new NSDictionary();
- var assetUrl = await library.WriteImageToSavedPhotosAlbumAsync (DownloadedImageView.Image.CGImage, dict);
+ var assetUrl = await library.WriteImageToSavedPhotosAlbumAsync(DownloadedImageView.Image.CGImage, dict);
ResultTextView.Text += "Saved to album assetUrl = " + assetUrl + "\n";
//
@@ -88,53 +111,48 @@ public override void ViewDidLoad ()
Task<byte[]> task2 = httpClient.GetByteArrayAsync("http://xamarin.com/images/how-it-works/chalkboard2.jpg"); // async method!
Task<byte[]> task3 = httpClient.GetByteArrayAsync("http://cdn1.xamarin.com/webimages/images/features/shared-code-2.pngXXX"); // ERROR async method!
- List<Task<byte[]>> tasks = new List<Task<byte[]>> ();
- tasks.Add (task1);
- tasks.Add (task2);
- tasks.Add (task3);
+ List<Task<byte[]>> tasks = new List<Task<byte[]>>();
+ tasks.Add(task1);
+ tasks.Add(task2);
+ tasks.Add(task3);
- while(tasks.Count > 0) {
+ while (tasks.Count > 0)
+ {
var t = await Task.WhenAny(tasks);
tasks.Remove(t);
- try {
+ try
+ {
await t;
ResultTextView.Text += "** Downloaded " + t.Result.Length + " bytes\n";
- }
- catch(OperationCanceledException) {}
- catch(Exception exc) {
+ }
+ catch (OperationCanceledException)
+ {
+ }
+ catch (Exception exc)
+ {
ResultTextView.Text += "-- Download ERROR: " + exc.Message + "\n";
}
}
-
-
// this doesn't happen until the image has downloaded as well
ResultTextView.Text += "\n\n\n" + contents; // just dump the entire HTML
return length; // Task<TResult> returns an object of type TResult, in this case int
- } catch (Exception ex) {
- Console.WriteLine ("Centralized exception handling!");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("Centralized exception handling!");
return -1;
}
}
-
- void SaveBytesToFile(byte[] r, string f)
- {
- string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
- string localFilename = f;
- localPath = Path.Combine (documentsPath, localFilename);
- File.WriteAllBytes (localPath, r); // writes to local storage
- }
-
// HACK: do not try this at home! just a demo of what happens when you DO block the UI thread :)
- partial void Naysync_TouchUpInside (UIButton sender)
+ partial void Naysync_TouchUpInside(UIButton sender)
{
Thread.Sleep(5000);
}
-
- public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
+ public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
{
// Return true for supported orientations
return (toInterfaceOrientation == UIInterfaceOrientation.Portrait);
View
9 AsyncAwait/iOS/iOSViewController.designer.cs
@@ -13,6 +13,9 @@ namespace iOS
partial class iOSViewController
{
[Outlet]
+ MonoTouch.UIKit.UIButton BetterAsyncButton { get; set; }
+
+ [Outlet]
MonoTouch.UIKit.UIImageView DownloadedImageView { get; set; }
[Outlet]
@@ -25,7 +28,6 @@ partial class iOSViewController
MonoTouch.UIKit.UITextView ResultTextView { get; set; }
[Action ("Naysync_TouchUpInside:")]
- [GeneratedCodeAttribute ("iOS Designer", "1.0")]
partial void Naysync_TouchUpInside (MonoTouch.UIKit.UIButton sender);
[Action ("UIButton14_TouchUpInside:")]
@@ -55,6 +57,11 @@ void ReleaseDesignerOutlets ()
ResultTextView.Dispose ();
ResultTextView = null;
}
+
+ if (BetterAsyncButton != null) {
+ BetterAsyncButton.Dispose ();
+ BetterAsyncButton = null;
+ }
}
}
}
View
1  ContentControls/AndroidContentControls/AndroidContentControls.csproj
@@ -40,7 +40,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
- <AndroidLinkMode>SdkOnly</AndroidLinkMode>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
View
BIN  ContentControls/iOSContentControls/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Default@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Images/Icon/512_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
12 ContentControls/iOSContentControls/Info.plist
@@ -6,13 +6,15 @@
<string>Content Ctrls</string>
<key>CFBundleIconFiles</key>
<array>
- <string>Images/Icon/57_icon.png</string>
- <string>Images/Icon/114_icon.png</string>
+ <string>Icon</string>
+ <string>Icon@2x</string>
<string>Images/Icon/72_icon.png</string>
- <string>Images/Icon/29_icon.png</string>
- <string>Images/Icon/58_icon.png</string>
+ <string>Icon-Small</string>
+ <string>Icon-Small@2x</string>
<string>Images/Icon/50_icon.png</string>
<string>Images/Icon/512_icon.png</string>
+ <string>Icon-60@2x</string>
+ <string>Icon-Small-40@2x</string>
</array>
<key>MinimumOSVersion</key>
<string>3.0</string>
@@ -20,5 +22,7 @@
<array>
<string>1</string>
</array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array/>
</dict>
</plist>
View
BIN  ContentControls/iOSContentControls/Resources/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Resources/Icon-60@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Resources/Icon-Small-40@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Resources/Icon-Small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Resources/Icon-Small@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Resources/Icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ContentControls/iOSContentControls/Resources/Icon@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
381 ContentControls/iOSContentControls/Screens/iPhone/Browsers/BrowsersHome.xib
@@ -1,327 +1,54 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">117</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBProxyObject" id="372490531">
- <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBProxyObject" id="711762367">
- <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="191373211">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUIButton" id="719009174">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">295</int>
- <string key="NSFrame">{{20, 20}, {280, 37}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <object class="NSFont" key="IBUIFont" id="828743838">
- <string key="NSName">Helvetica-Bold</string>
- <double key="NSSize">15</double>
- <int key="NSfFlags">16</int>
- </object>
- <int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Web Browser</string>
- <object class="NSColor" key="IBUIHighlightedTitleColor" id="729681369">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <object class="NSColor" key="IBUINormalTitleShadowColor" id="178969337">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
- <object class="IBUIButton" id="142582115">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">295</int>
- <string key="NSFrame">{{20, 65}, {280, 37}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIFont" ref="828743838"/>
- <int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Local Content Browser</string>
- <reference key="IBUIHighlightedTitleColor" ref="729681369"/>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <reference key="IBUINormalTitleShadowColor" ref="178969337"/>
- </object>
- <object class="IBUIButton" id="321135325">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">295</int>
- <string key="NSFrame">{{20, 110}, {280, 37}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIFont" ref="828743838"/>
- <int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Interacting with the Web View</string>
- <reference key="IBUIHighlightedTitleColor" ref="729681369"/>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <reference key="IBUINormalTitleShadowColor" ref="178969337"/>
- </object>
- </object>
- <string key="NSFrameSize">{320, 416}</string>
- <reference key="NSSuperview"/>
- <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>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
- <object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics">
- <bool key="IBUIPrompted">NO</bool>
- </object>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">view</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="191373211"/>
- </object>
- <int key="connectionID">7</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">btnLocalBrowser</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="142582115"/>
- </object>
- <int key="connectionID">10</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">btnWebBrowser</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="719009174"/>
- </object>
- <int key="connectionID">11</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">btnInteractivity</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="321135325"/>
- </object>
- <int key="connectionID">13</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1</int>
- <reference key="object" ref="191373211"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="719009174"/>
- <reference ref="142582115"/>
- <reference ref="321135325"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="372490531"/>
- <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="711762367"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">8</int>
- <reference key="object" ref="719009174"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">9</int>
- <reference key="object" ref="142582115"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">12</int>
- <reference key="object" ref="321135325"/>
- <reference key="parent" ref="191373211"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>-1.CustomClassName</string>
- <string>-2.CustomClassName</string>
- <string>1.IBEditorWindowLastContentRect</string>
- <string>1.IBPluginDependency</string>
- <string>12.IBPluginDependency</string>
- <string>8.IBPluginDependency</string>
- <string>9.IBPluginDependency</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>BrowsersHome</string>
- <string>UIResponder</string>
- <string>{{357, 275}, {320, 480}}</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">13</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">BrowsersHome</string>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>btnInteractivity</string>
- <string>btnLocalBrowser</string>
- <string>btnWebBrowser</string>
- <string>view</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>btnInteractivity</string>
- <string>btnLocalBrowser</string>
- <string>btnWebBrowser</string>
- <string>view</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">btnInteractivity</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">btnLocalBrowser</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">btnWebBrowser</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">view</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- </object>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="768" key="NS.object.0"/>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
- <integer value="3000" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <nil key="IBDocument.LastKnownRelativeProjectPath"/>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">117</string>
- </data>
-</archive>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" variant="6xAndEarlier" propertyAccessControl="none">
+ <dependencies>
+ <deployment version="768" identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
+ </dependencies>
+ <objects>
+ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BrowsersHome">
+ <connections>
+ <outlet property="btnInteractivity" destination="12" id="13"/>
+ <outlet property="btnLocalBrowser" destination="9" id="10"/>
+ <outlet property="btnWebBrowser" destination="8" id="11"/>
+ <outlet property="view" destination="1" id="7"/>
+ </connections>
+ </placeholder>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+ <view contentMode="scaleToFill" id="1">
+ <rect key="frame" x="0.0" y="64" width="320" height="416"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="8">
+ <rect key="frame" x="20" y="20" width="280" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <inset key="insetFor6xAndEarlier" minX="0.0" minY="64" maxX="0.0" maxY="-64"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
+ <state key="normal" title="Web Browser">
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="9">
+ <rect key="frame" x="20" y="65" width="280" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <inset key="insetFor6xAndEarlier" minX="0.0" minY="64" maxX="0.0" maxY="-64"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
+ <state key="normal" title="Local Content Browser">
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="12">
+ <rect key="frame" x="20" y="110" width="280" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <inset key="insetFor6xAndEarlier" minX="0.0" minY="64" maxX="0.0" maxY="-64"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
+ <state key="normal" title="Interacting with the Web View">
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ </button>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
+ <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
+ </view>
+ </objects>
+</document>
View
322 ContentControls/iOSContentControls/Screens/iPhone/Browsers/InteractiveBrowser.xib
@@ -1,280 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">117</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBProxyObject" id="372490531">
- <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBProxyObject" id="711762367">
- <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="191373211">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUIWebView" id="677529630">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrameSize">{320, 309}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MSAxIDEAA</bytes>
- </object>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIDataDetectorTypes">1</int>
- <bool key="IBUIDetectsPhoneNumbers">YES</bool>
- </object>
- <object class="IBUIButton" id="323423644">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">264</int>
- <string key="NSFrame">{{20, 317}, {280, 37}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica-Bold</string>
- <double key="NSSize">15</double>
- <int key="NSfFlags">16</int>
- </object>
- <int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Run Script</string>
- <object class="NSColor" key="IBUIHighlightedTitleColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <object class="NSColor" key="IBUINormalTitleShadowColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
- </object>
- <string key="NSFrameSize">{320, 367}</string>
- <reference key="NSSuperview"/>
- <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>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
- <object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics">
- <bool key="IBUIPrompted">NO</bool>
- </object>
- <object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">view</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="191373211"/>
- </object>
- <int key="connectionID">7</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">btnRunScript</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="323423644"/>
- </object>
- <int key="connectionID">10</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">webMain</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="677529630"/>
- </object>
- <int key="connectionID">11</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1</int>
- <reference key="object" ref="191373211"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="677529630"/>
- <reference ref="323423644"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="372490531"/>
- <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="711762367"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">8</int>
- <reference key="object" ref="677529630"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">9</int>
- <reference key="object" ref="323423644"/>
- <reference key="parent" ref="191373211"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>-1.CustomClassName</string>
- <string>-2.CustomClassName</string>
- <string>1.IBEditorWindowLastContentRect</string>
- <string>1.IBPluginDependency</string>
- <string>8.IBPluginDependency</string>
- <string>9.IBPluginDependency</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>InteractiveBrowser</string>
- <string>UIResponder</string>
- <string>{{461, 346}, {320, 480}}</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">11</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">InteractiveBrowser</string>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>btnRunScript</string>
- <string>view</string>
- <string>webMain</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>btnRunScript</string>
- <string>view</string>
- <string>webMain</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">btnRunScript</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">view</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">webMain</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- </object>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="768" key="NS.object.0"/>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
- <integer value="3000" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <nil key="IBDocument.LastKnownRelativeProjectPath"/>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">117</string>
- </data>
-</archive>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" variant="6xAndEarlier" propertyAccessControl="none">
+ <dependencies>
+ <deployment version="768" identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
+ </dependencies>
+ <objects>
+ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="InteractiveBrowser">
+ <connections>
+ <outlet property="btnRunScript" destination="9" id="10"/>
+ <outlet property="view" destination="1" id="7"/>
+ <outlet property="webMain" destination="8" id="11"/>
+ </connections>
+ </placeholder>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+ <view contentMode="scaleToFill" id="1">
+ <rect key="frame" x="0.0" y="64" width="320" height="367"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <webView contentMode="scaleToFill" id="8">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="309"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <inset key="insetFor6xAndEarlier" minX="0.0" minY="0.0" maxX="0.0" maxY="50"/>
+ </webView>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="9">
+ <rect key="frame" x="20" y="317" width="280" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
+ <inset key="insetFor6xAndEarlier" minX="0.0" minY="-46" maxX="0.0" maxY="46"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
+ <state key="normal" title="Run Script">
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ </button>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
+ <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
+ <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
+ </view>
+ </objects>
+</document>
View
257 ContentControls/iOSContentControls/Screens/iPhone/Browsers/LocalBrowser.xib
@@ -1,227 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">117</string>
- </object>