Guía iOS: Capturar imágenes desde la cámara del iPhone

http://www.maestrosdelweb.com/editorial/guia-iphone-e-ipad-capturar-imagenes-desde-la-camara-del-iphone/

Continuando con la guía de desarrollo para iPhone e iPad en esta ocasión utilizaremos el controlador UIImagePickerController para acceder a las imágenes guardadas en el dispositivo o capturar imágenes desde un iPhone.

Arquitectura de Cocoa-Touch

Antes de entrar en detalle repasemos un poco la arquitectura utilizada por Cocoa-Touch (iOS SDK) para reconocer que elementos del framework podemos implementar según nuestras necesidades:

Esta arquitectura (Modelo-Vista-Controlador) separa los datos, interfaz de usuario y lógica de control en tres componentes como se aprecia en el gráfico. Para el caso del iOS SDK podemos ejemplificar la arquitectura de la siguiente manera : Core Data (Modelo), UIView (Vista), UIViewController (Controlador).

Sigue leyendo

UISwitch tutorial – example how to use the Switch in XCode for iPhone, sample included

http://www.xprogress.com/post-30-uiswitch-tutorial-example-how-to-use-the-switch-in-xcode-for-iphone-sample-included/

Today I’ll show you how to use UISwitch component in iPhone SDK. We will have three instances of UISwitch controlling three different components, UILabel, another UISwitch and UITextField, it is quite simple. Enjoy yourself :)

First of all, start a new project. Let’s say View-Based Application and to make everything easier to explain, call it “TutorialProject”.

Open the TutorialProjectViewController.xib file. In Interface Builder place View into the new window (Library » Cocoa Touch » Windows, Views & Bars) and place four instances of the UISwitch onto the View and one UITextField and one UILabel. Check out some of those pictures below to see where to place them.

Sigue leyendo

Sonido en botones

http://www.zenbrains.com/blog/tag/audio/

Hoy explicaré como conseguir reproducir un sonido cuando se pulsa un botón, de hecho, lo que explicaré se puede usar para muchas más cosas y no sólo para botones, ya que lo que haré será crear un SystemSoundID que se usan, entre otras cosas, para reproducir sonidos cortos (30 segundos o menos). Pero como ejemplo, usaré un botón.

Sigue leyendo

Reproducir vídeo con el MediaPlayer framework del iOS (iPhone/iPad)

http://www.zenbrains.com/blog/2010/06/reproducir-video-con-el-mediaplayer-framework-del-ios-iphoneipad/

En este artículo vamos a ver la forma más simple de reproducir vídeo en nuestras aplicaciones desde el código objecitve-c.

Para eso vamos a usar el MediaPlayer framework del iPhone. Al final del artículo podéis encontrar el link de descarga del poryecto de ejemplo.

Sigue leyendo

Using UIToolbar in Your iPhone Apps

http://www.codeproject.com/Articles/43658/How-to-Make-a-Toolbar-with-UIToolbar

Toolbars are used to present a set of functions to a user. You will see these at the bottom of iPhone apps and generally give you the option to do things like edit files, send email or take a picture. Here is an example of what a toolbar will look like in an iPhone app:

Yes-Im-Fresh.jpg

Using UIToolbar in Your iPhone Apps

Today, I am going to show you how to use UIToolbar in your iPhone apps. Essentially, what you need to do is to create an instance of UIToolbar, add buttons to it and then add the toolbar to your view. Usually, you will also need to assign actions to each toolbar button as well.

Here is video of how to use UIToolbar taken from my own code library that I ship with my ebook:

Sigue leyendo