background preloader

UIKit

Facebook Twitter

A Springboard-Like Layout With the UICollectionView Class. This tutorial will teach you how to use the iOS 6 UICollectionView class to build a "Springboard" layout that looks and acts like the iOS Home Screen! Along the way, you'll gain a solid grasp of collection view fundamentals in order to create your own grid based layouts. Project Preview Collection View Overview Collection Views are an exciting new addition to the UIKit API in iOS 6. Because collection views are intended to be flexible, extensible and configurable, the architecture and hence API may seem to be a bit daunting at first.

Let’s start by taking a brief overview of the main classes in the collection view framework. Speaking of visual elements, besides cells there are two others: supplementary views and decoration views. The UICollectionViewLayout is not restricted to a particular type of layout, but it ships with a subclass, UICollectionViewFlowLayout, that has been designed for constructing both line and grid-based layouts. Tutorial Approach A Barebones Implementation and. Presenting PDF files by yourself « iOS Guy. When it comes to present a PDF file, the first solution that comes to mind is to use the UIWebView. And as everybody already knows, there are many ways to get weird results when displaying PDF files using the UIWebView on iPhone SDK 3.2 both in the iPad Simulator and the actual device.

There are basically three ways to avoid these results: To present the PDF file inside a HTML contentTo reload the web view when the app change it’s orientationTo write your own PDF presenter The first approach does not present the PDF file nicely. It does not scale the content accordingly to the screen size or orientation so that it fits perfectly, and we have to agree that it doesn’t feel like a native app. Using the second approach, you will be able to feel almost all the user experience that you want to, but rotating your app will cause a blank screen to appear (and lasts) until the document is fully loaded into memory again.

Let’s say that you have a document in your resources bundle. Now it is you turn! iPhone - how can I programatically scroll UIScrollView from start to end slowly. Iphone SDK dismissing Modal ViewControllers on ipad by clicking outside of it. Create custom activity indicator for your iPhone App | Seaside. Blogs - David Sinclair's blog - Announcing DSActivityView: open source for iPhone developers. Dejal Open Source David Sinclair, owner and developer of Dejal, has released the following Cocoa/Objective-C code as open source for Mac OS X and iOS. You are welcome to download and use this code, subject to the License Agreement. Read on for more information. License Agreement The Dejal open source code is released under a standard BSD license. Before downloading any of this code, please read the Dejal Open Source License page for details of attribution and more. Get a Non-Attribution License If you want or need to use the code without giving Dejal credit, non-attribution licenses are available for purchase from the Developer Store.

Donations You can use this code completely free of charge, if you give Dejal credit. Visit the Developer Store to make a donation via PayPal. Alternatively, a fun option is to send David a gift from his Amazon.com Wish List . Get In Touch! If you use this code, David wants to hear from you! Keep Up To Date DejalActivityView (iOS) Features: DejalView (iOS) (Contacts app) Matej/MBProgressHUD - GitHub. Scroll View Programming Guide for iOS: Basic Zooming Using the Pinch Gestures. UIScrollView makes supporting the pinch gestures for zooming easy. Your application specifies the zoom factors (that is how much bigger or smaller you can make the content) and you implement a single delegate method.

Taking those few steps allows your scroll view to support the pinch gestures for zooming. Supporting the Pinch Zoom Gestures The pinch-in and pinch-out zoom gestures are standard gestures that iOS application users expect to use when zooming in and out. Figure 3-1 shows examples of the pinch gestures. To support zooming, you must set a delegate for your scroll view. The delegate object must conform to the UIScrollViewDelegate protocol. To specify the amount the user can zoom, you set the values of the minimumZoomScale and maximumZoomScale properties, both of which are initially set to 1.0. Listing 3-1 The UIViewController subclass implementation of the minimum required zoom methods Zooming Programmatically Informing the Delegate that the Zoom is Finished.

Scroll View Programming Guide for iOS: Scrolling the Scroll View Content. As scrolling occurs, the scroll view tracks state using the tracking, dragging, decelerating, and zooming properties. In addition, the contentOffset property defines the point in the content that is visible at the top left of the scroll view’s bounds.. The following table describes each of the state properties: It isn’t necessary to poll these properties to determine the action in progress because the scroll view sends a detailed sequence of messages to the delegate, indicating the progress of the scrolling action.

These methods allow your application to respond as necessary. The delegate methods can query those state properties to determine why the message was received or where the scroll view currently is. The Complete Delegate Message Sequence When the user touches the screen the tracking sequence begins. If the user’s finger remains stationary and the content view responds to touch events, it should handle the touch, and the sequence is complete. UINavigationController Customization Tutorial. iPhone: change Navigation Bar title color and back button title color.

View Controller Programming Guide for iOS: iPad-Specific Controllers. Iphone - Adding a Flip View type controller in the middle of a UINavigationController hierarchy. Utiliser un RootViewController pour gérer ses vues. Bonjour tout le monde, Voici un tutoriel qui vous est proposé par HiMac ! Bonne lecture Ce tutoriel a pour objectif de vous introduire ‘la notion de RootViewController’.

Le RootViewController est une classe qui sera instanciée dès le lancement de l’application et qui ne sera jamais affichée à l’écran. [titre]1) Créer un nouveau projet xCode[/titre] Optez pour le projet de type ‘Window-based Application’ Nommez votre projet. [titre]2) Création des vues[/titre]Commençons par créer nos vues. 1. 2. Nommez là MainMenuView.m puis validez avec le bouton Finish. 3. 4.

Nommez le MainMenuViewController. 5. Créez un nouveau dossier dans Xcode en faisant un clique droit sur le fichier MonApp et sélectionnez Add puis New Group. Renommez le dossier MainMenuView.Glissez-déposez MainMenuView.h et .m ainsi que MainMenuViewController.h et .m dans ce dossier. Répétez cette séquences d’opérations pour créer de nouvelles vues. Avant de passer au chapitre suivant il nous faut régler une dernière chose.

HiMac. View Controller Programming Guide for iOS: Custom View Controllers. Temporarily disable autorotation.