C#

Introducing AxCrypt for iOS!

It’s finally published! AxCrypt for iOS marks the third platform for the AxCrypt software, now ranging from the Windows Desktop to the Mac and now to iPhones, iPod Touches and iPads! So what does AxCrypt for iOS bring to the table? It lets you decrypt and consume confidential information on the go! Integrating with the host operating system, AxCrypt lets you receive encrypted documents, presentations and images via the built-in Mail app and then unlock and view these files right on your device!

AxCrypt for iOS is based on the same source code as the upcoming version 2.x for Windows, and is written using Mono – the open-source, cross-platform implementation of .NET – with the additional MonoTouch SDK. For usage information, please see the App’s Help & Support page, or watch the app in action below:

[youtube=http://www.youtube.com/watch?v=NrkpF68EIF0]

The app is available today on the iTunes App Store.

Using AirPlay Mirroring to project your iOS UI to an external screen

Not only does MonoTouch allow you to write iOS apps using the ubiquitous and beautiful C# language, but did you know that it also let you control external peripherals?

Whenever a screen gets connected to your device – whether it’s connected through a cable (like TV-out) or through the wireless network (i.e. through AirPlay), an event is published onto the Notification Center. By listening to that event, you can hook that screen up to your app and start putting interesting things there – anything you’d put on your primary UI!

Before we move on, though, it’s important to understand that we as developers actually have no control over the activation of AirPlay Mirroring. Activation is completely up to the user:

Double-tap the home-button, swipe twice to the left and tap the AirPlay button: Image

in the list of available devices, pick your output device and turn the mirroring switch to on:

Image

As the user flicks the Mirroring switch to on, a notification is placed onto the Notification Centre which we can respond to:

CreateWindow then, you ask? It is responsible for hooking up an UIWindow to the external screen and resize it properly to fit its host. Once you have the window in your possession  you can use it like you’d use the default application window:

If your device is already connected to an external screen prior to executing your application, you can easily hook it up in your AppDelegate’s overload of FinishedLoading:

To incrementally test your multi-screen application, you can use the iOS Simulator’s TV-out feature, which is located at Hardware/TV Out:

Please note, however, that turning on the feature tends to shut your app down, why it’s paramount that you have that hook-up in FinishedLoading.

Have fun!

Semantic Zoom in iOS

One of the exiting new developer opportunities in Windows 8, is the semantic zoom UI design pattern.

As outlined in the Guidelines for Semantic Zoom,

Semantic Zoom is a touch-optimized technique used by Windows Store apps in Windows 8 for presenting and navigating large sets of related data or content within a single view …

To further borrow from the guidelines, this is what a Messages application could look like:

Now, if we were to do something similar in an iOS-app, we could do something like this:

  1. Create a UIViewController whose View is a UIScrollView.
  2. Configure the scroll view with a small zoom threshold, letting the zoom events swap views.

Not so bad, huh? Let’s start with creating a new Solution in MonoDevelop:

As stated in our checklist above, we will start out by creating a root view controller that inherits UIViewController and whose View is a UIScrollView. First up: Creating the controller:

To set the ViewController’s view to a UIScrollView, double-click on the SemanticZoomViewController.xib file it in your Solution Pad to open it in Xcode and then head over to the Identity inspector to set its class to UIScrollView:

Having done that, we can return to MonoDevelop to create our example views. We need an overview and a details view. Now, these views are to here to illustrate this example, so I won’t go into details on them (and, in all honestly, they don’t do much). Let’s start with the overview:

Add -> New File -> iPad View Controller -> OverviewViewController:

Add -> New File -> iPad View Controller -> DetailViewController:

With our SemanticZoomViewController and our two child controllers, we can start binding them together. Returning to MonoDevelop, let us open the SemanticViewController and add a few private fields:

 

Then, with our fields in place, we can do our magic in the ViewDidLoad method:

 

 

 

The code in ViewDidLoad uses a few helper methods to get its job done:

 

 

Now, to swap in the new view, we bring it to front, reset its zoom scale (since we don’t want optical zoom) and animate its opacity to get a nice fade-in effect:

 

And that, my friends, is all that is to it.

For a quick demonstration, see my Youtube clip:

[youtube=http://www.youtube.com/watch?v=5QvRaPbyH3s]

 Scroll to top