background preloader

User Interface

Facebook Twitter

iOS 7 Tutorial Series: Auto Layout in Xcode 5. Introduction With the release of Xcode 5 and iOS 7 the need to learn, understand, and use Auto Layout become critical.

iOS 7 Tutorial Series: Auto Layout in Xcode 5

This post reviews the changes to Auto Layout in Interface Builder (IB) in Xcode 5. This article is based on my experience using Auto Layout on a very large iPad app built using Xcode 4 and examining how I would build parts of that app if I had Xcode 5 from the start. What is Auto Layout Auto Layout is a constraint-based layout system available in iOS 6.0 and above.

In iOS 6, Auto Layout was available and recommended, but not required. A welcome change to Xcode 5 is greatly enhanced control over Auto Layout in Interface Builder. Because of Xcode 4’s over-helping in IB, many developers frequently reverted two the two other ways to implement Auto Layout based views: Visual Format Language (VFL) and manually instantiating NSLayoutConstraint objects. Auto Layout uses NSLayoutConstraint objects to describe the relationship between views. Only the best iOS Apps icons. Pttrns — Mobile User Interface Patterns. Designing Mobile Apps, Where to Start? Mobile Design is an area of design that started to develop and evolve a couple of years ago.

Designing Mobile Apps, Where to Start?

With the launch of the iPhone and the App Store in 2008, the development of mobile applications started to become a more interesting market, since there was finally good mobile hardware and ecosystem. With the development of more and more mobile apps, the design of such apps started to become increasingly more important, to create a good experience to the user, while creating powerful applications. Nowadays the design and development of mobile applications is a reality, and you already know that. But if you haven’t yet hopped on the mobile design wagon, in this article you’ll be able to find what are the most important things you have to do to start designing mobile apps right away.

Know your market One of the first things you should do to prepare and inform yourself to design mobile apps, is to own a smartphone. Visual Inspiration Mobile Design Patterns Start Designing Mobile Apps Design Examples. UICollectionView custom layout tutorial. For a recent project I needed to refactor a primary view within our iPad app, so I decided to learn the ins and outs of UICollectionView (introduced in iOS 6) and I thought it would make for a good tutorial to share.

UICollectionView custom layout tutorial

My project ended up needing a custom UICollectionViewLayout which meant I needed to handle more of the layout logic than if I'd used the UICollectionViewFlowLayout that Apple provides. However, creating a custom layout allows far more design flexibility, so thats what I'll be taking you through here. We'll go through the process step-by-step, covering the major concepts of custom layout design: At the end we'll have a fully functioning photo stack layout as seen here. Even if you're interested in implementing a layout which is considerably different than the one presented here, the fundamental concepts will be quite similar. In Xcode, create a new Single View Application Change the view controller header so that it subclasses UICollectionViewController instead: What gives?

iOS Icon Reference Chart. Steipete/PSStackedView. Steipete/PSTCollectionView. NimbusKit - The iOS framework that grows only as fast as its documentation. iPhone: Forcing a UIView to reorientate. In my current iPhone application I need to force a UIView to reorientate when a certain event happens.

iPhone: Forcing a UIView to reorientate

The SDK doesn't really allow for this to happen. There's the well-known UIViewController method - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation that is called whenever the user rotates the iPhone. If you say YES to that orientation then the OS does the spade work of rotating the display and your views for you. However, you cannot manually ask to rotate the screen, so if you decide that your shouldAutorotateToInterfaceOrientation: peccadillo has changed, there's no way to tell the OS.

The blind alley There are a number of blog posts, discussions, and Stack Overflow posts that suggest you use the private setOrientation: method of the UIDevice class. It's a private API. This seems the canonical version of that method: It serves to rotate the status bar, but leaves your UIView where it is. How to make it work It's a bit unpleasant, but it works. Detecting taps and events on UIWebView – The right way - The Spoken Word. Recently, I was working on a project which required detection of tap and events on the UIWebView.

Detecting taps and events on UIWebView – The right way - The Spoken Word

We wanted to find out the HTML element on which the user taps in the UIWebView and then depending on the element tapped some action was to be performed. After some Googling, I found out the most of the users lay a transparent UIView on top of the UIWebView, re-implement the touch methods of UIResponder class (Ex: -touchesBegan:withEvent:) and then pass the events to the UIWebView. This method is explained in detail here . There are multiple problems with the method. Copy/Selection stops working on UIWebView We need to create a sub-class of UIWebView while Apple says we should not sub-class it. Mobile UI Patterns. iOS Human Interface Guidelines: Introduction.