tag:blogger.com,1999:blog-10311258562692200702024-02-07T13:46:11.674+01:00Promedi y sus Cosas. Dedicado a las nuevas tecnologías y la programación en general. Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.comBlogger36125tag:blogger.com,1999:blog-1031125856269220070.post-24397432747261390102015-06-16T12:23:00.000+02:002017-10-23T18:52:54.661+02:00Apple da un paso importante, cara a los Desarrolladores.<h2>
Apple unifica todas sus licencias de desarrollador en una única membresía.</h2>
<span style="text-align: center;">El pasado 8 de Junio, Apple en su WWDC nos traía un montón de novedades.</span><br />
<span style="text-align: center;">Entre otras muchas cosas nos presento a Os X 10.11 "El Capitán" , iOS 9 , WatchOS Dos , el Apple Music...</span><br />
<span style="text-align: center;"><br /></span>
<span style="text-align: center;">Pero la que mas entusiasmo a los desarrolladores fue la unificacion de las licencias.</span><br />
<br />
El nuevo programa de apple Developer, permite ahora a los desarrolladores pagar una única licencia, y poder desarrollar, probar y publicar, aplicaciones en todas sus plataformas.<br />
<br />
Recordemos que hasta este momento los desarrolladores teníamos que pagar una licencia para iOS y otra para crear aplicaciones para Mac.<br />
Y ahora ademas de estos dos también podremos desarrollar para el Apple Watch.<br />
En Europa la licencia de desarrollador cuesta 99€.<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqjyfEWpXSR8CBl6UwwCkXPHdBbLOgQkWCFgKDKbYwCiy8YGCLN8vuFQZ8xe1SHnoweu0y4lYWTvj-iF-_1GfQNz57xBbMJ0Br5_K8UxdaQ1UFC7DvdYaY0P74N-n43WgsHO1r6aogMEg/s1600/Captura+de+pantalla+2015-06-16+a+las+11.31.34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqjyfEWpXSR8CBl6UwwCkXPHdBbLOgQkWCFgKDKbYwCiy8YGCLN8vuFQZ8xe1SHnoweu0y4lYWTvj-iF-_1GfQNz57xBbMJ0Br5_K8UxdaQ1UFC7DvdYaY0P74N-n43WgsHO1r6aogMEg/s320/Captura+de+pantalla+2015-06-16+a+las+11.31.34.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Esta es una nueva posibilidad que nos brinda Apple , permite a los desarrolladores, crear aplicaciones para Mac OS X - iOS y WatchOS.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Con ello se abre un amplio abanico de posibilidades a todos los que como a mi nos encanta experimentar y probar cosas nuevas.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Creo que es un buen avance, y que era necesario para acercar el mundo de la programación a mas usuarios.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Otra de las novedades presentadas es la posibilidad que tienen ahora los desarrolladores de probar sus aplicaciones en sus dispositivos sin tener que pagar la licencia de desarrollador, cosa que antes era imposible.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJi8bAnyD6CjIUIvOu3aMgxdNAw_UbRrcyyBimgVE9sqbHYllR02JqUao8krbytFA1bw9GamSp5xKtEI-w-X-Sy2ASXYX5_IgW2JUPnPsvEI4MggeMMkd3xi6zRYhIV28le6O8Z8qmrTc/s1600/Captura+de+pantalla+2015-06-16+a+las+11.45.46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJi8bAnyD6CjIUIvOu3aMgxdNAw_UbRrcyyBimgVE9sqbHYllR02JqUao8krbytFA1bw9GamSp5xKtEI-w-X-Sy2ASXYX5_IgW2JUPnPsvEI4MggeMMkd3xi6zRYhIV28le6O8Z8qmrTc/s320/Captura+de+pantalla+2015-06-16+a+las+11.45.46.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Fuente: Apple Developer</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-72123016402023140252014-08-03T16:22:00.000+02:002014-08-03T16:24:45.394+02:00"Chuleta" Con referencia de imprescindible sobre SWIFT.<div style="text-align: center;">
<span style="color: orange; font-size: large;">"Chuleta" Con referencias de imprescindibles sobre SWIFT.</span></div>
<div style="text-align: center;">
<span style="color: orange; font-size: large;"><br /></span></div>
<div style="text-align: center;">
<span style="color: orange; font-size: large;"><br /></span></div>
<div style="text-align: center;">
Siempre es bueno tener a mano una "chuleta" con el uso mas cotidiano de de cualquier lenguaje de programación y desde luego Swift no va a ser menos.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Mi consejo es descargarla e imprimirla y tenerla siempre cerca.. nunca se sabe cuando se pueda necesitar.</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuUMU4-nMTxdjzaFF5d8IX-G59R1NN-bl-BEMt7pA-vJHRC81S3lvCZC7fENDxePGnsn9CU0Lfub4pBSJ7kYaPWYQsMbcY9wPAgM3YwcflR4EwSUh2mwiPxGgr10V8Qy14UcsszjHHXAA/s1600/SwiftPromedi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuUMU4-nMTxdjzaFF5d8IX-G59R1NN-bl-BEMt7pA-vJHRC81S3lvCZC7fENDxePGnsn9CU0Lfub4pBSJ7kYaPWYQsMbcY9wPAgM3YwcflR4EwSUh2mwiPxGgr10V8Qy14UcsszjHHXAA/s1600/SwiftPromedi.png" height="200" width="200" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;">Swift es un </span>lenguaje de programación<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> creado por </span><a href="http://store.apple.com/es?afid=p219%7CGOES&cid=AOS-ES-KWG-GO_ES_Apple_Sitelinks-IO-1f5641a9-af16-4e03-a2ac-ed06a85e7f4f%7C177175159">Apple</a><span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> con el compilador </span>LLVM<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> para los sistemas operativos </span>OS X<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> e </span>iOS,<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> presentado el </span>2 de junio<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> del </span>2014<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> en el </span>WWDC 2014.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> El lenguaje en un principio coexistirá con </span>Objective-C,<span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22px; text-align: start;"> lenguaje que maneja la plataforma de programación oficial de Apple </span>Xcode.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
La sensación que tenemos es que terminara suplantando a Objective C.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Así que, mi consejo es que entremos de lleno en este fabuloso lenguaje y intentemos aprenderlo pues se trata de un potente y a la vez sencillo lenguaje de programación.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Su sintaxis es mucho mas clara y sencilla que su antecesor Objective C.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Bueno, pues sin mas dilación les dejo esta "Chuleta-Swift".</div>
<div style="text-align: center;">
Espero les guste y les sirva para algo.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
se agradecen comentarios.</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPSt2xTR0d8A5jOwvXfLi6Rik-LcaDO-fKRU76x701vmKIFJ2RnHi_5bWt2wihyKK21qnVCRaPb6dWiswb08Xjupa6IVSTnMD_Tx1Fe-g_6VTqngcPNJsCSkcghBlQYb7yD9cnyHYlJFA/s1600/SwifImprescindiblesDos-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPSt2xTR0d8A5jOwvXfLi6Rik-LcaDO-fKRU76x701vmKIFJ2RnHi_5bWt2wihyKK21qnVCRaPb6dWiswb08Xjupa6IVSTnMD_Tx1Fe-g_6VTqngcPNJsCSkcghBlQYb7yD9cnyHYlJFA/s1600/SwifImprescindiblesDos-1.jpg" height="451" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com1tag:blogger.com,1999:blog-1031125856269220070.post-61173785980711710652014-06-22T23:24:00.000+02:002014-06-22T23:24:03.149+02:00USO DE UIACTIVITY INDICATOR VIEW CON SWIFT.<div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span lang="ES" style="font-size: 16.0pt; mso-ansi-language: ES; mso-no-proof: yes; text-transform: uppercase;"><!--[if gte vml 1]><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Imagen_x0020_1" o:spid="_x0000_i1027" type="#_x0000_t75"
style='width:69pt;height:69pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file://localhost/Users/Promedi/Library/Caches/TemporaryItems/msoclip/0clip_image001.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span></b><b style="mso-bidi-font-weight: normal;"><span style="font-size: 16.0pt; mso-effects-reflection-align: bottomleft; mso-effects-reflection-angdirection: 5400000; mso-effects-reflection-angfadedirection: 5400000; mso-effects-reflection-anglekx: 0; mso-effects-reflection-angleky: 0; mso-effects-reflection-dpidistance: .079pt; mso-effects-reflection-dpiradius: 1.0pt; mso-effects-reflection-pctalphaend: 0%; mso-effects-reflection-pctalphastart: 28.0%; mso-effects-reflection-pctendpos: 45.0%; mso-effects-reflection-pctstartpos: 0%; mso-effects-reflection-pctsx: 100.0%; mso-effects-reflection-pctsy: -100.0%; mso-style-textfill-fill-gradientfill-shade-linearshade-angle: 5400000; mso-style-textfill-fill-gradientfill-shade-linearshade-fscaled: no; mso-style-textfill-fill-gradientfill-shadetype: linear; mso-style-textfill-fill-gradientfill-stoplist: "0 \#381563 7 100000 shade=20000 satm=245000\,43000 \#7B34D2 7 100000 satm=255000\,48000 \#7230C3 7 100000 shade=85000 satm=255000\,100000 \#381563 7 100000 shade=20000 satm=245000"; mso-style-textfill-type: gradient; mso-style-textoutline-fill-alpha: 100.0%; mso-style-textoutline-fill-color: #5C437A; mso-style-textoutline-fill-colortransforms: "shade=50000 satm=120000"; mso-style-textoutline-fill-themecolor: accent4; mso-style-textoutline-outlinestyle-align: center; mso-style-textoutline-outlinestyle-compound: simple; mso-style-textoutline-outlinestyle-dash: solid; mso-style-textoutline-outlinestyle-dpiwidth: .709pt; mso-style-textoutline-outlinestyle-join: round; mso-style-textoutline-outlinestyle-linecap: flat; mso-style-textoutline-outlinestyle-pctmiterlimit: 0%; mso-style-textoutline-type: solid; text-transform: uppercase;"><o:p></o:p></span></b></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="mso-bidi-font-weight: normal;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_KILJFwGCNgwA7Kbj-jpkpLv1h3VL2GCQUr1YSU0dLA-uNPMCHC2IS1978rJjVliPJatMtjlQeX1zWcjhTlsNhEMeoXGdpw1ijMe0tkFpE1HyuuFE44iRIKvSu8jSMBC6Q49QA25ue7I/s1600/SwiftPromedi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_KILJFwGCNgwA7Kbj-jpkpLv1h3VL2GCQUr1YSU0dLA-uNPMCHC2IS1978rJjVliPJatMtjlQeX1zWcjhTlsNhEMeoXGdpw1ijMe0tkFpE1HyuuFE44iRIKvSu8jSMBC6Q49QA25ue7I/s1600/SwiftPromedi.png" height="200" width="200" /></a></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<b style="mso-bidi-font-weight: normal;"><br /></b></div>
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<span style="font-size: 16pt; text-transform: uppercase;"><span style="color: orange;"><b><u>Uso de UIActivity indicator view
con swift</u></b></span><b><o:p></o:p></b></span></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 14.0pt;">Creamos el IBOutlet :<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: 'Menlo Regular';">@IBOutlet</span><span lang="ES" style="color: black; font-family: 'Menlo Regular';"> </span><span lang="ES" style="color: #b40062; font-family: 'Menlo Regular';">var</span><span lang="ES" style="color: black; font-family: 'Menlo Regular';">
uiactivity: </span></span><span lang="ES" style="color: #4d009e; font-family: 'Menlo Regular';"><span style="font-size: large;">UIActivityIndicatorView</span><span style="font-size: medium;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Una vez arrastrado el<span style="mso-spacerun: yes;"> </span>objeto al
Storyboard y creada la conexión con el IBOutlet, creamos las funciones que
necesitemos para hacer funcionar nuestro objeto.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Elegimos el estilo de nuestro objeto:<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Esta opción nos muestra un activity indicator<span style="mso-spacerun: yes;"> </span>de color blanco y grande:<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">self</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">activityIndicatorViewStyle</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> = .</span></span><span lang="ES" style="color: #2e0d6e; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;">WhiteLarge</span><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Esta línea<span style="mso-spacerun: yes;"> </span>mostraría el activity
indicator pequeño y blanco:<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">self</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">activityIndicatorViewStyle</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> = .</span></span><span lang="ES" style="color: #2e0d6e; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;">White</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Esta mostraría el activity indicator pequeño y negro, todas estas opciones
podemos definirlas también desde el inspector de atributos del Xcode.<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;">
</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">s<span style="font-size: large;">elf</span></span><span style="font-size: large;"><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">activityIndicatorViewStyle</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> = .</span></span><span lang="ES" style="color: #2e0d6e; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;">Gray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Con esta función<span style="mso-spacerun: yes;"> </span>y usando
startAnimating, iniciamos la animación:<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">func</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> empezarAnimacion()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;"> </span></span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #2e0d6e; font-family: "Menlo Regular"; mso-ansi-language: ES;">startAnimating</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;"><span style="font-size: large;"> </span></span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; font-size: 14.0pt; mso-ansi-language: ES;">Asi podemos cambiar el color:<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">func</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> cambiarcolor()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;">
</span></span><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">self</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">color</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> = </span><span lang="ES" style="color: #4d009e; font-family: "Menlo Regular"; mso-ansi-language: ES;">UIColor</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.greenColor()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>}</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span lang="ES" style="font-size: 14.0pt; mso-ansi-language: ES;">Para ocultarlo o mostrarlo usaremos:<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;"> </span></span><span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">func</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> ocultarActivity()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;"> </span></span><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">self</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">hidesWhenStopped</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> = </span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">true </span><span lang="ES" style="color: #76923c; font-family: "Menlo Regular"; mso-ansi-language: ES; mso-themecolor: accent3; mso-themeshade: 191;">//lo oculta</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;"> </span>self</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">hidesWhenStopped</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> =
</span><span lang="ES" style="color: #5c2699; font-family: "Menlo Regular"; mso-ansi-language: ES;">false </span><span lang="ES" style="color: #76923c; font-family: "Menlo Regular"; mso-ansi-language: ES; mso-themecolor: accent3; mso-themeshade: 191;">//lo
muestra</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>}</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;">Así detendríamos la animación:</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;"> </span></span><span style="font-size: large;"><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">func</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"> detieneActivity()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span style="font-size: large;"><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="mso-spacerun: yes;">
</span></span><span lang="ES" style="color: #b40062; font-family: "Menlo Regular"; mso-ansi-language: ES;">self</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #448993; font-family: "Menlo Regular"; mso-ansi-language: ES;">uiactivity</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">.</span><span lang="ES" style="color: #2e0d6e; font-family: "Menlo Regular"; mso-ansi-language: ES;">stopAnimating</span><span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;">()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 43.3pt; text-autospace: none;">
<span lang="ES" style="color: black; font-family: "Menlo Regular"; mso-ansi-language: ES;"><span style="font-size: large;"><span style="mso-spacerun: yes;"> </span>}</span><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWoj-jLRTxPzheTG8GrEn_7TbycLPtGy8k9ZXal3XWFDc7CT3y-XHmVwXsLw9qwePIq1jcLyXML3UdVjywD70R7mM9Q3e_DyNxlYVqCfvtMq_PWDAZyH3tFERx4aNakpJlzmPJ1eYckVs/s1600/Captura+de+pantalla+2014-06-22+a+la%2528s%2529+22.01.38.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWoj-jLRTxPzheTG8GrEn_7TbycLPtGy8k9ZXal3XWFDc7CT3y-XHmVwXsLw9qwePIq1jcLyXML3UdVjywD70R7mM9Q3e_DyNxlYVqCfvtMq_PWDAZyH3tFERx4aNakpJlzmPJ1eYckVs/s1600/Captura+de+pantalla+2014-06-22+a+la%2528s%2529+22.01.38.png" height="276" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmqAg3M9IJ93ZAOUAAsPaS9Zvymxoqqg3RkM1xa4JE0gGGQzr1i_JA48sp2PrryfTHse6A5QwzVaVYnGiuLB5qBYl67aXCF1KPs3qlLzDS2PLqZHi7UNPVhRKTFNMaN3RvAE-ONP2l7BM/s1600/Captura+de+pantalla+2014-06-22+a+la%2528s%2529+22.01.49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmqAg3M9IJ93ZAOUAAsPaS9Zvymxoqqg3RkM1xa4JE0gGGQzr1i_JA48sp2PrryfTHse6A5QwzVaVYnGiuLB5qBYl67aXCF1KPs3qlLzDS2PLqZHi7UNPVhRKTFNMaN3RvAE-ONP2l7BM/s1600/Captura+de+pantalla+2014-06-22+a+la%2528s%2529+22.01.49.png" height="270" width="320" /></a></div>
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span lang="ES" style="font-size: 16.0pt; mso-ansi-language: ES; mso-no-proof: yes; text-transform: uppercase;"><!--[if gte vml 1]><v:shape id="Imagen_x0020_3"
o:spid="_x0000_i1026" type="#_x0000_t75" style='width:140pt;height:119pt;
visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file://localhost/Users/Promedi/Library/Caches/TemporaryItems/msoclip/0clip_image003.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span></b><b style="mso-bidi-font-weight: normal;"><span style="font-size: 16.0pt; mso-effects-reflection-align: bottomleft; mso-effects-reflection-angdirection: 5400000; mso-effects-reflection-angfadedirection: 5400000; mso-effects-reflection-anglekx: 0; mso-effects-reflection-angleky: 0; mso-effects-reflection-dpidistance: .079pt; mso-effects-reflection-dpiradius: 1.0pt; mso-effects-reflection-pctalphaend: 0%; mso-effects-reflection-pctalphastart: 28.0%; mso-effects-reflection-pctendpos: 45.0%; mso-effects-reflection-pctstartpos: 0%; mso-effects-reflection-pctsx: 100.0%; mso-effects-reflection-pctsy: -100.0%; mso-style-textfill-fill-gradientfill-shade-linearshade-angle: 5400000; mso-style-textfill-fill-gradientfill-shade-linearshade-fscaled: no; mso-style-textfill-fill-gradientfill-shadetype: linear; mso-style-textfill-fill-gradientfill-stoplist: "0 \#381563 7 100000 shade=20000 satm=245000\,43000 \#7B34D2 7 100000 satm=255000\,48000 \#7230C3 7 100000 shade=85000 satm=255000\,100000 \#381563 7 100000 shade=20000 satm=245000"; mso-style-textfill-type: gradient; mso-style-textoutline-fill-alpha: 100.0%; mso-style-textoutline-fill-color: #5C437A; mso-style-textoutline-fill-colortransforms: "shade=50000 satm=120000"; mso-style-textoutline-fill-themecolor: accent4; mso-style-textoutline-outlinestyle-align: center; mso-style-textoutline-outlinestyle-compound: simple; mso-style-textoutline-outlinestyle-dash: solid; mso-style-textoutline-outlinestyle-dpiwidth: .709pt; mso-style-textoutline-outlinestyle-join: round; mso-style-textoutline-outlinestyle-linecap: flat; mso-style-textoutline-outlinestyle-pctmiterlimit: 0%; mso-style-textoutline-type: solid; text-transform: uppercase;"><span style="mso-spacerun: yes;"> </span></span></b><b style="mso-bidi-font-weight: normal;"><span lang="ES" style="font-size: 16.0pt; mso-ansi-language: ES; mso-no-proof: yes; text-transform: uppercase;"><!--[if gte vml 1]><v:shape id="Imagen_x0020_2"
o:spid="_x0000_i1025" type="#_x0000_t75" style='width:136pt;height:118pt;
visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file://localhost/Users/Promedi/Library/Caches/TemporaryItems/msoclip/0clip_image005.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span></b><b style="mso-bidi-font-weight: normal;"><span style="font-size: 16.0pt; mso-effects-reflection-align: bottomleft; mso-effects-reflection-angdirection: 5400000; mso-effects-reflection-angfadedirection: 5400000; mso-effects-reflection-anglekx: 0; mso-effects-reflection-angleky: 0; mso-effects-reflection-dpidistance: .079pt; mso-effects-reflection-dpiradius: 1.0pt; mso-effects-reflection-pctalphaend: 0%; mso-effects-reflection-pctalphastart: 28.0%; mso-effects-reflection-pctendpos: 45.0%; mso-effects-reflection-pctstartpos: 0%; mso-effects-reflection-pctsx: 100.0%; mso-effects-reflection-pctsy: -100.0%; mso-style-textfill-fill-gradientfill-shade-linearshade-angle: 5400000; mso-style-textfill-fill-gradientfill-shade-linearshade-fscaled: no; mso-style-textfill-fill-gradientfill-shadetype: linear; mso-style-textfill-fill-gradientfill-stoplist: "0 \#381563 7 100000 shade=20000 satm=245000\,43000 \#7B34D2 7 100000 satm=255000\,48000 \#7230C3 7 100000 shade=85000 satm=255000\,100000 \#381563 7 100000 shade=20000 satm=245000"; mso-style-textfill-type: gradient; mso-style-textoutline-fill-alpha: 100.0%; mso-style-textoutline-fill-color: #5C437A; mso-style-textoutline-fill-colortransforms: "shade=50000 satm=120000"; mso-style-textoutline-fill-themecolor: accent4; mso-style-textoutline-outlinestyle-align: center; mso-style-textoutline-outlinestyle-compound: simple; mso-style-textoutline-outlinestyle-dash: solid; mso-style-textoutline-outlinestyle-dpiwidth: .709pt; mso-style-textoutline-outlinestyle-join: round; mso-style-textoutline-outlinestyle-linecap: flat; mso-style-textoutline-outlinestyle-pctmiterlimit: 0%; mso-style-textoutline-type: solid; text-transform: uppercase;"><o:p></o:p></span></b></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<h3>
Espero les guste, seguire añadiendo mas cosas sobre swift.</h3>
<h1>
<o:p></o:p></h1>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="mailto:promedi@gmail.com">promedi@gmail.com</a><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div style="text-align: center;">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>ES-TRAD</w:LidThemeOther>
<w:LidThemeAsian>JA</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="276">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabla normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:Cambria;
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->
<!--StartFragment-->
<!--EndFragment--></div>
<div class="MsoNormal">
@promedi46<span style="mso-spacerun: yes;"> </span>-2014-<o:p></o:p></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-62307009344390220422014-06-15T11:59:00.000+02:002014-06-15T11:59:35.410+02:00Creación de Alertas y ActionSheet con Swift.<div style="text-align: center;">
<span style="color: #b45f06; font-size: x-large;"><u>Creación de Alertas y ActionSheet con Swift.</u></span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="font-size: large;">En esta ocasión, vamos a ver como crear alertas sencillas y actionSheet, usando el nuevo lenguaje de programación presentado por Apple en la ultima WWDC.</span></div>
<div style="text-align: center;">
<span style="font-size: large;">Swift difiere un poco respecto a Objective C.</span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="color: #b45f06; font-size: x-large;"><u><br /></u></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrXF5A3_xD0MQqYa01_ECX-rE-2eLBlg-iRkg-fFOXrZXNw4Mu5onDMz0ZAn3SMXm1QNXaS0fZ5DF2zhKOSRObP1-0dh53g8fQlQSI_gV1zNBKflD55BtSnNQ7AdzBHNiAiRPju-c_vv0/s1600/Captura+de+pantalla+2014-06-15+a+la(s)+10.24.19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrXF5A3_xD0MQqYa01_ECX-rE-2eLBlg-iRkg-fFOXrZXNw4Mu5onDMz0ZAn3SMXm1QNXaS0fZ5DF2zhKOSRObP1-0dh53g8fQlQSI_gV1zNBKflD55BtSnNQ7AdzBHNiAiRPju-c_vv0/s1600/Captura+de+pantalla+2014-06-15+a+la(s)+10.24.19.png" height="400" width="220" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;">Para crear una alerta sencilla usamos el siguiente código:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> alertaDos = <span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertController</span>(title: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Titulo"</span>, message: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Cuerpo del mensaje"</span>, preferredStyle: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">UIAlertControllerStyle</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">Alert</span>)</div>
<div style="font-family: Menlo; font-size: 18px;">
<span style="color: #6aa84f;"><br /></span></div>
<span style="color: #6aa84f;"><span style="font-family: Menlo; font-size: medium;">//Ahora es mucho mas sencillo, y podemos añadir nuevos botones y usar handler para capturar el botón seleccionado y hacer algo.</span></span><br />
<br />
<div style="font-family: Menlo; font-size: 18px;">
alertaDos.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">addAction</span>(<span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertAction</span>(title: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Salir"</span> , style: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">UIAlertActionStyle</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">Cancel</span> ,handler: {alerAction <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span></div>
<div style="color: #c91b13; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Pulsado el boton de Salir"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 18px;">
}))</div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<span style="color: #6aa84f; font-family: Menlo; font-size: 18px;">//Para hacer que la alerta se muestre usamos presentViewController, a diferencia de Objective C que como recordaremos se </span><span style="color: #6aa84f; font-family: Menlo; font-size: medium;">usa [Show Alerta]</span><br />
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="font-family: Menlo; font-size: 18px;">
<span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">self</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">presentViewController</span>(alertaDos, animated: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">true</span>, completion: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">nil</span>)</div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<b>Esto nos muestra este tipo de alerta y al pulsar en el botón "Salir" No</b>s mues<b>tra por consola: Pulsado el botón de Salir. </b></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyB1J3PNIG-MVfOJa5fEPyuyEC1uhyphenhyphenkq3CjehsvqY72Lcwj1FvOuxweoNlF54z4l_bGqh4IOohNJ1rDTgAdQq2gkZTKY2nL2s00lUTPI-FMTA-MBr-BhKhPyQrRZQvwmlaF8uyL8jKhm4/s1600/Captura+de+pantalla+2014-06-15+a+la(s)+10.24.35.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyB1J3PNIG-MVfOJa5fEPyuyEC1uhyphenhyphenkq3CjehsvqY72Lcwj1FvOuxweoNlF54z4l_bGqh4IOohNJ1rDTgAdQq2gkZTKY2nL2s00lUTPI-FMTA-MBr-BhKhPyQrRZQvwmlaF8uyL8jKhm4/s1600/Captura+de+pantalla+2014-06-15+a+la(s)+10.24.35.png" height="400" width="220" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b><span style="font-size: large;">Alerta ActionSheet:</span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><span style="font-size: large;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;">Este tipo de alerta que aparece de forma modal desde abajo hacia arriba, el código necesario en Swift es el siguiente:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Menlo; font-size: 18px;">
<span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> action : <span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertController</span> = <span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertController</span>(title: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Alerta"</span>, message: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Seleciona un Valor"</span>, preferredStyle: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">UIAlertControllerStyle</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">ActionSheet</span>)</div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="text-align: left;">
<span style="color: #38761d;"><span style="font-family: Menlo; font-size: medium;">//Al igual que en la alerta normal con addAction añadimos nuevos botones y con handler capturamos el botón pulsado por el usuario y hacemos algo.</span></span></div>
<div style="font-family: Menlo; font-size: 18px;">
action.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">addAction</span>(<span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertAction</span>(title: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Valor 1"</span>, style: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">UIAlertActionStyle</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">Default</span>, handler: { alertAction <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span></div>
<div style="color: #c91b13; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Click en Valor 1"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> action.</span>dismissModalViewControllerAnimated<span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">true</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">);</span></div>
<div style="font-family: Menlo; font-size: 18px;">
}))</div>
<div style="font-family: Menlo; font-size: 18px;">
<br /></div>
<div style="min-height: 21px;">
<span style="font-family: Menlo; font-size: medium;"> </span><span style="color: #38761d;"><span style="font-family: Menlo; font-size: medium;">//Con UIAlertActionStyle podemos elegir el tipo de botón que vamos a usar en este caso usamos Destructive que nos mostraría el texto del botón en rojo.</span></span></div>
<div style="font-family: Menlo; font-size: 18px;">
action.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">addAction</span>(<span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertAction</span>(title: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Valor 2"</span>, style: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">UIAlertActionStyle</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">Destructive</span>, handler: { alertAction <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span></div>
<div style="color: #c91b13; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Click en Valor 2"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> action.</span>dismissModalViewControllerAnimated<span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">true</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">);</span></div>
<div style="font-family: Menlo; font-size: 18px;">
}))</div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
</div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
action.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">addAction</span>(<span style="color: #6122ae; font-variant-ligatures: no-common-ligatures;">UIAlertAction</span>(title: <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Cancelar"</span>, style: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">UIAlertActionStyle</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">Cancel</span>, handler: {alertAction <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span></div>
<div style="color: #c91b13; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Click en Cancelar"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 18px;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> action.</span>dismissModalViewControllerAnimated<span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">true</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">);</span></div>
<div style="font-family: Menlo; font-size: 18px;">
}))</div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
</div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="font-family: Menlo; font-size: 18px;">
<span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">self</span>.<span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">presentViewController</span>(action, animated: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">true</span>, completion: <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">nil</span>)</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM_kGFbEDEtBtRX9HXgQJaYbZTZh-q8dbDzMt0p2Vb86-dx8EMXjeK9XDHeh83njn3_yZXK7RlzdkpPacN1NSxiAiRyWo3xuzOGj_YwJwhB4LoyVrZ6zg4NScyme58wLfHVRQ-_P33wDI/s1600/Captura+de+pantalla+2014-06-15+a+la(s)+10.24.49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM_kGFbEDEtBtRX9HXgQJaYbZTZh-q8dbDzMt0p2Vb86-dx8EMXjeK9XDHeh83njn3_yZXK7RlzdkpPacN1NSxiAiRyWo3xuzOGj_YwJwhB4LoyVrZ6zg4NScyme58wLfHVRQ-_P33wDI/s1600/Captura+de+pantalla+2014-06-15+a+la(s)+10.24.49.png" height="400" width="218" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;">Espero les guste, proximamente seguiré añadiendo mas cosas sobre Swift.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;">Saludos y espero sus sugerencias.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><a href="mailto:promedi@gmail.com">promedi@gmail.com</a></span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;">@promedi46</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
<br />
<div style="text-align: center;">
<span style="color: #b45f06; font-size: x-large;"><u><br /></u></span></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-55549705361663788572014-06-10T21:45:00.001+02:002014-06-10T21:45:45.231+02:00Conceptos basicos , sobre Swift<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuXRrZQ6Aqrkast2rw532SOVngcXacotqA6CXj9xjQUAgHAfO7fUIjCf5SFzjVmBLfO7_psQ4PwfkCVp-qik3orXt7ztFaDnzhU_U6o4nFvJrnvgugKcfhsValzHGKVBbejFl2SAhGE08/s1600/SwiftPromedi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuXRrZQ6Aqrkast2rw532SOVngcXacotqA6CXj9xjQUAgHAfO7fUIjCf5SFzjVmBLfO7_psQ4PwfkCVp-qik3orXt7ztFaDnzhU_U6o4nFvJrnvgugKcfhsValzHGKVBbejFl2SAhGE08/s1600/SwiftPromedi.png" height="320" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b><span style="color: #333333; font-family: Tahoma, Arial, Verdana, sans-serif;"><span style="background-color: white;"><span style="line-height: 19px;">Swift, el nuevo lenguaje de programación que Apple nos </span></span></span><span style="background-color: white; color: #333333; font-family: Tahoma, Arial, Verdana, sans-serif; line-height: 19px;">presento, el día dos en la WWDC 2014.</span></b><br />
<b><span style="background-color: white; color: #333333; font-family: Tahoma, Arial, Verdana, sans-serif; line-height: 19px;"><br /></span></b>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRq4mJz3cWfVupiIML9PiJbTZ-QAzOAgYHx0PW4umSlBM-uAQqKhwKfyrxu8bA3w1FGMxGwrf13l-k53x_T9xXdS3Av3v7IXyVVOy5LVNn-zX44XvP-dzKnJpbUvbp5HrKOXn482z8kDA/s1600/Swift.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRq4mJz3cWfVupiIML9PiJbTZ-QAzOAgYHx0PW4umSlBM-uAQqKhwKfyrxu8bA3w1FGMxGwrf13l-k53x_T9xXdS3Av3v7IXyVVOy5LVNn-zX44XvP-dzKnJpbUvbp5HrKOXn482z8kDA/s1600/Swift.jpg" height="163" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Hola amigos, como de todos es sabido, el día dos de Junio y como colofón a la presentación de iOS 8 y de OS X Yosemite, Apple nos presentaba su nuevo lenguaje de programación llamado Swift.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Swift esta disponible para desarrolladores a través de Xcode 6, y tras unos días dándole un vistazo creo que los días de Objective C están contados.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Swift a venido para quedarse y aunque el nuevo Xcode 6, permite elegir el lenguaje deseado, dándonos la posibilidad de elegir el lenguaje que queremos usar, y que podemos elegir a la hora de crear nuestro proyecto.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC-uWtCnPUvmxyF0nzwNh86F2cuqOBZ1DGy4VCB4JvrLLndbfyS0_ILjt34G_UT7MvJC5rwKAJiPYZKVPkvyFfmLW4Ky4Lzt20IggyNNvVnW7RlRaSJLhMinrIyc-gGIOwW0LU-d0ACjo/s1600/Captura+de+pantalla+2014-06-10+a+la(s)+21.13.27.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC-uWtCnPUvmxyF0nzwNh86F2cuqOBZ1DGy4VCB4JvrLLndbfyS0_ILjt34G_UT7MvJC5rwKAJiPYZKVPkvyFfmLW4Ky4Lzt20IggyNNvVnW7RlRaSJLhMinrIyc-gGIOwW0LU-d0ACjo/s1600/Captura+de+pantalla+2014-06-10+a+la(s)+21.13.27.png" height="190" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Lo cierto es que con lo poco que he podido ver, estoy encantado y me gusta bastante.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Apple, ha puesto un Ebook a disposición de los desarrolladores, pero en Español hay muy poca información sobre este lenguaje, así que me he permitido hacer una pequeña guia muy básica sobre el uso de Swift.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// main.swift</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// PruebasConSWift</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// Created by Francisco on 6/6/14.</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// Copyright (c) 2014 PromediDeveloper. All rights reserved.</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">import</span> Foundation</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<br /></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"> Declaración de Variables:</span></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"><br /></span></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// Con la palabra reservada "var" declaramos las variables y le asignamos un valor</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><br /></span></div>
<div style="min-height: 21px;">
<span style="color: #c32275; font-family: Menlo;">var</span><span style="font-family: Menlo; font-size: x-small;"> nombre = </span><span style="color: #c91b13; font-family: Menlo;">"Steve"</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> apellidos = <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Martinez"</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> edad = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">3</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> altura = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">1.77</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> DNI = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">4323069</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> numero = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> cadenaDeTexto = <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Cadena"</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> booleana = <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">true</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> contadorDos = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Ahora vamos a cambiar el tipo de una variable ya definida</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Altura estaba definida como Double y tenia un valor de 1.77</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> variableCambiadaDeTipo = <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span>(<span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">altura</span>)</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">variableCambiadaDeTipo</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">) </span>//Esto daria como resultado un 1</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Tambien podemos definir el tipo de variable al declararla</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> variableDefinida:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> = </span>"Variable definida de texto"</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//para declararla sin darle ningun valor tenemos que especificar su tipo</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> variableDeTexto:<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Tambien podemos poner</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> variableVacia = <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span>()</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: large;">Para declarar constantes usamos let:</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// Com la palabra reservada "let" declaramos constantes</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">let</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> constante = </span>"Mi Constante"</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">let</span> constanteNumerica = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">123.34</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"> Declaración y uso de Array:</span></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"><br /></span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Asi se declaran los array</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> ciudadesEspañolas = [</span>"Madrid"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Barcelona"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Valencia"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Bilbao"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Murcia"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Albacete"<span style="color: black; font-variant-ligatures: no-common-ligatures;">]</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">// Declaracion de un Array vacio:</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> arrayVacio=[]</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Declaracion de un array vacio pero asignando un tipo de datos</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> arrayVacioString:<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span>[]</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Tambien podemos crear un sub array con un indice de rango</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> arrayConIndice = <span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">ciudadesEspañolas</span>[<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">1</span>...<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">4</span>]</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">arrayConIndice</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">) </span>//Resultado:[Barcelona, Valencia, Bilbao, Murcia]</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//insertar elementos al array</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;">ciudadesEspañolas<span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">append</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Zaragoza"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//insertar elementos en un lugar determinado</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;">ciudadesEspañolas<span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">insert</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Oviedo"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">,atIndex: </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">3</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//borrar un elemento determinado</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;">ciudadesEspañolas<span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">removeAtIndex</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">4</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Borrar todos los elementos del array</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;">arrayConIndice<span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">removeLast</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"> Declaración de Diccionarios:</span></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"><br /></span></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Declarar un diccionario vacio</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> dicionariovacioConTipoDatosAsignado = <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Dictionary</span><<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span>,<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span>>()</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Para asignarle un tipo de datos inicial</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> diccionarioConDatosAsignados:<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Dictionary</span><<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span>,<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span>> = [<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span>:<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Cero"</span>,<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">10</span>:<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Diez"</span>,<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">20</span>:<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Veinte"</span>,<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">30</span>:<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Treinta"</span>]</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Asi se declaran los diccionarios normalmente con diferentes tipos de datos</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> diccionario = [</span>"Color"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span>"Blanco"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Peso"<span style="color: black; font-variant-ligatures: no-common-ligatures;">: </span>"70"<span style="color: black; font-variant-ligatures: no-common-ligatures;"> , </span>"Estatura"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span>"1.78"<span style="color: black; font-variant-ligatures: no-common-ligatures;">]</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> diccionarioVehiculo = [</span>"Tipo Vehiculo"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span>"Coche"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Color"<span style="color: black; font-variant-ligatures: no-common-ligatures;">: </span>"Blanco"<span style="color: black; font-variant-ligatures: no-common-ligatures;"> , </span>"Numero Asientos"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span>"Cinco"<span style="color: black; font-variant-ligatures: no-common-ligatures;">]</span></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Añadir elementos al diccionario</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">diccionario</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">updateValue</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Elche"<span style="color: black; font-variant-ligatures: no-common-ligatures;">, forKey:</span>"Ciudad"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Modificar un dicionario</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">diccionario</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">updateValue</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Modificado"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,forKey:</span>"Color"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Borrar un Elemento del diccionario</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;">diccionario<span style="color: black; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Peso"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">]=</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">nil</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//otra forma de borrar un elemento</span></div>
<div style="color: #3d1d81; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">diccionario</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span>removeValueForKey<span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Estatura"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Borrar todo el diccionario</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;">diccionario<span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">removeAll</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: large;"> Uso de For para leer Diccionarios y Array:</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: large;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Usar el for in para leer un diccionario</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">for</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> (clave,valor) </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>diccionarioVehiculo</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;">{</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span>(<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span>\(clave)<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;"> : </span>\(valor)<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span>)</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;">}</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Usar el For para leer el array</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">for</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> contador </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>ciudadesEspañolas</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span>(contador)</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">if</span> contador == <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Valencia"</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//cuando contador es igual a Valencia la imprime por consola</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"En este momento contador es igual a Valencia"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Otra forma de leer un array con el bucle for</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">for</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> (</span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> i=</span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">;i < </span>ciudadesEspañolas<span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">count</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">;i++)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>ciudadesEspañolas<span style="color: black; font-variant-ligatures: no-common-ligatures;">[i])</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>// For usando "..." para que se produzca la interacion en un rango determinado</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Nos muestra la tabla de multiplicar del 5</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">for</span> indice <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">in</span> <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span>...<span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">10</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span>(<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span>\(indice)<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;"> multiplicado por 5 es = </span>\(indice * <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">5</span>)<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span>)</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Uso del For para repetir algo hasta alcanzar un valor</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">for</span> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> i = <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span> ; i <= <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">10</span> ; i = i + <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">2</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"valor de i : <span style="color: black; font-variant-ligatures: no-common-ligatures;">\(i)</span>"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Varios usos del if y uso de: || "OR"</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">if</span> <span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">edad</span> == <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">2</span> || <span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">edad</span> == <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">3</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"La edad es igual a </span><span style="color: black; font-variant-ligatures: no-common-ligatures;">\(</span><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">edad</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span>//La edad es igual a 3</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Uso de comparador != "distinto"</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">if</span> <span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">edad</span> != <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">2</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"La edad es diferente a 2 y es </span><span style="color: black; font-variant-ligatures: no-common-ligatures;">\(</span><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">edad</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span>//La edad es diferente a 2 y es 3</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span><span style="font-size: large;">Uso de Bucles:</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>// Uso de While</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">while</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> <= </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">10</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> = </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> + </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">3</span></span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//ponemos a cero el contador para volver a usarlo</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> = </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">0</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//uso de do - While con un if y un else</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">do</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">if</span> <span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">contadorDos</span> <= <span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">30</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Estos son los numeros menores de 30 : <span style="color: black; font-variant-ligatures: no-common-ligatures;">\(</span><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">contadorDos</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span>"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }<span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">else</span> {</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Estos numeros <span style="color: black; font-variant-ligatures: no-common-ligatures;">\(</span><span style="color: #539aa4; font-variant-ligatures: no-common-ligatures;">contadorDos</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span> son mayores de 30"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> = </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> + </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">5</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">while</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>contadorDos<span style="color: black; font-variant-ligatures: no-common-ligatures;"> <= </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">60</span></span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;"><br /></span></span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;"><br /></span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: large;"> Uso de Switch:<span style="color: #0435ff;"> </span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Uso de Switch y Case</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">let</span> diaSemana = <span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Miercoles"</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #539aa4; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">switch</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>diaSemana</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">case</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>"Lunes"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span></span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"El dia de la semana es Lunes"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">case</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>"Martes"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span></span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"El día de la semana es Martes"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">case</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>"Miércoles"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span></span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"El día de la semana es Miércoles"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">case</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>"Jueves"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Viernes"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span></span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"El dia de la semana es Jueves o Viernes"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">case</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>"Sábado"<span style="color: black; font-variant-ligatures: no-common-ligatures;">,</span>"Domingo"<span style="color: black; font-variant-ligatures: no-common-ligatures;">:</span></span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"El día de la semana es Sábado o Domingo"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">default</span> :</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Esto no es un dia de la semana"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;">Creación y uso de Funciones:</span></span></div>
<div style="min-height: 21px;">
<span style="font-size: large;"><span style="font-family: Menlo;"><br /></span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Función sin Parámetros</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">func</span> imprime()</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="color: #c91b13; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span>"Esto es la llamada a la función imprime"<span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Llamada a la función sin parámetros</span></div>
<div style="color: #294c50; font-family: Menlo;">
<span style="font-size: x-small;">imprime<span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Función que recibe dos parámetros</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">func</span> funcionCoche(marca : <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span> , modelo:<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span>)</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> {</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">println</span>(<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Marca: </span>\(marca)<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;"> Modelo: </span>\(modelo)<span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"</span>)</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> }</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>//Llamada a la función con parámetros</span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #294c50; font-variant-ligatures: no-common-ligatures;">funcionCoche</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #c91b13; font-variant-ligatures: no-common-ligatures;">"Seat"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">, </span><span style="color: #0435ff; font-variant-ligatures: no-common-ligatures;">1200</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">) </span>//Esto saldría por consola: Marca: Seat Modelo: 1200</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span>// Funcion que retorna un dato</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<br /></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">func</span> funcionQueRetornaUnNumeroEntero(a : <span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span> , b :<span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span>)-><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span></span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;">{</span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">var</span> resultado = a + b</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;"> <span style="color: #c32275; font-variant-ligatures: no-common-ligatures;">return</span> resultado</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"> </span></div>
<div style="font-family: Menlo;">
<span style="font-size: x-small;">}</span></div>
<div style="font-family: Menlo; min-height: 21px;">
<span style="font-size: x-small;"><br /></span></div>
<div style="color: #1d9421; font-family: Menlo;">
<span style="font-size: x-small;">//Llamamos a la funcion y le asignamos dos numero enteros</span></div>
<div style="color: #294c50; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black;"> </span><span style="color: #3d1d81;">println</span><span style="color: black;">(</span><span style="color: #c91b13;">"Resultado de la suma: </span><span style="color: black;">\(</span>funcionQueRetornaUnNumeroEntero<span style="color: black;">(</span><span style="color: #0435ff;">34</span><span style="color: black;"> ,</span><span style="color: #0435ff;">47</span><span style="color: black;">))</span><span style="color: #c91b13;">"</span><span style="color: black;">)</span></span></div>
<div style="color: #294c50; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black;"><br /></span></span></div>
<div style="color: #294c50; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black;"><br /></span></span></div>
<div style="color: #294c50; font-family: Menlo;">
<span style="font-size: x-small;"><span style="color: black;"><br /></span></span></div>
<span style="font-family: Menlo;">Bueno Amigos, espero les les guste, en tener un poco de tiempo creare otra entrada con mas información de Swift.</span><br />
<br />
<span style="font-family: Menlo;">Saludos.</span><br />
<span style="font-family: Menlo;"><br /></span>
<span style="font-family: Menlo;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b><span style="background-color: white; color: #333333; font-family: Tahoma, Arial, Verdana, sans-serif; line-height: 19px;"><br /></span></b>
<b><span style="background-color: white; color: #333333; font-family: Tahoma, Arial, Verdana, sans-serif; line-height: 19px;"><br /></span></b>
<b><span style="background-color: white; color: #333333; font-family: Tahoma, Arial, Verdana, sans-serif; line-height: 19px;"><br /></span></b>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-40912529820797931042014-05-13T21:48:00.001+02:002018-07-25T20:54:03.959+02:00Nueva actualización de iMarca-Padel<iframe allowfullscreen="" frameborder="0" height="270" src="//www.youtube.com/embed/AaK9ZZPPCSI" width="480"></iframe>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-60554261431694113272014-05-10T23:16:00.001+02:002014-05-10T23:16:27.910+02:00MISIÓN:IMPOSIBLE Protocolo Justicia<iframe allowfullscreen="" frameborder="0" height="344" src="//www.youtube.com/embed/nbZ_Mbd0SFA" width="459"></iframe>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-26654962062873450622014-03-30T13:15:00.000+02:002014-03-30T13:15:06.621+02:00Como cerrar las App abiertas en el simulador de Xcode 5.Hola amigos, a petición de algunos amigos he decidido explicar algo que parece fácil a simple vista, y realmente lo es....<br />
<br />
El tema es que como todos los desarrolladores sabemos, para probar cosas en el Xcode, tales como el nombre que aparece bajo el icono de la aplicación , el propio icono, la imagen Launch (es la primera imagen que vemos cuando iniciamos una app) y algunas cosas mas.<br />
<br />
Para que todo esto se actualice en el simulador necesitamos que la app se cierre y que se inicie de nuevo, con la Multitasking de iOS 7, cuando pulsamos el botón Home de nuestro dispositivo o simulador, la app pasa a segundo plano, pero no se cierra, por lo tanto si hemos cambiado el icono de la aplicación no se vera reflejado en el simulador hasta que no cerremos la aplicación y la iniciemos de nuevo.<br />
<br />
En versiones anteriores de Xcode, en el simulador aparecia el botón home y por lo tanto lo teníamos muy facial haciendo doble click sobre dicho botón.<br />
<br />
Pero, a partir de la version 5 de Xcode el famoso boton de home ya no aparece en el simulador<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKAz2AFD_NumU2Iuum7uJ_G9JeyDr2VldUFoikFOiJDJC9xFgNXmToByE-xfR3eulGhYveClr2Pq_6BZAz13_aqEL4aGGJmiCsiTClbMuKAW5tO7ew3IeqBs1WMyFo146GBY9g11TUzN0/s1600/Captura+de+pantalla+2014-03-30+a+la(s)+12.39.43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKAz2AFD_NumU2Iuum7uJ_G9JeyDr2VldUFoikFOiJDJC9xFgNXmToByE-xfR3eulGhYveClr2Pq_6BZAz13_aqEL4aGGJmiCsiTClbMuKAW5tO7ew3IeqBs1WMyFo146GBY9g11TUzN0/s1600/Captura+de+pantalla+2014-03-30+a+la(s)+12.39.43.png" height="400" width="218" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Podemos ir al menu del simulador y en la pestaña Hardware encontramos la opción de inicio, que si la pulsamos nos saca de la app a la pantalla principal del simulador.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOLyXkq0bxylCa_2_tpI8kSCV9wxY7kYC5s-RPuwAuA1cl3yQDymzr7oi_J-0SXb-A4OVu296zsFvmUmdS6C_XlRPb4nZNp1RuMwiA00UIb56km5upQq8K7eOC7n_sOm5CTbIj7ixeg68/s1600/Captura+de+pantalla+2014-03-30+a+la(s)+12.50.45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOLyXkq0bxylCa_2_tpI8kSCV9wxY7kYC5s-RPuwAuA1cl3yQDymzr7oi_J-0SXb-A4OVu296zsFvmUmdS6C_XlRPb4nZNp1RuMwiA00UIb56km5upQq8K7eOC7n_sOm5CTbIj7ixeg68/s1600/Captura+de+pantalla+2014-03-30+a+la(s)+12.50.45.png" height="193" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Pero como dije anteriormente esto lo que hace es pasar la app a segundo plano.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Por lo tanto para que nos salga el menu de cerrar las aplicaciones la forma mas fácil de hacerlo es con esta combinación de teclas: <b>CMD-Shift-H </b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
Manteniendo pulsadas las teclas CMD-Shift pulsamos dos veces seguidas en la letra H y nos sale la opción de cerrar las aplicaciones en el simulador.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1jx5Gvt17g7Z5UeywAR07MDsjDSy_7UmL6NbH_UbUYXMA6P9tdGqN3Op8Rgq3NioIXJydnNrlAgTl4juwHxdFTgvE4sa9NK4UeYBlbieNVRgxOS69NJ8zVNr0xUDN7UhknXX5dFeU5w4/s1600/Captura+de+pantalla+2014-03-30+a+la(s)+12.39.00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1jx5Gvt17g7Z5UeywAR07MDsjDSy_7UmL6NbH_UbUYXMA6P9tdGqN3Op8Rgq3NioIXJydnNrlAgTl4juwHxdFTgvE4sa9NK4UeYBlbieNVRgxOS69NJ8zVNr0xUDN7UhknXX5dFeU5w4/s1600/Captura+de+pantalla+2014-03-30+a+la(s)+12.39.00.png" height="400" width="216" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Buenoooo, se que parece obvio, pero hay varias amigos que me lo preguntaron y he creído que seria buena idea explicarlo.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Saludos y espero que a alguien le sea util. </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
<br />
<br />Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com1tag:blogger.com,1999:blog-1031125856269220070.post-64225093698530616292013-11-17T21:01:00.001+01:002013-11-17T21:01:28.425+01:00Video Tutorial sobre elementos de Objective C.Interesantes vídeos sobre programación iOS del amigo Ricardo Casanova.<br />
<br />
Gracias por compartir tus vídeos.<br />
<iframe allowfullscreen="" frameborder="0" height="344" src="//www.youtube.com/embed/08LdjzN5UME" width="459"></iframe>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-90470113937666804712013-11-07T19:45:00.001+01:002013-11-07T19:45:22.151+01:00Nuevo Video promocional de iMarca-Padel.<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/-DyGoe7Ym4A?feature=player_embedded' frameborder='0'></iframe></div><h1 style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 1.6em; font-weight: normal; margin: 0px; padding: 0px;">iMarca-Padel es nuestra primera app.</h1><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; padding: 0px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; padding: 0px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">iMarca-Padel- instrucciones de Uso.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Usar iMarca-Padel es muy sencillo, basta con introducir los nombres de los equipos o jugadores, iMarca-Padel te guarda el nombre de los jugadores anteriores para ahorrarte tener que escribirlos, si son los mismos. Una vez introducidos los nombre haces "tap" en empezar y entramos directamente en la pantalla principal del marcador.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">En esta pantalla encontramos varias opciones que explicamos a continuacion, primero tenemos los nombres de los equipos o jugadores que hemos introducido en la pantalla anterior, a la derecha en la parte superior tenemos los marcadores donde aparecen los sets, como se puede comprobar esta preparado para poder disputar partidos a tres sets o a cinco sets.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Bajo los nombres, a derecha e izquierda tenemos dos botones donde pone la palabra "Punto", hay es donde pulsaremos cuando el equipo respectivo haga un punto.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Si ambos equipos empatan a cuarenta puntos se produce el denominado " Cuarenta iguales", nos saldrá una alerta avisándonos y los marcadores de puntos de ambos jugadores se ponen automáticamente a treinta puntos, necesitando siempre que la ventaja de puntos de un jugador a otro sea de dos o mas puntos para que se sume un Sets.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Una vez que un equipo logra un Juego, este pasa a su marcador, si ambos equipos empatan a cinco Juegos, se produce un Tie-break y en este caso saldría una alerta indicando que estamos en Tie-Break y que se necesita superar al otro equipo en dos juegos para ganar el sets.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Si se completan los cinco Sets por equipo y se quiere seguir jugando, o bien se inicia una nueva partida o si se continua se empezaría de nuevo por el primer Sets.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Si nos equivocamos al marcar un punto, con el botón llamado "Borrar puntos" ponemos los marcadores de puntos a cero, también tiene incorporado un sistema para borrar el ultimo juego anotado en el marcador de sets, para ello hacemos tres "taps" o toques sobre la ventana donde esta escrito en verde el nombre del equipo y se descontaría el ultimo juego anotado.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Para desconectar el sonido podemos usar el interruptor, con la etiqueta de sonido sobre el.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Bajo el botón de desconectar el sonido tenemos otro botón en el cual tenemos la opción de compartir nuestros resultados en nuestra red social favorita, se pueden enviar por: eMail, Twitter o FaceBook. </div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">iMarca - Padel, esta pensado para las personas que son amantes de este estupendo deporte, y que cuando no juegan y están de espectadores, a veces les es difícil llevar las cuentas de los puntos logrados por ambos equipos.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">También esta indicado para árbitros y entrenadores, con las posibilidad de poder enviar los resultados a través del correo electrónico o de publicarlas en Twitter o FaceBook. </div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Con este estupendo marcador se acabo de hacer marcas en el suelo con una piedra, o de estar preguntando a los demás ¿como van?.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">A partir de ahora tu tienes el control, ahora serán los demás los que se acerquen a ti para preguntarte los resultados, y seguro que serás mas veces invitado a presenciar los partidos de tus amigos.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Y por supuesto cuando tu seas el jugador siempre puedes dejar tu iMarca-Padel a un amigo de confianza para que controle la puntuación del juego y luego tendrás la posibilidad de enviar tus resultados por correo electrónico o publicarlos en tu red social favorita.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;">Espero os guste y la disfruteis.</div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"><a href="http://itunes.apple.com/es/app/imarca-padel/id642526929?mt=8">itunes.apple.com/es/app/imarca-padel/id642526929?mt=8</a></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://itunes.apple.com/es/app/imarca-padel/id642526929?mt=8" target="_blank"><img border="0" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFc2Cs8PWU8b0paR408ROtg9w-B5w9D5wyjyNTvPt9yUajDFyZ-95VXg86c_zxI8yjsBAVHzTWcAGRa5IVKN7VY4_tUb5Fq-L0tu3rQRiAy08ft4J-dWU-4ZA9fZrS1PjnYE55p_SHjSA/s320/app_store2.png" width="320" /></a></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><div style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"></div><h1 style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 1.6em; font-weight: normal; margin: 0px; padding: 0px;"><strong><a href="http://http//www.youtube.com/v/-DyGoe7Ym4A" target="_blank">Video promocional iMarca_Padel</a></strong></h1><span style="font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px;"> </span>
<div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7K8HH5zEc1wX5V7tueFa9VlrvA-Ee6zMCihHaQx6cOIiXuYYHgiFORMj2VkTqZnLvtwn0dqn0gesF3wqqDCEtj5ZpuRIT6QaIEnfegbhXWcg1sa-OvtyjDQWN7Db-B9ptlpB0RkdfVHo/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+23.20.00.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigjJNHt7iLdWsM49LEDHpZr9FecvCXv-B2alh3EyiK3j6BPRLjlFP3NojVs2r8PG0JQjriHUrCGiysX9HWPWKQZ1KaChYeqo9DYOAon23eDpIdl0EdX_bUcttfmUX9pPlTHsTbd-Qby2I/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+22.57.28.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-riPVHwgozd53QcrN8Br0Jhhb3d6fvmqofgqkjZYp0v3UmoJhJJL4Qu0P5tHwkKoQWShuMO0RyCwH7V7Wo35WGMMoe2TMwHQSoKMgrJoNsf9cMoT3YG1bOTzeS3mJidRN5azqrxy-CDk/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+22.57.38.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXSHJK-yW2puFogmVjuVdjq_1ElaVFiaHlVK5FpUKsnj7J83xcYU1jiYTzL5Z2ZSMNdg4L6voX-h3JUmnpp1zAiW7QQBgLMGj6ucY-DoFY96w7Jy3u49oAbkiDe4-pbDdnXLFCR4jSzeo/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+22.57.45.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO3_SBzp941Tmi2fQZs-0Bf0AxxgL4N-7UDcax7HuOS6V6aQFUFHQECFCeB_9jkxSZgSzMEydub9weezIVBl_ux1MmpWlDGkm0rvxGx8b_SJm3FOo89nF1hLJ3ZHL7Jjeddz65ifgSTOA/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+22.58.26.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVRRjMcnlWZ6SHTdvjP77q1I3KT0oksWb02deX1OJWN5S-E6OMkJxD5tWb_61I8wMpSBY8J7yuXBoI9jbp1zjtdl5bQN8sZgiljDZQa0ni4eKmoRm8qZF90GN2DBR0PWurws9hlbqQ2xs/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+23.02.53.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"><span style="margin-left: 1em; margin-right: 1em;"><a href="http://www.youtube.com/v/-DyGoe7Ym4A"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDAh7_dCUgESqEdtkP0Axkd-CZozLhQTlR6E19g5vaRTSc4QvSJpZx5QSCPBFNGu_pkmpnFYWSozcRjKejg1dQbzABe3dS_0MXWkgSL9i4zwPF3SfvAiiO1LTFAir5FMPJFxpyqEG7Gc4/s320/Captura+de+pantalla+de+Simulador+iOS+04.11.2013+23.19.54.png" width="320" /></a></span></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlDKYLSX8yf7wUh8eXMxIZuDl2FthnijGjn2Q1DU8Y_iPuT_RsPX1ImXPcyQmQFo6njueQMo6TzKguFq8saPxyPPq6kR7Ntct-As-p3k6OB5TF3TPot11fkUPmhz-W0j-TNQGw08YYZVw/s1600/Captura+de+pantalla+2013-11-06+a+la(s)+22.00.22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlDKYLSX8yf7wUh8eXMxIZuDl2FthnijGjn2Q1DU8Y_iPuT_RsPX1ImXPcyQmQFo6njueQMo6TzKguFq8saPxyPPq6kR7Ntct-As-p3k6OB5TF3TPot11fkUPmhz-W0j-TNQGw08YYZVw/s320/Captura+de+pantalla+2013-11-06+a+la(s)+22.00.22.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"></div>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-44352317212493004202013-08-25T11:21:00.001+02:002013-08-25T11:21:58.204+02:00<div style="text-align: center;">
<span style="color: #0b5394; font-size: x-large;">iPhone 5C, realidad o simple Rumor?</span></div>
<div style="text-align: center;">
<span style="color: #0b5394; font-size: x-large;"><br /></span></div>
<div style="text-align: center;">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>ES-TRAD</w:LidThemeOther>
<w:LidThemeAsian>JA</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="276">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabla normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:Cambria;
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->
<!--StartFragment-->
</div>
<div class="MsoNormal">
<span lang="ES" style="color: #101010; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Hola amigos, como
todos sabéis son muchos los rumores que apuntan a que Apple presentara el dia
10 de Septiembre el tan esperado iPhone 5S y según algunos rumores un iPhone de
bajo coste llamado iPhone 5C. <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilenboGBP9MNAm7iiHvZ9rFpNT8LXsdhQMckKTBxNDIbHmoUlT4e6gHVM-RGeUZUm_SJaMsLpPrjIjHPINpHICyjaFHYLM6SLu4Ij-x1FNg4MEgWxh3MgD3SxwDGSrT9EQT-NIR1Ik9lY/s1600/iphone5ccompleto--644x362.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilenboGBP9MNAm7iiHvZ9rFpNT8LXsdhQMckKTBxNDIbHmoUlT4e6gHVM-RGeUZUm_SJaMsLpPrjIjHPINpHICyjaFHYLM6SLu4Ij-x1FNg4MEgWxh3MgD3SxwDGSrT9EQT-NIR1Ik9lY/s1600/iphone5ccompleto--644x362.jpg" height="358" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<o:p></o:p><br />
<div class="MsoNormal">
<span lang="ES" style="color: #101010; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"> Segun
algunas informaciones se trataria de un</span><span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"> modelo «low cost» que tendrá una carcasa fabricada
en plástico, en principio bastante resistente, y será bastante
ligero, según informan medios chinos, hasta el punto de
poder soportar "golpes y caídas".</span><span lang="ES" style="color: #101010; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">El
iPhone 5C tendría una pantalla de 4 pulgadas y con el mismo formato que el
iPhone 5, aunque no contaría con algunas funcionalidades como el asistente
virtual Siri.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">En
cuanto a las medidas de este teléfono, que a me recuerda un poco al iPhone 3G,
serían de 123.8 x 58.6 milímetros y un grosor de 12 milímetros frente a los 7.6
del iPhone 5.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Según
estos rumores, iPhone 5C va destinado a mercados emergentes y a un público más
juvenil, o con menos poder adquisitivo.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">El
precio que se rumorea que puede costar, es entre 300 € y 400 €.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Que
frente a los casi 700€ que cuesta el iPhone 5 estaríamos hablando de casi la
mitad.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Los
que conocemos a Apple desde hace tiempo sabemos que hasta ahora, <b>Apple no da
un paso atras ni para tomar impulso, </b>por ese motivo a mi personalmente me
cuesta mucho creerme que este rumor sea cierto.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Mi
intuición me dice que posiblemente se trate de una imitación de esas que tan
bien se les da a los chinos de hacer, como todos sabemos en el mercado hay
imitaciones chinas de casi todos los modelos de teléfonos de fabricantes como
Samsung y tambien de Apple, tanto sus telefononos como sus tabletas.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Hay
infinidad de testimonios de imitaciones, unas mejores conseguidas que otras
pero en definitiva imitaciones.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Mirad
este video sobre la imitación de un iPhone 5.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/by7kiozvfzk?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;">Resumiendo
un poco, mi opinión personal es que Apple va a presentar el iPhone 5S y es
probable que algún nuevo modelo de iPad, pero siempre en su linea, mas potentes
con menos peso y con mejores cámaras, pero en ningún caso con menos
prestaciones que los que anteriormente a sacado al mercado, al menos esa a sido
su política hasta este momento, a mi personalmente me defraudaría mucho un
retroceso así.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"><a href="https://twitter.com/" target="_blank">#promedi46</a> </span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"><a href="http://promedi.webnode.es/products/imarca-padel/" target="_blank">Promedi-Developer</a></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 20.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="ES" style="color: #090909; font-family: Georgia; font-size: 15.0pt; mso-ansi-language: ES; mso-bidi-font-family: Georgia;"><br /></span></div>
<!--EndFragment-->Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-72104467480621088652013-04-12T17:04:00.001+02:002013-04-14T10:32:39.867+02:00El hombre que se quedo si Whatsapp.............<div class="separator" style="clear: both; text-align: center;">
La verdad es que es bastante triste, pero realmente es así, ahora la gente en las terrazas de los bares no habla con los amigos mientras toman una cervezas , solo están sentados juntos, pero cada uno esta con su Movil de ultima generación chateando con otras personas y mirando su Twitter y Facebook y solo apartas la mirada del móvil para decir al camarero que si, cuando te pregunta: ¿cerveza para todos?.....que triste ....la familia en casa, la tele puesta y en el sofá cada uno con su teléfono en la mano y Whatsapeando con otras personas...Que a sido de esos tiempos en que mientras se comía o se tomaba unas cervezas aprovechábamos para criticar a los que no estaban presentes o a los jefes o políticos etc... Pero todo a cambiado "Vivimos en la era de la comunicacion" eso gritan algunos a los cuatro vientos, pero yo creo que estamos viviendo la era de la incomunicación personal, muchas redes sociales mucha tecnología y resulta que con las personas que tenemos mas cerca ni hablamos y si lo hacemos es a través de Whatsapp o similares. </div>
<div class="separator" style="clear: both; text-align: center;">
Entre la televisión y ahora los móviles, se esta perdiendo la costumbre de conversar con las personas de nuestro entorno y familiares y nos estamos convirtiendo en seres solitarios y huraños .</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/tyKlCEpo0Vo?feature=player_embedded' frameborder='0'></iframe></div>
<br />Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-52297343877598377572013-03-24T18:11:00.001+01:002013-03-24T18:11:34.171+01:00Creación de métodos en Objective-C<h3 style="text-align: center;">
<span style="background-color: #b6d7a8; color: blue; font-size: x-large;">Creación de Metodos en Objective-C.</span></h3>
<div>
<br /></div>
<div>
<br /></div>
<h3 style="text-align: center;">
<span style="background-color: yellow; color: red;">Vamos a repasar un poco la creación de métodos en Objective-C:</span></h3>
<div>
<span style="background-color: #f4cccc; color: #741b47;"><br /></span></div>
<div>
<span style="background-color: #f4cccc; color: #741b47;"><br /></span></div>
<div>
<span style="background-color: #f4cccc; color: #741b47;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">Un metodo en Objective-C es lo que en otros lenguajes se suelen llamar funciones.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />Los métodos pueden crearse que no devuelven nada : <i>-(void)nombreMetodo;</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i>Si devuelve algún valor se pone entre paréntesis su tipo : <i>-(NSString *)nombreMetodo;</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i>Si no devuelve nada pero recibe parámetros: <i>-(void)nombreMetodo: (NSString *) parámetro;</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i>Si devuelve un valor y recibe parámetros: <i>-(NSInteger)nombreMetodo:(NSString*)parámetro;</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i>Si recibe varios parámetros:<br /><i>-(NSString*)nombreMetodo:(NSString*)datoUno otroDatoMas:(NSInteger)datoDos yOtroDatoMas:(BOOL)datoTres; </i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i>Así se podría crear un método que recibiese múltiples datos, notese que entre: datoUno y otroDatoMas hay un espacio.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />los métodos que empiezan por el signo - son métodos de instancia y los que empiezan por el signo + son métodos de clase.<br /><br />Aqui pongo un ejemplo del uso de métodos y su forma de llamarlos.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br /><span style="background-color: cyan;">Contenido del archivo de encabezado ViewController.h:</span><br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// ViewController.h</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Metodos</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Created by Francisco on 24/03/13.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Copyright (c) 2013 Francisco. All rights reserved.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: #78492a;">#import </span><UIKit/UIKit.h></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@interface</span> ViewController : <span style="color: #703daa;">UIViewController</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@property</span> <span style="color: #703daa;">NSInteger</span> numeroUno,numeroDos,numeroTres,total;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@property</span> (<span style="color: #bb2ca2;">nonatomic</span>,<span style="color: #bb2ca2;">strong</span>) <span style="color: #703daa;">NSString</span> * nombreUno,* nombreDos,* nombreTres,* nombreCuatro;</div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">, </span>nonatomic<span style="color: black;">) </span>IBOutlet<span style="color: black;"> </span><span style="color: #703daa;">UILabel</span><span style="color: black;"> *mostrarTexto;</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #703daa;">NSInteger</span>)metodoQueRecibeDosVariablesNumericas:(<span style="color: #703daa;">NSInteger</span>)valorUno segundoParametro:(<span style="color: #703daa;">NSInteger</span>)valorDos;</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)metodoQueNoDevuelveNada;</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)metodoQueRecibeUnParametro:(<span style="color: #703daa;">NSString</span>*)parametro;</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #703daa;">NSInteger</span>)metodoQueDevuelveUnParametro;</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)metodoQueRecibeVariosParametros:(<span style="color: #703daa;">NSString</span>*)parametroUno aquiVaElParametroDos:(<span style="color: #703daa;">NSInteger</span>)parametroEnteroDos aquiVaElTercerParametro:(<span style="color: #703daa;">NSString</span>*)tercerParametroTexto;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoUno:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoDos:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoTres:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoCuatro:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
<br /></div>
<span style="background-color: cyan; font-family: inherit;">Contenido del archivo de implementación ViewController.m</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// ViewController.m</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Metodos</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Created by Francisco on 24/03/13.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Copyright (c) 2013 Francisco. All rights reserved.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: #78492a;">#import </span>"ViewController.h"</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@interface</span><span style="color: black;"> </span>ViewController<span style="color: black;"> ()</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@implementation</span> ViewController</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #703daa;">NSInteger</span>)metodoQueRecibeDosVariablesNumericas:(<span style="color: #703daa;">NSInteger</span>)valorUno segundoParametro:(<span style="color: #703daa;">NSInteger</span>)valorDos</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este metodo recibe dos parametros numericos tipo NSInteger y los multiplica devolviendo con el return el valor de la multiplicacion.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>// Y asigna los valores recibidos a dos variables enteras, para poder usarlas fuera del metodo.</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #4f8187;">_total</span>= valorUno * valorDos;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #4f8187;">_numeroDos</span> = valorUno;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #4f8187;">_numeroTres</span> = valorDos;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">return</span> <span style="color: #4f8187;">_total</span>;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">void</span>)metodoQueNoDevuelveNada</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este metodo, hace algo, pero no devuelve ningun valor.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #4f8187;">_mostrarTexto</span><span style="color: black;">.</span><span style="color: #703daa;">text</span><span style="color: black;"> = </span>@"Este texto es de el metodo que no devuelve nada"<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">void</span>)metodoQueRecibeUnParametro:(<span style="color: #703daa;">NSString</span> *)parametro</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este metodo recibe un parametro de texto y lo muestra en la etiqueta.</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #4f8187;">_mostrarTexto</span>.<span style="color: #703daa;">text</span> = parametro;</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #703daa;">NSInteger</span>)metodoQueDevuelveUnParametro</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//En este metodo vamos a devolver un valor NSInteger que es un valor numerico</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Para ello llama al metodo que recibe dos parametros numerico y que nos devuelve el resultado multiplicado. </div>
<div style="color: #31595d; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>metodoQueRecibeDosVariablesNumericas<span style="color: black;">:</span><span style="color: #272ad8;">154</span><span style="color: black;"> </span>segundoParametro<span style="color: black;">:</span><span style="color: #272ad8;">43</span><span style="color: black;">];</span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>_numeroUno<span style="color: black;"> = </span>_total<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">return</span><span style="color: black;"> </span>_numeroUno<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)metodoQueRecibeVariosParametros:(<span style="color: #703daa;">NSString</span> *)parametroUno aquiVaElParametroDos:(<span style="color: #703daa;">NSInteger</span>)parametroEnteroDos aquiVaElTercerParametro:(<span style="color: #703daa;">NSString</span> *)tercerParametroTexto</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este metodo recibe varios parametros dos de texto y uno numerico.</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #4f8187;">_mostrarTexto</span>.<span style="color: #703daa;">text</span> = [<span style="color: #703daa;">NSString</span> <span style="color: #3d1d81;">stringWithFormat</span>:<span style="color: #d12f1b;">@"%@ ,Parametro Numerico: %i , %@"</span>,parametroUno,parametroEnteroDos,tercerParametroTexto];</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//aqui podemos ver las llamadas a los metodos al pulsar cada boton.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoUno:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #31595d; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>metodoQueNoDevuelveNada<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoDos:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #31595d; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>metodoQueDevuelveUnParametro<span style="color: black;">];</span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>_mostrarTexto<span style="color: black;">.</span><span style="color: #703daa;">text</span><span style="color: black;"> = [</span><span style="color: #703daa;">NSString</span><span style="color: black;"> </span><span style="color: #3d1d81;">stringWithFormat</span><span style="color: black;">:</span><span style="color: #d12f1b;">@"Valor de multiplicar: %i x %i %i"</span><span style="color: black;">,</span>_numeroDos<span style="color: black;">,</span>_numeroTres<span style="color: black;">,</span>_numeroUno<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoTres:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span><span style="color: #31595d;">metodoQueRecibeUnParametro</span><span style="color: black;">:</span>@"Parametro recibido de texto"<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)verMetodoCuatro:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #31595d; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>metodoQueRecibeVariosParametros<span style="color: black;">:</span><span style="color: #d12f1b;">@"Parametro de Texto"</span><span style="color: black;"> </span>aquiVaElParametroDos<span style="color: black;">:</span><span style="color: #272ad8;">108</span><span style="color: black;"> </span>aquiVaElTercerParametro<span style="color: black;">:</span><span style="color: #d12f1b;">@"Tercer Parametro tambien de texto"</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">void</span>)viewDidLoad</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">super</span><span style="color: black;"> </span>viewDidLoad<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">void</span>)didReceiveMemoryWarning</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">super</span><span style="color: black;"> </span>didReceiveMemoryWarning<span style="color: black;">];</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>// Dispose of any resources that can be recreated.</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
<br /></div>
<div style="font-family: Menlo;">
<span style="color: blue;">Hay que recordar que la UILabel o etiqueta donde se muestra el texto la he llamado: mostrarTexto y que hay que conectar la etiqueta y los botones con su correspondiente IBOutlet e IBAction para que funcione en tu XCode.</span></div>
<div>
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDKNeqMltNgL5n-l5X9ID0n8Oz71BQoZbcxcvQ1T-YY8J7XOqrlIoiLfybIKqITcwIV50L8s1pvTEfA9u8x4AFuIhQC4dlr_VjQwyz8puTJOV3WcXl18IjxubT1LBjqu4E1uTo438AEB8/s1600/Captura+de+pantalla+2013-03-24+a+la(s)+17.10.40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDKNeqMltNgL5n-l5X9ID0n8Oz71BQoZbcxcvQ1T-YY8J7XOqrlIoiLfybIKqITcwIV50L8s1pvTEfA9u8x4AFuIhQC4dlr_VjQwyz8puTJOV3WcXl18IjxubT1LBjqu4E1uTo438AEB8/s400/Captura+de+pantalla+2013-03-24+a+la(s)+17.10.40.png" width="207" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEictPesoxt4IXtx7KMrUvOtksub_gRr4a99n59925n9fVfkWJG3xgnqO3_-H6fakIl2pgRo8xH5B5C1Hyib-XaAp4SKnTK45OaYiswUI9HgKrbok2m94H8n2tlkP7ty-escZuuFmlBxLjk/s1600/Captura+de+pantalla+2013-03-24+a+la(s)+17.11.26.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEictPesoxt4IXtx7KMrUvOtksub_gRr4a99n59925n9fVfkWJG3xgnqO3_-H6fakIl2pgRo8xH5B5C1Hyib-XaAp4SKnTK45OaYiswUI9HgKrbok2m94H8n2tlkP7ty-escZuuFmlBxLjk/s400/Captura+de+pantalla+2013-03-24+a+la(s)+17.11.26.png" width="206" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNuNqODpYQaL9KjdSy2qutx-X16dGcmaLt3AZ6gStNzzdsgLascfc4duVsOPGVd_ucgzAygpYcyJebudzP_30tU8YQ1S5aHuQcwUMH1GW7N-hsei9ptqw3N2PgqVRu1jCAleBbed59jJg/s1600/Captura+de+pantalla+2013-03-24+a+la(s)+17.10.53.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNuNqODpYQaL9KjdSy2qutx-X16dGcmaLt3AZ6gStNzzdsgLascfc4duVsOPGVd_ucgzAygpYcyJebudzP_30tU8YQ1S5aHuQcwUMH1GW7N-hsei9ptqw3N2PgqVRu1jCAleBbed59jJg/s400/Captura+de+pantalla+2013-03-24+a+la(s)+17.10.53.png" width="208" /></a></div>
<br />
<br />
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg26oxl2QoUbL9gMQXmG1TO4H5VfjfsXgSpanssc2JLfvFQ9UFquPr3c3uC_383q2VbXt9EjWb_jlMjjzi0s9C1G7Mu4pEiULm1Gwcgapik1MWJ4qaCRZnUKP3-28mxGZIsb_2mO-DZFu0/s1600/Captura+de+pantalla+2013-03-24+a+la(s)+17.11.07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg26oxl2QoUbL9gMQXmG1TO4H5VfjfsXgSpanssc2JLfvFQ9UFquPr3c3uC_383q2VbXt9EjWb_jlMjjzi0s9C1G7Mu4pEiULm1Gwcgapik1MWJ4qaCRZnUKP3-28mxGZIsb_2mO-DZFu0/s400/Captura+de+pantalla+2013-03-24+a+la(s)+17.11.07.png" width="207" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Espero les guste y les sirva para algo si alguien queiere que esplique algo determinado que me ponga un comentario con su petición.</div>
<div class="separator" style="clear: both; text-align: center;">
Saludos.</div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com2tag:blogger.com,1999:blog-1031125856269220070.post-42066287338333195892013-03-02T18:09:00.000+01:002013-03-02T18:09:10.578+01:00Reutilizar metodos para reproducir varios sonidos o mostrar alertas diferentes.<h3>
<span style="color: #20124d; font-family: Verdana, sans-serif; font-size: large;"><u>Tutoriales XCode.</u></span></h3>
<div>
<span style="color: #20124d; font-family: Verdana, sans-serif; font-size: large;"><u><br /></u></span></div>
<div>
<span style="color: #20124d; font-family: Verdana, sans-serif; font-size: large;"><u><br /></u></span></div>
<h3>
En este pequeño tutorial vamos a ver como usar un metodo para reproducir varios sonidos diferentes y tambien otro metodo para mostrar varias alertas diferentes.</h3>
<h3>
Al hacer la llamada al método le pasamos en una variable el texto que queremos que nos muestre y en el otro caso el nombre del archivo de audio que queremos que reproduzca.</h3>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_rvJ9egbhDqtfSOdiz-oyBAH_pAY2ilsaCslZnsaSOHOZPJj0JYU3z6q0h4myGfnzgN7fC7ljMSkl0QYs1t03VZCQqo6KqAodr1nHzWNeTsNvF61rGnReGwnmtiGJbJJTNuIs1-B6qvc/s1600/Captura+de+pantalla+2013-03-02+a+la(s)+17.38.55.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_rvJ9egbhDqtfSOdiz-oyBAH_pAY2ilsaCslZnsaSOHOZPJj0JYU3z6q0h4myGfnzgN7fC7ljMSkl0QYs1t03VZCQqo6KqAodr1nHzWNeTsNvF61rGnReGwnmtiGJbJJTNuIs1-B6qvc/s320/Captura+de+pantalla+2013-03-02+a+la(s)+17.38.55.png" width="164" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinxxlN1bL-A2b-pAljNOjQjMfzCudrS0ZZEiht0PVjM-ET1oOHdYrIgd9mlvB6ACvV0yHTBD_AFzQrYdRN97bXTx9gsParqr0VwI-4fBXN88O-cYTbDl7iwA_-w1RwCgpTNII73Bu8pdA/s1600/Captura+de+pantalla+2013-03-02+a+la(s)+17.38.30.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinxxlN1bL-A2b-pAljNOjQjMfzCudrS0ZZEiht0PVjM-ET1oOHdYrIgd9mlvB6ACvV0yHTBD_AFzQrYdRN97bXTx9gsParqr0VwI-4fBXN88O-cYTbDl7iwA_-w1RwCgpTNII73Bu8pdA/s320/Captura+de+pantalla+2013-03-02+a+la(s)+17.38.30.png" width="164" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip7TWo_GpI_2Gdy_fvS7g1GFy7wyAExj489UVaKmYw54eaBnEBWGEyGk2RDlUB3K5k6vlJYWvROiDjaljE9eicQgMeZaLxJkJDZA3Ylie7yaOQRZTocEI1dqg8Xw047y04r-5M7J4Yqw4/s1600/Captura+de+pantalla+2013-03-02+a+la(s)+17.43.03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip7TWo_GpI_2Gdy_fvS7g1GFy7wyAExj489UVaKmYw54eaBnEBWGEyGk2RDlUB3K5k6vlJYWvROiDjaljE9eicQgMeZaLxJkJDZA3Ylie7yaOQRZTocEI1dqg8Xw047y04r-5M7J4Yqw4/s320/Captura+de+pantalla+2013-03-02+a+la(s)+17.43.03.png" width="164" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihoQkYW_-_HjI1YgSLQs80NPlFmsB9aNu7v00e8mpy19aKVzNQyWFBsmHHmkWgLd2lZX2j0cfvlOanZoJdzrylgTnkG26itT8wl4gRrQK4CuyLpQ6y4Qc_U24VFlB2FJ7vIcN1i19PbhI/s1600/Captura+de+pantalla+2013-03-02+a+la(s)+17.45.18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="420" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihoQkYW_-_HjI1YgSLQs80NPlFmsB9aNu7v00e8mpy19aKVzNQyWFBsmHHmkWgLd2lZX2j0cfvlOanZoJdzrylgTnkG26itT8wl4gRrQK4CuyLpQ6y4Qc_U24VFlB2FJ7vIcN1i19PbhI/s640/Captura+de+pantalla+2013-03-02+a+la(s)+17.45.18.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Archivo de cabecera <span style="color: blue;">ViewController.h.</span></h3>
<div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<br /></div>
</div>
<div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// ViewController.h</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// PruebasVarias</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Created by Francisco on 02/03/13.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Copyright (c) 2013 Francisco. All rights reserved.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: #78492a;">#import </span><UIKit/UIKit.h></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #d12f1b;"><span style="color: #78492a;">#import </span><AVFoundation/AVFoundation.h> </span><span style="color: #6aa84f;">//Hay que importar el Framework de sonido</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@interface</span> ViewController : <span style="color: #703daa;">UIViewController</span></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">,</span>nonatomic<span style="color: black;">) </span><span style="color: #703daa;">AVAudioPlayer</span><span style="color: black;"> *reproductor;</span></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">,</span>nonatomic<span style="color: black;">) </span><span style="color: #703daa;">NSString</span><span style="color: black;"> * idAudio;</span></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">,</span>nonatomic<span style="color: black;">) </span><span style="color: #703daa;">UIAlertView</span><span style="color: black;"> * alerta;</span></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">,</span>nonatomic<span style="color: black;">) </span><span style="color: #703daa;">NSString</span><span style="color: black;"> * idAlerta;</span></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">,</span>nonatomic<span style="color: black;">) </span><span style="color: #703daa;">NSString</span><span style="color: black;"> * sonido;</span></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)mostrarAlerta:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)reproducirSonido:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)nombreSonido: (<span style="color: #703daa;">NSString</span> *)recibeDatos;</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)textoAlertas: (<span style="color: #703daa;">NSString</span>*)textoQueMuestra;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)alerta2:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)alerta3:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)sonido2:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)sonido3:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Archivo de implementación <span style="color: blue;">ViewController.m.</span></h3>
<div>
<div style="font-family: Menlo; font-size: 11px;">
</div>
<div style="color: #008400;">
//</div>
<div style="color: #008400;">
// ViewController.m</div>
<div style="color: #008400;">
// PruebasVarias</div>
<div style="color: #008400;">
//</div>
<div style="color: #008400;">
// Created by Francisco on 02/03/13.</div>
<div style="color: #008400;">
// Copyright (c) 2013 Francisco. All rights reserved.</div>
<div style="color: #008400;">
//</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #d12f1b;">
<span style="color: #78492a;">#import </span>"ViewController.h"</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #4f8187;">
<span style="color: #bb2ca2;">@interface</span><span style="color: black;"> </span>ViewController<span style="color: black;"> ()</span></div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2;">
@end</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
<span style="color: #bb2ca2;">@implementation</span> ViewController</div>
<div style="color: #008400;">
<span style="color: #bb2ca2;">@synthesize</span> reproductor,idAlerta,idAudio,alerta,sonido;</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">void</span>)viewDidLoad</div>
<div style="color: #008400;">
{</div>
<div style="color: #3d1d81;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">super</span><span style="color: black;"> </span>viewDidLoad<span style="color: black;">];</span></div>
<div style="color: #008400;">
<span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span>// Do any additional setup after loading the view, typically from a nib.</div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">void</span>)didReceiveMemoryWarning</div>
<div style="color: #008400;">
{</div>
<div style="color: #3d1d81;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">super</span><span style="color: black;"> </span>didReceiveMemoryWarning<span style="color: black;">];</span></div>
<div style="color: #008400;">
<span style="color: black;"> </span>// Dispose of any resources that can be recreated.</div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">IBAction</span>)mostrarAlerta:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="color: #008400;">
{</div>
<div style="color: #d12f1b;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span><span style="color: #31595d;">textoAlertas</span><span style="color: black;">:</span>@"Alerta Uno"<span style="color: black;">];</span></div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">IBAction</span>)reproducirSonido:(<span style="color: #bb2ca2;">id</span>)sender {</div>
<div style="color: #31595d;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>nombreSonido<span style="color: black;">:</span><span style="color: #d12f1b;">@"Alerta"</span><span style="color: black;">];</span></div>
<div style="color: #008400; min-height: 13px;">
</div>
<div style="color: #008400; min-height: 13px;">
</div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
-(<span style="color: #bb2ca2;">void</span>)nombreSonido: (<span style="color: #703daa;">NSString</span> *)recibeDatos</div>
<div style="color: #008400;">
{</div>
<div style="color: #008400; min-height: 13px;">
</div>
<div style="color: #008400;">
<span style="color: #703daa;">NSError</span> *error;</div>
<div style="color: #008400;">
<span style="color: #703daa;">NSString</span> *ruta =[[<span style="color: #703daa;">NSBundle</span> <span style="color: #3d1d81;">mainBundle</span>]<span style="color: #3d1d81;">pathForResource</span>:recibeDatos <span style="color: #3d1d81;">ofType</span>:<span style="color: #d12f1b;">@"mp3"</span>];</div>
<div style="color: #3d1d81;">
<span style="color: black;"> </span><span style="color: #703daa;">NSURL</span><span style="color: black;"> *url =[[</span><span style="color: #703daa;">NSURL</span><span style="color: black;"> </span>alloc<span style="color: black;">]</span>initFileURLWithPath<span style="color: black;">:ruta];</span></div>
<div style="color: #3d1d81;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">=[[</span><span style="color: #703daa;">AVAudioPlayer</span><span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithContentsOfURL<span style="color: black;">:url </span>error<span style="color: black;">:&error];</span></div>
<div style="color: #008400; min-height: 13px;">
</div>
<div style="color: #3d1d81;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;"> </span>prepareToPlay<span style="color: black;">];</span></div>
<div style="color: #008400;">
[<span style="color: #bb2ca2;">self</span>.<span style="color: #4f8187;">reproductor</span> <span style="color: #3d1d81;">play</span>];</div>
<div style="color: #008400;">
}</div>
<div style="color: #008400;">
-(<span style="color: #bb2ca2;">void</span>)textoAlertas: (<span style="color: #703daa;">NSString</span>*)textoQueMuestra</div>
<div style="color: #008400;">
{</div>
<div style="color: #3d1d81;">
<span style="color: black;"> </span><span style="color: #4f8187;">alerta</span><span style="color: black;"> =[[</span><span style="color: #703daa;">UIAlertView</span><span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:textoQueMuestra </span>message<span style="color: black;">:</span><span style="color: #d12f1b;">@"Texto Mostrado"</span><span style="color: black;"> </span>delegate<span style="color: black;">:</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #d12f1b;">@"OK"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">: </span><span style="color: #bb2ca2;">nil</span><span style="color: black;">];</span></div>
<div style="color: #008400;">
[<span style="color: #4f8187;">alerta</span> <span style="color: #3d1d81;">show</span>];</div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">IBAction</span>)alerta2:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="color: #008400;">
{</div>
<div style="color: #d12f1b;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span><span style="color: #31595d;">textoAlertas</span><span style="color: black;">:</span>@"Alerta Dos"<span style="color: black;">];</span></div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">IBAction</span>)alerta3:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="color: #008400;">
{</div>
<div style="color: #d12f1b;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span><span style="color: #31595d;">textoAlertas</span><span style="color: black;">:</span>@"Alerta Tres"<span style="color: black;">];</span></div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">IBAction</span>)sonido2:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="color: #008400;">
{</div>
<div style="color: #008400; min-height: 13px;">
</div>
<div style="color: #31595d;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>nombreSonido<span style="color: black;">:</span><span style="color: #d12f1b;">@"Alerta2"</span><span style="color: black;">];</span></div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #008400;">
- (<span style="color: #bb2ca2;">IBAction</span>)sonido3:(<span style="color: #bb2ca2;">id</span>)sender</div>
<div style="color: #008400;">
{</div>
<div style="color: #31595d;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;"> </span>nombreSonido<span style="color: black;">:</span><span style="color: #d12f1b;">@"Tap"</span><span style="color: black;">];</span></div>
<div style="color: #008400;">
}</div>
<div style="color: #008400; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2;">
@end</div>
<div style="color: #bb2ca2;">
<br /></div>
<div style="color: #bb2ca2;">
<br /></div>
<div style="color: #bb2ca2;">
<br /></div>
Bueno espero les guste y les sirva para algo, para cualquier duda o sugerencia dejen sus comentarios.<br />
<br />
gracias.<br />
<div style="color: #008400;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-46945153399504034922013-02-11T22:36:00.002+01:002013-02-11T22:36:45.793+01:00Un lenguaje de programacion para empezar en este mundo.<span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Scratch es un sistema grafico de programación bastante básico pero muy interesante para iniciarse en el mundo de la programación y muy divertido, hay miles de tutoriales y mucha información al respecto.</span><br style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; margin-top: 0px;" /><span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Para todo aquel que quiera iniciarse en este mundo es un buen modo de empezar para comprender el complejo mundo de la programacion.</span><br style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Desde aqui se peude descargar el entorno de programacion que es totalmente gratis y esta para Mac, Windows y linux.</span><br />
<span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><br /></span>
<a href="http://info.scratch.mit.edu/es/Scratch_1.4_Download">http://info.scratch.mit.edu/es/Scratch_1.4_Download</a><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtP7JzK19HGyYso1fU-KbQzWz8NJqwvR9c3igpIYmzP8L-FxnlSIF-2PYlxbVXib_4i7z5-uQCq1bYYIBpYuO4usmfzUfMogiIiDpLMZ81Kp75ITqIGRbQBvIELFHjeVgIvtImEGn9L08/s1600/Captura+de+pantalla+2013-02-11+a+la(s)+22.03.08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtP7JzK19HGyYso1fU-KbQzWz8NJqwvR9c3igpIYmzP8L-FxnlSIF-2PYlxbVXib_4i7z5-uQCq1bYYIBpYuO4usmfzUfMogiIiDpLMZ81Kp75ITqIGRbQBvIELFHjeVgIvtImEGn9L08/s400/Captura+de+pantalla+2013-02-11+a+la(s)+22.03.08.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/6JyBCx6WGJQ?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; text-align: -webkit-auto;">Bueno espero les guste y empiecen a hacer pruebas, y quizas algun dia se conviertan en unos grandes programadores.</span></div>
<span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; text-align: -webkit-auto;"><div style="text-align: center;">
Varios enlaces muy interesantes: </div>
</span><div style="text-align: center;">
<span style="color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><br /></span></div>
<a href="http://www.scribd.com/doc/35299373/Scratch-Manual">http://www.scribd.com/doc/35299373/Scratch-Manual</a><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<a href="http://www.scribd.com/doc/23081518/ManualdeScratch">http://www.scribd.com/doc/23081518/ManualdeScratch</a><br style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; text-align: -webkit-auto;" /><div style="text-align: center;">
<span style="color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><br /></span></div>
<span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; text-align: -webkit-auto;"><div style="text-align: center;">
Para cualquier duda ya sabeis que solo teneis que preguntar.</div>
</span><span style="background-color: #fcfcff; color: #2b485c; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; text-align: -webkit-auto;"><div style="text-align: center;">
Saludos.</div>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-91423940538036304022013-02-05T20:27:00.001+01:002013-02-05T20:27:16.244+01:00S4A Una sencilla y facil forma de programar nuestro Arduino.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMdE4wXFwK7WaBdrUcS2qMA83QpEbNtnBtj0GqMoFa5duG2PDT2b27ut8aJdPG6NIKaOeNxF3JHKrlT_jiq3WchQd5pugkzFaJ5eIgyU0Mgmny_5ZUwF8vi0Lyxr7Sn5OlaePos8G9E3c/s1600/Captura+de+pantalla+2013-02-05+a+la(s)+19.25.52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMdE4wXFwK7WaBdrUcS2qMA83QpEbNtnBtj0GqMoFa5duG2PDT2b27ut8aJdPG6NIKaOeNxF3JHKrlT_jiq3WchQd5pugkzFaJ5eIgyU0Mgmny_5ZUwF8vi0Lyxr7Sn5OlaePos8G9E3c/s400/Captura+de+pantalla+2013-02-05+a+la(s)+19.25.52.png" width="400" /></a></div>
<strong style="background-color: white; border: 0px; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;"><br /></strong>
<strong style="background-color: white; border: 0px; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;"><br /></strong>
<strong style="background-color: white; border: 0px; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;"><br /></strong>
<strong style="background-color: white; border: 0px; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;">Scratch for Arduino</strong><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"> (</span><strong style="background-color: white; border: 0px; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;">S4A</strong><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;">) </span><span style="background-color: white; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;">Es un proyecto creado por </span><em style="background-color: white; border: 0px; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;">Marina Conde, Víctor Casado, Joan Güell, José García y Jordi Delgado con la ayuda del Grupo de Programación Smalltalk del Citilab.</em><br />
<em style="background-color: white; border: 0px; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; margin: 0px; padding: 0px; text-align: left;"><br /></em>
<span style="background-color: white; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"> <b>Aqui teneis</b></span><span style="background-color: white; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"> su página web:<span style="color: #333333;"> </span></span><a href="http://seaside.citilab.eu/scratch/arduino"><span style="color: blue;">http://seaside.citilab.eu/scratch/arduino</span></a><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;">.</span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"><br /></span>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"><br /></span>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;">La forma de usarlo es bastante sencilla, tenemos que descargar el</span><span style="background-color: white; color: blue; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"> </span><span style="color: blue;"><a href="http://seaside.citilab.eu/S4AFirmware14.pde">firmware</a> </span>y una vez descargado abrimos el IDE oficial de Arduino:<br />
<br />
<div style="text-align: -webkit-auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuket3WQo-3hOvxSPuUf5gTvPQwiRvrJbBX9iD7qY5SMG82PVbXJlvagAEgmSHbisfcl6R4e-crh7jf6K7z4kV55sG3AEmWorOU6zeSUeILdPC2ulwwwbhVBg5ZNEGwK_2H_XoPYKuOjE/s1600/Captura+de+pantalla+2013-02-04+a+la(s)+22.05.34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuket3WQo-3hOvxSPuUf5gTvPQwiRvrJbBX9iD7qY5SMG82PVbXJlvagAEgmSHbisfcl6R4e-crh7jf6K7z4kV55sG3AEmWorOU6zeSUeILdPC2ulwwwbhVBg5ZNEGwK_2H_XoPYKuOjE/s400/Captura+de+pantalla+2013-02-04+a+la(s)+22.05.34.png" width="397" /></a></div>
<div style="text-align: -webkit-auto;">
Pegamos en el IDE el FirmWare descargado y con nuestro Arduino conectado lo verificamos y cargamos en el Arduino, recordad que tenéis que tener cerrado el S4A para que no entren en conflicto ambos programas, una vez cargado el " firmware" en nuestro Arduino ya podemos cerrar el IDE oficial y abrir el S4A.</div>
<div style="text-align: -webkit-auto;">
<br /></div>
<div style="text-align: -webkit-auto;">
Y ya podeis crear vuestros proyectos con el S4A es muy secillo pues esta en Español y una vez sepamos lo que queremos hacer solo es cuestión de ir arrastrando instrucciones al entorno.</div>
<div style="text-align: -webkit-auto;">
<br /></div>
<div style="text-align: -webkit-auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyp-CkvUoxKaX47S2n3zzq8_fnuNqN9kK9Q3RNBQ8a6xhVW1bI1PEWrjH48nSc3nQlcD2MxG9n2qdW-GY_q1bGwWgHYxgI4jMLIZe-AEsgFyihl0qbF1VSINTzvDOxeD-mYz6fT1JHBYM/s1600/Captura+de+pantalla+2013-02-05+a+la(s)+20.06.26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="363" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyp-CkvUoxKaX47S2n3zzq8_fnuNqN9kK9Q3RNBQ8a6xhVW1bI1PEWrjH48nSc3nQlcD2MxG9n2qdW-GY_q1bGwWgHYxgI4jMLIZe-AEsgFyihl0qbF1VSINTzvDOxeD-mYz6fT1JHBYM/s400/Captura+de+pantalla+2013-02-05+a+la(s)+20.06.26.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Este es el programa mas basico en Arduino y que enciende un LED pinchado en la salida digital nº 13, lo enciende durante un segundo y lo apaga un segundo y así sucesivamente.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Su equivalente en S4A seria esto:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzJGnjtJSJhNosn_lL9env-4-emqXqFv0R4uONgOdYnohJknvnOXolM6Df3HLknujZIhyphenhyphenbUvx3p6KbSPOTzjBR5eHS_17-SvsklZEBIlfHuM02EaBF2K2Vp0tJ868vTsOKBGp6E4hXeUM/s1600/Captura+de+pantalla+2013-02-05+a+la%2528s%2529+20.04.22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzJGnjtJSJhNosn_lL9env-4-emqXqFv0R4uONgOdYnohJknvnOXolM6Df3HLknujZIhyphenhyphenbUvx3p6KbSPOTzjBR5eHS_17-SvsklZEBIlfHuM02EaBF2K2Vp0tJ868vTsOKBGp6E4hXeUM/s400/Captura+de+pantalla+2013-02-05+a+la%2528s%2529+20.04.22.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Como se puede apreciar la forma gráfica de S4A es mucho mas sencilla y fácil de aprender.</div>
<div class="separator" style="clear: both; text-align: center;">
Dentro del propio programa hay un montón de ejemplos incluso podemos utilizar el Arduino para crear juegos y muchísimas cosas mas, creo que esto abre un abanico de nuevas posibilidades para nuestro Arduino.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUyXPQ4HkrUY2PV5WCOBmljG3o_Rky-pPjB5YG2C2Ljes3Jkh9xc4RsB_51iEJaZ1gNQQx1hIiVI7eK7aoD48rD-F2I_diRyT2vxf5UWniw-4EoiUAya1vBoAgEnxw1bIkdFWwmj640pU/s1600/Captura+de+pantalla+2013-02-05+a+la(s)+20.18.24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUyXPQ4HkrUY2PV5WCOBmljG3o_Rky-pPjB5YG2C2Ljes3Jkh9xc4RsB_51iEJaZ1gNQQx1hIiVI7eK7aoD48rD-F2I_diRyT2vxf5UWniw-4EoiUAya1vBoAgEnxw1bIkdFWwmj640pU/s400/Captura+de+pantalla+2013-02-05+a+la(s)+20.18.24.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Bueno, en internet hay mucha información al respecto sobre este apasionante mundo del Arduino y sus aplicaciones y sobre el S4A.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.arduteka.com/">http://www.arduteka.com</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://seaside.citilab.eu/scratch?_s=u9mmg_e_e0diroVu&_k=mWeom57Oyev3NfKg">http://seaside.citilab.eu/</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.arduino.cc/es/">http://www.arduino.cc/es/</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: -webkit-auto;">
Un saludo y espero les guste, para cualquier duda dejen sus comentarios y preguntas y les responderé lo antes posible.</div>
<div style="text-align: -webkit-auto;">
Gracias.</div>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"><br /></span>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 13px; line-height: 17px; text-align: left;"><br /></span>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com1tag:blogger.com,1999:blog-1031125856269220070.post-16631899331337351182013-01-26T14:46:00.001+01:002013-01-26T14:46:58.362+01:00Unboxing de mi Kit de Arduino UNO R3.<iframe allowfullscreen="" frameborder="0" height="270" src="http://www.youtube.com/embed/v9_NL56WNdY" width="480"></iframe>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-31535499946177270382013-01-24T16:46:00.000+01:002013-01-24T17:22:00.613+01:00Proyecto Coche Fantastico con Arduino.<h2>
<span style="color: blue; font-family: Times, Times New Roman, serif; font-size: x-large;"> Luces tipo "Coche Fantastico" con Arduino.</span></h2>
<div>
<span style="color: #38761d;"><br /></span></div>
<div>
<span style="color: #38761d;"><br /></span></div>
<div>
Hacer que seis LEDs se enciendan progresivamente, consiguiendo el efecto que todos recordamos de la peli "El coche Fantastico".</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Material Empleado:</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
-Una Placa Arduino UNO R3 (en mi caso).</div>
<div>
- 6 LEDs Rojos.</div>
<div>
- 6 Resistencias de 220 Ohm.</div>
<div>
- Varios cables para hacer los puentes.</div>
<div>
- Una Placa de prototipos.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Este es el cableado:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqPOqxkzBjrGAMTzPp6791xqXLaNP3SnKjS9clMlFS3l0pHsErCSSsk92Nj7A1JjO0ucJfg7L-bKEeNNFecQBS3sJDYFuo3DGrxw67-yd__nSfkP6B_uux5J6lDQ1uHTDHTMjGeY6zzDw/s1600/Captura+de+pantalla+2013-01-24+a+la(s)+15.56.43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="499" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqPOqxkzBjrGAMTzPp6791xqXLaNP3SnKjS9clMlFS3l0pHsErCSSsk92Nj7A1JjO0ucJfg7L-bKEeNNFecQBS3sJDYFuo3DGrxw67-yd__nSfkP6B_uux5J6lDQ1uHTDHTMjGeY6zzDw/s640/Captura+de+pantalla+2013-01-24+a+la(s)+15.56.43.png" width="640" /></a></div>
<div>
<br /></div>
<div>
Este es el Código necesario para hacer funcionar el Arduino:</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<div style="text-align: left;">
<span class="kw1" style="background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;">int</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"> timer </span><span class="sy0" style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;">=</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"> 5</span><span class="nu0" style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;">0</span><span class="sy0" style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;">;</span><span class="co1" style="background-color: white; color: #7e7e7e; font-family: monospace; font-size: x-small; font-style: italic; line-height: 12px;">// Este es el retardo de encendido de un led a otro.</span></div>
<span class="kw1" style="background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;"></span><br />
<div style="text-align: left;">
<span class="kw1" style="background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;"><span class="kw1">void</span> <span class="kw3" style="font-weight: bold;">setup</span><span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span></span></div>
<span class="kw1" style="background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;">
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"></span>
<div style="text-align: left;">
<span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"> </span></div>
<span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;">
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">for</span> <span class="br0">(</span><span class="kw1" style="color: #cc6600;">int</span> thisPin <span class="sy0">=</span> <span class="nu0">2</span><span class="sy0">;</span> thisPin <span class="sy0"><</span> <span class="nu0">8</span><span class="sy0">;</span> thisPin<span class="sy0">++</span><span class="br0">)</span> <span class="br0">{</span><br />
<span class="sy0" style="background-color: white;">//Aqui le estamos diciendo que los pines del 2 al 8 son de salida</span><span style="background-color: white;"> </span><br />
<span style="background-color: white;"> </span><span class="kw1" style="background-color: white; color: #cc6600;">pinMode</span><span class="br0" style="background-color: white;">(</span><span style="background-color: white;">thisPin</span><span class="sy0" style="background-color: white;">,</span><span style="background-color: white;"> </span><span class="kw2" style="background-color: white; color: #006699;">OUTPUT</span><span class="br0" style="background-color: white;">)</span><span class="sy0" style="background-color: white;">;</span><span style="background-color: white;"> </span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="br0">}</span></div>
</span><span class="br0" style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
}</div>
</span><span class="kw1" style="background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1">void</span> <span class="kw3" style="font-weight: bold;">loop</span><span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
</div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">for</span> <span class="br0">(</span><span class="kw1" style="color: #cc6600;">int</span> thisPin <span class="sy0">=</span> <span class="nu0">2</span><span class="sy0">;</span> thisPin <span class="sy0"><</span> <span class="nu0">8</span><span class="sy0">;</span> thisPin<span class="sy0">++</span><span class="br0">)</span> <span class="br0">{</span> </div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="co1" style="color: #7e7e7e; font-style: italic;">// Aqui le decimos que encienda los pines del 2 al 8</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">digitalWrite</span><span class="br0">(</span>thisPin<span class="sy0">,</span> <span class="kw2" style="color: #006699;">HIGH</span><span class="br0">)</span><span class="sy0">;</span> </div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">delay</span><span class="br0">(</span>timer<span class="br0">)</span><span class="sy0">;</span> </div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="co1" style="color: #7e7e7e; font-style: italic;">// delay es la pausa entre encendidos.</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">digitalWrite</span><span class="br0">(</span>thisPin<span class="sy0">,</span> <span class="kw2" style="color: #006699;">LOW</span><span class="br0">)</span><span class="sy0">;</span> </div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="br0">}</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span style="color: #7e7e7e;"><i>//Cuando termina de encender todos los pines empieza al contrario</i></span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">for</span> <span class="br0">(</span><span class="kw1" style="color: #cc6600;">int</span> thisPin <span class="sy0">=</span> <span class="nu0">7</span><span class="sy0">;</span> thisPin <span class="sy0">>=</span> <span class="nu0">2</span><span class="sy0">;</span> thisPin<span class="sy0">--</span><span class="br0">)</span> <span class="br0">{</span> </div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="co1" style="color: #7e7e7e; font-style: italic;">// Ahora los enciende del 7 al 2</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">digitalWrite</span><span class="br0">(</span>thisPin<span class="sy0">,</span> <span class="kw2" style="color: #006699;">HIGH</span><span class="br0">)</span><span class="sy0">;</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">delay</span><span class="br0">(</span>timer<span class="br0">)</span><span class="sy0">;</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="co1" style="color: #7e7e7e; font-style: italic;">// tambien realiza la pausa o retraso con delay</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="kw1" style="color: #cc6600;">digitalWrite</span><span class="br0">(</span>thisPin<span class="sy0">,</span> <span class="kw2" style="color: #006699;">LOW</span><span class="br0">)</span><span class="sy0">;</span></div>
</span><span style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
<span class="br0">}</span></div>
</span><span class="br0" style="background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;"><div style="text-align: left;">
}</div>
</span><br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAOIGwNJz-yD0D0WdXnSziXFxijLVODmPPrzQro8jMI-0o-wFHbFKpPfycWRpQbzdv3NTNRIYZLJS6Me67DWUaj3lYRjbXCFqCHihynUyt3zfGnfiq6QOC6G8BCimg8byqoN916fDQwAo/s1600/IMG_2575.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="476" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAOIGwNJz-yD0D0WdXnSziXFxijLVODmPPrzQro8jMI-0o-wFHbFKpPfycWRpQbzdv3NTNRIYZLJS6Me67DWUaj3lYRjbXCFqCHihynUyt3zfGnfiq6QOC6G8BCimg8byqoN916fDQwAo/s640/IMG_2575.JPG" width="640" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dzhA0kL2Kw01x6z6KAObwxzjugvpdmpH72uO1Ae75oWThTikCFwVlJRWiW6C8BuymeW4BvSPg5MiN_qiE7x' class='b-hbp-video b-uploaded' frameborder='0'></iframe><br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-43855527643894066392013-01-18T20:12:00.001+01:002013-01-18T20:12:47.972+01:00[Tutoriales iOS] Episodio 17 - Integración con Redes Sociales (Twitter ...Nuevo tutorial del maestro Mario Giron.<br />
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="344" src="http://www.youtube.com/embed/uIQYOlGOG5E" width="459"></iframe>Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-72790494711394410362013-01-13T13:38:00.000+01:002013-01-13T13:38:03.541+01:00Arduino, mi ultimo descubrimiento.Pues Arduino es mi ultimo descubrimiento, bueno ya se que que lleva muchos años en la scene pero yo le he descubierto hace unos días.<br />
<br />
Ya tengo pedidos mi Arduino Uno R3 y un montón de sensores y y accesorios para esta fabulosa placa.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0mS3VZfdVs4RpK0FifCdMsBZE_ERpNvUfY-UAn015AOEh8Piqxh9V-o_HdIR63mvD6D5Fdo2KB2v2Iix8VpBAZXqe08t3aJhvzpTfAdBStPVxVBTkFFxtpB3Mto_NtvIdf0r8AOk2qeE/s1600/ArduinoUnoR3Front.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0mS3VZfdVs4RpK0FifCdMsBZE_ERpNvUfY-UAn015AOEh8Piqxh9V-o_HdIR63mvD6D5Fdo2KB2v2Iix8VpBAZXqe08t3aJhvzpTfAdBStPVxVBTkFFxtpB3Mto_NtvIdf0r8AOk2qeE/s400/ArduinoUnoR3Front.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Enlace a la pagina Oficial de Aruino : <a href="http://arduino.cc/es/Guide/HomePage">http://arduino.cc/es/Guide/HomePage</a><br />
<br />
Foro en Español sobre Arduino : <a href="http://arduino.cc/forum/index.php/board,32.0.html" target="_blank"> Foro en español sobre Arduino</a><br />
<br />
<br />
Dispone de in entorno de programacion muy intuitivo y un lenguaje propio.<br />
<span style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px;"><br /></span>
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;">Los programas hechos con Arduino se dividen en tres partes principales: </span><em style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;">estructura</em><span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;">, </span><em style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;">valores</em><span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"> (variables y constantes), y</span><em style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;">funciones</em><span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;">. El Lenguaje de programación Arduino se basa en C/C++.</span><br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"><br /></span>
<table border="0" cellpadding="5" cellspacing="0" style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px; width: 100%px;"><tbody>
<tr><td valign="top" width="33%"><h2 style="color: #333333; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; margin-top: 30px;">
Estructura</h2>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Setup" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">setup</a>() <em>(inicialización)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Loop" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">loop</a>() <em>(bucle)</em></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Estructuras de control</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">if</a> <em>(comparador si-entonces)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Else" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">if...else</a> <em>(comparador si...sino)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/For" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">for</a> <em>(bucle con contador)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/SwitchCase" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">switch case</a> <em>(comparador múltiple)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/While" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">while</a> <em>(bucle por comparación booleana)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/DoWhile" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">do... while</a> <em>(bucle por comparación booleana)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Break" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">break</a> <em>(salida de bloque de código)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Continue" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">continue</a> <em>(continuación en bloque de código)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Return" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">return</a> <em>(devuelve valor a programa)</em></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Sintaxis</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/SemiColon" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">;</a> (punto y coma)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Braces" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">{}</a> (llaves)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Comments" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">//</a> (comentarios en una línea)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Comments" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">/* */</a> (comentarios en múltiples líneas)</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Operadores Aritméticos</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Assignment" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">= (asignación)</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Arithmetic" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">+ (suma)</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Arithmetic" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">- (resta)</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Arithmetic" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">* (multiplicación)</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Arithmetic" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">/ (división)</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Modulo" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">% (resto)</a></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Operadores Comparativos</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">==</a> (igual a)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">!=</a> (distinto de)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;"><</a> (menor que)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">></a> (mayor que)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;"><=</a> (menor o igual que)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/If" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">>=</a> (mayor o igual que)</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Operadores Booleanos</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Boolean" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">&&</a> (y)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Boolean" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">||</a> (o)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Boolean" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">!</a> (negación)</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Operadores de Composición</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Increment" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">++</a> (incrementa)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Increment" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">--</a> (decrementa)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/IncrementCompound" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">+=</a> (composición suma)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/IncrementCompound" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">-=</a> (composición resta)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/IncrementCompound" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">*=</a> (composición multiplicación)</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/IncrementCompound" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">/=</a> (composición división)</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
</td><td valign="top" width="33%"><div class="vspace" style="margin-top: 1.33em;">
</div>
<h2 style="color: #333333; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; margin-top: 30px;">
Variables</h2>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Constantes</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Constants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">HIGH</a> | <a class="wikilink" href="http://arduino.cc/es/Reference/Constants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">LOW</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Constants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">INPUT</a> | <a class="wikilink" href="http://arduino.cc/es/Reference/Constants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">OUTPUT</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Constants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">true</a> | <a class="wikilink" href="http://arduino.cc/es/Reference/Constants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">false</a><div class="vspace" style="margin-top: 1.33em;">
</div>
</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/IntegerConstants" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">Constantes Numéricas</a></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Tipos de Datos</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/BooleanVariables" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">boolean</a> <em>(booleano)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Char" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">char</a> <em>(carácter)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Byte" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">byte</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Int" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">int</a> <em>(entero)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/UnsignedInt" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">unsigned int</a> <em>(entero sin signo)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Long" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">long</a> <em>(entero 32b)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/UnsignedLong" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">unsigned long</a> <em>(entero 32b sin signo)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Float" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">float</a> <em>(en coma flotante)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Double" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">double</a> <em>(en coma flotante de 32b)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/String" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">string</a> <em>(cadena de caracteres)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Array" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">array</a> <em>(cadena)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Void" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">void</a> <em>(vacío)</em></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<h4 style="color: #e34c00; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; letter-spacing: 0.1em; margin-bottom: 5px;">
Conversión</h4>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/CharCast" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">char()</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/ByteCast" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">byte()</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/IntCast" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">int()</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/LongCast" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">long()</a></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/FloatCast" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">float()</a></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
</td><td valign="top" width="33%"><h2 style="color: #333333; font-family: 'Lucida Sans', Lucida, Verdana, sans-serif; margin-top: 30px;">
Funciones</h2>
<strong>E/S Digitales</strong><br />
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/PinMode" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">pinMode</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/DigitalWrite" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">digitalWrite</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/DigitalRead" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">digitalRead</a>()</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>E/S Analógicas</strong><br />
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/AnalogRead" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">analogRead</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/AnalogWrite" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">analogWrite</a>() - <em>PWM</em> <em>(modulación por ancho de pulso)</em></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>E/S Avanzadas</strong><br />
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Tone" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">tone</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/NoTone" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">noTone</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/ShiftOut" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">shiftOut</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/PulseIn" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">pulseIn</a>()</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>Tiempo</strong><br />
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Millis" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">millis</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Micros" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">micros</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Delay" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">delay</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/DelayMicroseconds" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">delayMicroseconds</a>()</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>Matemáticas</strong><br />
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Min" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">min</a>() <em>(mínimo)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Max" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">max</a>() <em>(máximo)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Abs" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">abs</a>() <em>(valor absoluto)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Constrain" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">constrain</a>() <em>(limita)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Map" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">map</a>() <em>(cambia valor de rango)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Pow" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">pow</a>() <em>(eleva a un número)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Sq" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">sq</a>() <em>(eleva al cuadrado)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Sqrt" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">sqrt</a>() <em>(raíz cuadrada)</em></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>Trigonometría</strong><br />
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Sin" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">sin</a>() <em>(seno)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Cos" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">cos</a>() <em>(coseno)</em></li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Tan" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">tan</a>() <em>(tangente)</em></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>Números Aleatorios</strong><br />
<div class="vspace" style="margin-top: 1.33em;">
</div>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/RandomSeed" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">randomSeed</a>()</li>
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Random" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">random</a>()</li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>Communicación</strong><br />
<div class="vspace" style="margin-top: 1.33em;">
</div>
<ul style="list-style-image: url(http://arduino.cc/es/pub/skins/arduinoWide_SSO/img/bullet.gif); list-style-position: inside; margin: 0px; padding-left: 10px;">
<li><a class="wikilink" href="http://arduino.cc/es/Reference/Serial" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">Serial</a></li>
</ul>
<div class="vspace" style="margin-top: 1.33em;">
</div>
<br clear="all" />
<div class="vspace" style="margin-top: 1.33em;">
</div>
<strong>Echás algo en falta?</strong> Visita la<a class="wikilink" href="http://arduino.cc/es/Reference/Extended" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">referencia extendida</a> o la <a class="wikilink" href="http://arduino.cc/es/Reference/Libraries" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">página de librerías</a>. También puedes visitar la<a class="urllink" href="http://www.arduino.cc/playground/Main/GeneralCodeLibrary" rel="nofollow" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">página de código propuesto por la comunidad</a>.<br />
<div class="vspace" style="margin-top: 1.33em;">
</div>
</td></tr>
</tbody></table>
<br />
<div style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px;">
<a class="selflink" href="http://arduino.cc/es/Reference/HomePage" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">Página principal Referencia</a></div>
<div class="vspace" style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px; margin-top: 1.33em;">
</div>
<div style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px;">
<em>Correcciones, sugerencias, y nueva documentación deberán ser publicadas en el <a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=espanol" rel="nofollow" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">Foro (castellano)</a> o en el <a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs" rel="nofollow" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">Foro (inglés)</a>.</em></div>
<div class="vspace" style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px; margin-top: 1.33em;">
</div>
<div style="background-color: white; color: #555555; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 14px; line-height: 23px;">
El texto de la referencia de Arduino está publicado bajo la licencia <a class="urllink" href="http://creativecommons.org/licenses/by-sa/3.0/deed.es" rel="nofollow" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; color: black; text-decoration: none !important;">Creative Commons Reconocimiento-Compartir bajo la misma licencia 3.0</a>. Los ejemplos de código de la referencia están liberados al dominio público.</div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-36387399021024647632012-12-30T18:10:00.005+01:002012-12-30T18:10:55.836+01:00Crear un Reproductor de audio en XCode.<div class="separator" style="clear: both; text-align: center;">
</div>
<h2 style="text-align: center;">
<span style="color: blue;">Crear un Reproductor de audio en XCode.</span></h2>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7g67WXZAaLBYEAPTPQQBLE7Y5vygNmYMt6GGvVeyYvL4G670HRDPPmW0MbBMLtnA6qutTEKsSp-2ERVrHeSKCljLbTCmoF77TPadtw60_cnTZBRvBHV3p0_RND7imR-UOxGP5Z-kPQIM/s1600/Captura+de+pantalla+2012-12-30+a+la(s)+18.02.55.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7g67WXZAaLBYEAPTPQQBLE7Y5vygNmYMt6GGvVeyYvL4G670HRDPPmW0MbBMLtnA6qutTEKsSp-2ERVrHeSKCljLbTCmoF77TPadtw60_cnTZBRvBHV3p0_RND7imR-UOxGP5Z-kPQIM/s320/Captura+de+pantalla+2012-12-30+a+la(s)+18.02.55.png" width="165" /></a></div>
<h2>
<span style="font-weight: normal;">Crear un simple reproductor de audio en el que podemos hacer Play, Pause y Stop, y nos muestra una etiqueta con algunos datos del archivo de audio que estamos reproduciendo.</span></h2>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
Código del Archivo ViewController.h:</div>
<div>
<br /></div>
<div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// ViewController.h</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// audio</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Created by Francisco on 28/12/12.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Copyright (c) 2012 Francisco. All rights reserved.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: #78492a;">#import </span><UIKit/UIKit.h></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: #78492a;">#import </span><span style="color: #d12f1b;"><AVFoundation/AVFoundation.h></span><span style="color: #78492a;"> </span>//Importamos el Framework para poder usar los metodos de AVAdioPlayer</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #703daa; font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@interface</span><span style="color: black;"> ViewController : </span>UIViewController<span style="color: black;"> <</span>AVAudioPlayerDelegate<span style="color: black;">></span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//Creamos un objeto llamado reproductor que heredada de la clase AVAudioPlayer.</div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>nonatomic<span style="color: black;">,</span>strong<span style="color: black;">)</span><span style="color: #703daa;">AVAudioPlayer</span><span style="color: black;"> *reproductor;</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//Creamos un objeto etiqueta que hereda de la clase UILabel, donde mostraremos datos de la reproducccion.</div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@property<span style="color: black;"> (</span>strong<span style="color: black;">, </span>nonatomic<span style="color: black;">) </span>IBOutlet<span style="color: black;"> </span><span style="color: #703daa;">UILabel</span><span style="color: black;"> *etiqueta;</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)play:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)pause:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)stop:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)cambioVolumen:(<span style="color: #bb2ca2;">id</span>)sender;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Código Archivo ViewController.m:</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// ViewController.m</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// audio</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Created by Francisco on 28/12/12.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
// Copyright (c) 2012 Francisco. All rights reserved.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
//</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: #78492a;">#import </span>"ViewController.h"</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@interface</span><span style="color: black;"> </span>ViewController<span style="color: black;"> ()</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@implementation</span> ViewController</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">@synthesize</span> reproductor,etiqueta;</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">void</span>)viewDidLoad</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">super</span><span style="color: black;"> </span>viewDidLoad<span style="color: black;">];</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Creamos el reproductor y le damos la ruta donde tenemos el archivo de audio</div>
<div style="font-family: Menlo; font-size: 11px;">
NSError *error;</div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #703daa;">NSString</span><span style="color: black;"> *ruta =[[</span><span style="color: #703daa;">NSBundle</span><span style="color: black;"> </span>mainBundle<span style="color: black;">]</span>pathForResource<span style="color: black;">:</span><span style="color: #d12f1b;">@"Adele"</span><span style="color: black;"> </span>ofType<span style="color: black;">:</span><span style="color: #d12f1b;">@"mp3"</span><span style="color: black;">];</span></div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #703daa;">NSURL</span><span style="color: black;"> *url =[[</span><span style="color: #703daa;">NSURL</span><span style="color: black;"> </span>alloc<span style="color: black;">]</span>initFileURLWithPath<span style="color: black;">:ruta];</span></div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">=[[</span><span style="color: #703daa;">AVAudioPlayer</span><span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithContentsOfURL<span style="color: black;">:url </span>error<span style="color: black;">:&error];</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">pan</span><span style="color: black;"> =</span><span style="color: #272ad8;">0</span><span style="color: black;">;</span>// Es para darle el Balance, altavoz derecho o altavoz izquerdo, -1 Izquerda, 0 se escucha igual en los dos, y 1 solo la derecha.</div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span>reproductor<span style="color: black;">.</span><span style="color: #703daa;">enableRate</span><span style="color: black;">=</span><span style="color: #bb2ca2;">YES</span><span style="color: black;">;</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">rate</span><span style="color: black;">=</span><span style="color: #272ad8;">1</span><span style="color: black;">;</span>// Es para la velocidad de reproduccion va de 0.5 a 2.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">numberOfLoops</span><span style="color: black;"> =-</span><span style="color: #272ad8;">1</span><span style="color: black;">;</span>//Para determinar el numero de repeticiones del archivo.Si ponemos un signo negativo se repite indefinidamente y con un numero positivo ejemplo 3, se repite tres veces.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">volume</span><span style="color: black;">=</span><span style="color: #272ad8;">1</span><span style="color: black;">;</span>//Maneja el volumen y su valor es entre 0 y 1.</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;"> </span><span style="color: #3d1d81;">prepareToPlay</span><span style="color: black;">];</span>//Aqui le estamos diciendo que se prepare para reproducir sonido y asi es mas rapido cuando pulsamos play.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">void</span>)didReceiveMemoryWarning</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">super</span><span style="color: black;"> </span>didReceiveMemoryWarning<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)play:(<span style="color: #bb2ca2;">id</span>)sender {</div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span>reproductor<span style="color: black;"> </span><span style="color: #3d1d81;">play</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)pause:(<span style="color: #bb2ca2;">id</span>)sender {</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #4f8187;">etiqueta</span><span style="color: black;">.</span><span style="color: #703daa;">text</span><span style="color: black;"> = [[</span><span style="color: #703daa;">NSString</span><span style="color: black;"> </span><span style="color: #3d1d81;">alloc</span><span style="color: black;">]</span><span style="color: #3d1d81;">initWithFormat</span><span style="color: black;">:</span>@"Duracion: %f, TiempoTranscurrido: %f Volumen: %f"<span style="color: black;">,</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">duration</span><span style="color: black;">,</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">currentTime</span><span style="color: black;">,</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span><span style="color: #4f8187;">reproductor</span><span style="color: black;">.</span><span style="color: #703daa;">volume</span><span style="color: black;">];</span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span>reproductor<span style="color: black;"> </span><span style="color: #3d1d81;">pause</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)stop:(<span style="color: #bb2ca2;">id</span>)sender {</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #bb2ca2;">self</span><span style="color: black;">.</span>reproductor<span style="color: black;"> </span><span style="color: #3d1d81;">stop</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #bb2ca2;">IBAction</span>)cambioVolumen:(<span style="color: #bb2ca2;">id</span>)sender {</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2;">self</span>.<span style="color: #4f8187;">reproductor</span>.<span style="color: #703daa;">volume</span>=((<span style="color: #703daa;">UISlider</span> *)sender).<span style="color: #703daa;">value</span>;</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #bb2ca2;">void</span>)audioPlayerDidFinishPlaying:(<span style="color: #703daa;">AVAudioPlayer</span> *)player successfully:(<span style="color: #bb2ca2;">BOOL</span>)flag</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Con este metodo podemos saber si nuestro audio a finalizado y si a llegado al final del archivo de audio y hacer algo, tambien tenemos una bandera"flag" con un valor Booleano que nos da YES si el audio a terminado y NO si no a finalizado.</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px;">
@end</div>
</div>
<div>
<br /></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com4tag:blogger.com,1999:blog-1031125856269220070.post-59241929845351888952012-12-09T19:23:00.001+01:002012-12-09T19:23:53.543+01:00Bucles y Sentencias de Control de Flujo.<br />
<div style="font-family: Menlo; font-size: 14px;">
<span style="text-decoration: underline;"><b>Bucles y Sentencias de Control de Flujo.</b></span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
entero<span style="color: black;"> = 9;</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Aqui le estamos diciendo que si entero es igual a once se ejecute el código contenido entre las {} , si entero fuese distinto a nueve, la ejecución continuaría sin hacer nada. </div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">if</span> (<span style="color: #3495af;">entero</span> ==9) {</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es igual a :%i"<span style="color: black;">,</span><span style="color: #3495af;">entero</span><span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Esta sentencia de control de flujo llamada, if ejecuta el código si se cumple la condición dada entre perentesis, en este caso que entero sea menor que once y si no se cumple se ejecuta el código siguiente a la sentencia else.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">if</span> (<span style="color: #3495af;">entero</span><11) {</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es menor que Once"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
} <span style="color: #0433ff;">else</span> {</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es mayor que Once"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//El bucle For se repite mientras la condición sea cierta, en este caso que i sea menor o igual a 10.</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">for</span> (<span style="color: #0433ff;">int</span> i=0; i<=10; i++) {</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"El valor de i es: %i"<span style="color: black;">,i);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//En este bucle lo primero que hace es comprobar que lo de la linea While sea cierto y si es cierto se ejecuta el condigo siguiente bajo la linea de comprobación y si la condición no se cumple sale del bucle sin ejecutarse.</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">while</span> (<span style="color: #3495af;">entero</span><10) {</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es aun menor que 10 %i"<span style="color: black;">,</span><span style="color: #3495af;">entero</span><span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">entero</span>++;</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>// Este bucle se repite mientras la sentencia de la linea del While se cierta, por lo tanto siempre se ejecuta una vez al menos.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">do</span> {</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Esto es del Do While"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">entero</span>++;</div>
<div style="font-family: Menlo; font-size: 11px;">
} <span style="color: #0433ff;">while</span> (<span style="color: #3495af;">entero</span><10);</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>// SWitch permite que según el valor de una variable se ejecute un determinado código y si ninguno de los valores case coincidiese con el valor de la variable , entonces se ejecuta el código situado bajo la sentencia default.</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">switch</span> (<span style="color: #3495af;">entero</span>) {</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">case</span> 1:</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es igual a uno."<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">break</span>;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">case</span> 2:</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es igual a dos"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">break</span>;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">case</span> 3:</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Entero es igual a tres"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">break</span>;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">default</span>:</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">break</span>;</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-41286070505850403242012-12-06T14:35:00.002+01:002012-12-06T14:35:51.931+01:00<br />
<div style="font-family: 'Lucida Grande'; font-size: 19px; margin-bottom: 4px;">
Creación y Uso de NSArray ,NSMutableArray ,NSDictionary y NSMutableDictionary.</div>
<div style="font-family: 'Lucida Grande'; font-size: 19px; margin-bottom: 4px; min-height: 22px;">
<br /></div>
<div style="font-family: 'Lucida Grande'; font-size: 19px; margin-bottom: 4px;">
NSArray:</div>
<div style="font-family: 'Lucida Grande'; font-size: 14px; margin-bottom: 4px;">
Para crear un arras que no puede ser modificado:</div>
<div style="font-family: 'Lucida Grande'; font-size: 14px; margin-bottom: 4px; min-height: 17px;">
<br /></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
NSArray<span style="color: black;"> *array =[</span>NSArray<span style="color: black;"> </span>arrayWithObjects<span style="color: black;">:</span><span style="color: #b4261a;">@"Uno"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Dos"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Tres"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Cuatro"</span><span style="color: black;">, </span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Muestra por consola el objeto situado en la posición tres:(recordar que empieza a contar desde :0,1,2…):</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"El Objeto en la posición 3 es: %@"<span style="color: black;">,[array </span><span style="color: #3495af;">objectAtIndex</span><span style="color: black;">:2]);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
Esto da como resultado:<b>El Objeto en la posición 3 es: Tres.</b></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Para saber el numero de objetos de un Array:</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Numero objetos Array %i"<span style="color: black;">,[array </span><span style="color: #3495af;">count</span><span style="color: black;">]);</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<b></b><br /></div>
<div style="font-family: Helvetica; font-size: 18px;">
NSMutableArray:</div>
<div style="font-family: Helvetica; font-size: 12px; min-height: 14px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 12px;">
Crear un NSMutableArray , que es un Array que se puede modificar.</div>
<div style="font-family: Helvetica; font-size: 12px; min-height: 14px;">
<br /></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
NSMutableArray<span style="color: black;"> *mutablearray =[</span>NSMutableArray<span style="color: black;"> </span>arrayWithObjects<span style="color: black;">:</span><span style="color: #b4261a;">@"Primero"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Segundo"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Tercero"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Cuarto"</span><span style="color: black;">, </span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Para añadir un objeto al Array:</div>
<div style="font-family: Menlo; font-size: 11px;">
[mutablearray <span style="color: #3495af;">addObject</span>:<span style="color: #b4261a;">@"Quinto"</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Para Insertar un objeto en un lugar determinado del array teniendo en cuenta que empieza a contar desde cero:</div>
<div style="font-family: Menlo; font-size: 11px;">
[mutablearray <span style="color: #3495af;">insertObject</span>:<span style="color: #b4261a;">@"Septimo"</span> <span style="color: #3495af;">atIndex</span>:2];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Para reemplazr un objeto en un lugar determinado:</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;">[mutablearray </span>replaceObjectAtIndex<span style="color: black;">:0 </span>withObject<span style="color: black;">:</span><span style="color: #b4261a;">@"Dos"</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Para borrar un objeto determinado:</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;">[mutablearray </span>removeObjectAtIndex<span style="color: black;">:2];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
También se puede borrar por el nombre del objeto:</div>
<div style="font-family: Menlo; font-size: 11px;">
[mutablearray <span style="color: #3495af;">removeObject</span>:<span style="color: #b4261a;">@"Primero"</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Borrar todos los Objetos del Array:</div>
<div style="font-family: Menlo; font-size: 11px;">
[mutablearray <span style="color: #3495af;">removeAllObjects</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Para saber el numero de objetos que tiene un Array o Mutablearray usamos la palabra reservada "<b>count</b>":</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Numero Objetos Mutablearray %i"<span style="color: black;">,mutablearray.</span><span style="color: #3495af;">count</span><span style="color: black;">);</span></div>
<div style="font-family: 'Lucida Grande'; font-size: 14px; margin-bottom: 4px;">
Tiene muchos métodos mas pero estos son los mas usados.</div>
<div style="font-family: 'Lucida Grande'; font-size: 14px; margin-bottom: 4px; min-height: 17px;">
<br /></div>
<div style="font-family: 'Lucida Grande'; font-size: 18px; margin-bottom: 4px;">
<b>NSDictionary.</b></div>
<div style="font-family: 'Lucida Grande'; font-size: 14px; margin-bottom: 4px;">
Crear un NSDictionary:</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
NSDictionary<span style="color: black;"> *dictionary = [</span>NSDictionary<span style="color: black;"> </span>dictionaryWithObjects<span style="color: black;">:mutablearray </span>forKeys<span style="color: black;">:array];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
Notese que hemos usado al array creado anteriormente como indice y el mutableArray también creado anteriormente como forKey.</div>
<div style="font-family: Menlo; font-size: 11px;">
Si ponemos un NSLog el resultado seria este:</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Esto es el Dictionary %@"<span style="color: black;">,dictionary);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<b>Esto es el Dictionary {</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Cuatro = Cuarto;</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Dos = Segundo;</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Tres = Tercero;</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Uno = Primero;</b></div>
<div style="font-family: Menlo; font-size: 11px;">
Notese que lo ordena por orden alfabetico.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Asi podemos sacar por consola el ForKey de de un objeto del Dictionary, esto nos daría como resultado:<b>Tercero</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSLog</span>(<span style="color: #b4261a;">@"%@"</span>,[dictionary <span style="color: #3495af;">objectForKey</span>:<span style="color: #b4261a;">@"Tres"</span>]);</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 18px;">
<b>NSMutableDictionary:</b></div>
<div style="font-family: Menlo; font-size: 18px; min-height: 21px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 14px;">
Creamos un NSMutableArray vacio:</div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<br /></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
NSMutableDictionary<span style="color: black;"> * mutableDictionary =[[</span>NSMutableDictionary<span style="color: black;"> </span>alloc<span style="color: black;">]</span>init<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
Lo rellenamos.</div>
<div style="font-family: Menlo; font-size: 11px;">
Al forKey:"<span style="color: #b4261a;">El mejor programador del mundo mundial…</span>" (No tengo abuela…jejejeje) le metemos el SetValue "<span style="color: #b51a00;">Promedi</span>"</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;">[mutableDictionary </span><span style="color: #3495af;">setValue</span><span style="color: black;">:</span>@"Promedi"<span style="color: black;"> </span><span style="color: #3495af;">forKey</span><span style="color: black;">:</span>@"El mejor programador del mundo mundial..."<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSLog</span>(<span style="color: #b4261a;">@"%@"</span>,mutableDictionary);</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
Resultado:</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<b>"El mejor programador del mundo mundial..." = Promedi;</b></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px;">
[mutableDictionary <span style="color: #3495af;">setValue</span>:array <span style="color: #3495af;">forKey</span>:<span style="color: #b4261a;">@"Prueba del NSMUtableArray."</span>];</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSLog</span>(<span style="color: #b4261a;">@"%@"</span>,mutableDictionary);</div>
<div style="font-family: Menlo; font-size: 11px;">
Resultado:</div>
<div style="font-family: Menlo; font-size: 11px;">
<b> "Prueba del NSMUtableArray." = (</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Uno,</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Dos,</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Tres,</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> Cuatro</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b> );</b></div>
<div style="font-family: Menlo; font-size: 11px;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAEu5qUA07BEAW0bz4dsbdbinGmTgSXo8WrakMKyOyx6rar1LI7BeC9jYt2br4IXY1eheyLTNANvIelh5mQYlzKEc1-PE7nOVYg_blFdTAD_SqIWdCu7GZF-dfYKRqUeQcBzPc2WAssXc/s1600/Captura+de+pantalla+2012-12-06+a+la(s)+14.34.46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAEu5qUA07BEAW0bz4dsbdbinGmTgSXo8WrakMKyOyx6rar1LI7BeC9jYt2br4IXY1eheyLTNANvIelh5mQYlzKEc1-PE7nOVYg_blFdTAD_SqIWdCu7GZF-dfYKRqUeQcBzPc2WAssXc/s320/Captura+de+pantalla+2012-12-06+a+la(s)+14.34.46.png" width="320" /></a></div>
<div style="font-family: Menlo; font-size: 11px;">
<b><br /></b></div>
<div style="font-family: 'Lucida Grande'; font-size: 13px; margin-bottom: 4px; min-height: 16px;">
<br /></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-38300909571186662272012-10-12T12:51:00.000+02:002012-10-12T12:51:14.183+02:00<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2>
<span style="color: blue;">El Mejor foro de la red dedicado a los productos de Apple.</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
En el podrás resolver todas tus dudas y colaborar para ayudar a los demás, sin duda el mejor foro de la Red dedicado al los Fans de la Manzana.</div>
<h2 style="text-align: center;">
<br /></h2>
<div>
<h2 style="text-align: center;">
<a href="http://www.iphoneadictos.es/" target="_blank">www.iphoneadictos.es</a></h2>
</div>
<div>
<br /></div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVw8b4JcbcMajPxrMFmDUZqjPLCvg558eILgit6siAEXde6mx3__hlIStzyoqoTTgn0t7bD4qt49nfhd4YwGC3LZ4d58oOBvXDz0f2vYHzeL9NJ90Mce-USpFAKnsWDID87f62guckkqI/s1600/Captura+de+pantalla+2012-10-12+a+la(s)+12.40.26.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVw8b4JcbcMajPxrMFmDUZqjPLCvg558eILgit6siAEXde6mx3__hlIStzyoqoTTgn0t7bD4qt49nfhd4YwGC3LZ4d58oOBvXDz0f2vYHzeL9NJ90Mce-USpFAKnsWDID87f62guckkqI/s640/Captura+de+pantalla+2012-10-12+a+la(s)+12.40.26.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h2 style="text-align: center;">
<a href="http://www.iphoneadictos.es/" target="_blank"></a><a href="http://www.iphoneadictos.es/" target="_blank">www.iphoneadictos.es</a></h2>
<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0tag:blogger.com,1999:blog-1031125856269220070.post-83051040134220307152012-10-06T23:03:00.001+02:002012-10-06T23:03:36.710+02:00<h2 style="text-align: center;">
Cosas basicas sobre XCode.</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3-On0bdO3eYVW_nBa6R7nNEAvGxv7qMYtbbo21JFIZDBAnZpFS_uNsZspkAfKW7pA7A3MGnqEaZkR5IF-PUvDfMhlutu35F2SrV3RKc-hkrXpXoaLflj1hs6QwlBaF2qjnhfOLxvhEF0/s1600/Captura+de+pantalla+2012-10-06+a+la(s)+22.56.07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3-On0bdO3eYVW_nBa6R7nNEAvGxv7qMYtbbo21JFIZDBAnZpFS_uNsZspkAfKW7pA7A3MGnqEaZkR5IF-PUvDfMhlutu35F2SrV3RKc-hkrXpXoaLflj1hs6QwlBaF2qjnhfOLxvhEF0/s400/Captura+de+pantalla+2012-10-06+a+la(s)+22.56.07.png" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="font-family: Helvetica; font-size: 24px; text-align: center;">
<b>Guía de pequeños trucos en XCode.</b></div>
<div style="font-family: Helvetica; font-size: 14px; min-height: 17px; text-align: center;">
<b></b><br /></div>
<div style="font-family: Helvetica; font-size: 18px;">
<b>Para hacer que desaparezca el teclado en un TexField:</b></div>
<div style="font-family: Helvetica; font-size: 14px; min-height: 17px;">
<b></b><br /></div>
<div style="font-family: Helvetica; font-size: 14px;">
Creamos una accion y llamamos al sendero de la función y le decimos que deje de ser el primero que responde.</div>
<div style="font-family: Helvetica; font-size: 14px;">
Luego conectamos la función con Did end on Exit y al tocar en la tecla Return el teclado desaparece.</div>
<div style="font-family: Helvetica; font-size: 14px; min-height: 17px; text-align: center;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #0433ff;">IBAction</span>)escoderTeclado:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [sender </span>resignFirstResponder<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Para hacer desaparecer el teclado en las vista de texto usaremos esto:</b></div>
<div style="font-family: Menlo; font-size: 14px;">
En este caso con la tecla Return subimos una linea y para ocultar el teclado hacemos tap en cualquier parte.</div>
<div style="font-family: Menlo; font-size: 14px;">
Escribir esto en el viewDidLoad:</div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)viewDidLoad</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #0433ff;">super</span><span style="color: black;"> </span>viewDidLoad<span style="color: black;">];</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UITapGestureRecognizer<span style="color: black;"> *reconoceTap =[[</span>UITapGestureRecognizer<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTarget<span style="color: black;">:</span><span style="color: #0433ff;">self</span><span style="color: black;"> </span>action<span style="color: black;">:</span><span style="color: #0433ff;">@selector</span><span style="color: black;">(handleBackgroundTap:)];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
reconoceTap.<span style="color: #3495af;">cancelsTouchesInView</span> = <span style="color: #0433ff;">NO</span>;</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #0433ff;">self</span><span style="color: black;">.</span>view<span style="color: black;"> </span>addGestureRecognizer<span style="color: black;">:reconoceTap];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
Y luego creas este metodo:(VistaTexto seria el nombre que le hemos dado al objeto vistaDeTexto.):</div>
<div style="font-family: Menlo; font-size: 14px;">
También se podría aplicar a los UITextField.<span style="font-size: 11px;"> </span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #0433ff;">void</span>)handleBackgroundTap:(<span style="color: #3495af;">UITapGestureRecognizer</span> *)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span>vistaTexto<span style="color: black;"> </span>resignFirstResponder<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Enviar Mensaje de Twitter con una imagen:</b></div>
<div style="font-family: Menlo; font-size: 14px;">
Añadimos al proyecto el Framework Social.framework</div>
<div style="font-family: Menlo; font-size: 14px;">
Lo importamos al proyecto y añadimos al proyecto la imagen que queremos enviar.</div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
Con este primer metodo le estamos diciendo que si la conexión es posible nos envíe el Tweet.</div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">IBAction</span>)twitter:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #0433ff;">if</span><span style="color: black;"> (</span>SLComposeViewControllerResultDone<span style="color: black;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>SLComposeViewController<span style="color: black;"> *tweet=[</span>SLComposeViewController<span style="color: black;"> </span>composeViewControllerForServiceType<span style="color: black;">:</span>SLServiceTypeTwitter<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [tweet </span><span style="color: #3495af;">setInitialText</span><span style="color: black;">:</span>@"Prueba del Twitter"<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">UIImage</span> *imagenTwitter =[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"iconoforo.jpg"</span>];</div>
<div style="font-family: Menlo; font-size: 11px;">
[tweet <span style="color: #3495af;">addImage</span>:imagenTwitter];</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #0433ff;">self</span><span style="color: black;"> </span>presentViewController<span style="color: black;">:tweet </span>animated<span style="color: black;">:</span><span style="color: #0433ff;">YES</span><span style="color: black;"> </span>completion<span style="color: black;">:</span><span style="color: #0433ff;">Nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
Y esta acción la usamos para ver si es posible la conexión y nos salta una alerta que nos avisa si es posible o si no lo es.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">IBAction</span>)servicioDisponible:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #0433ff;">if</span><span style="color: black;"> (</span>SLComposeViewControllerResultCancelled<span style="color: black;">)</span></div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UIAlertView<span style="color: black;"> *alertaServicio =[[</span>UIAlertView<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"ATENCION"</span><span style="color: black;"> </span>message<span style="color: black;">:</span><span style="color: #b4261a;">@"Imposible enviar Twitter"</span><span style="color: black;"> </span>delegate<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"OK"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
[alertaServicio <span style="color: #3495af;">show</span>];</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span></div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UIAlertView<span style="color: black;"> *alertaServicioCorrecto =[[</span>UIAlertView<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"¡¡Perfecto!!"</span><span style="color: black;"> </span>message<span style="color: black;">:</span><span style="color: #b4261a;">@"Es posible enviar Twitter"</span><span style="color: black;"> </span>delegate<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"OK"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
[alertaServicioCorrecto <span style="color: #3495af;">show</span>];</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #0433ff; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>return<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Para comprobar si se a escrito algo en el UITextField:</b></div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 14px;">
Contrasenya y nombreUsuario son dos UITextField, con la sentencia <b>length</b> comprobamos su longitud y si esta es igual a cero no salta la alerta o podríamos crear otra electa indicando que el campo de texto esta vacío.</div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">IBAction</span>)Entrar:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>NSString<span style="color: black;"> *paswor=[[</span>NSString<span style="color: black;"> </span>alloc<span style="color: black;">]</span>init<span style="color: black;">];</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> paswor=</span>contrasenya<span style="color: black;">.</span>text<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>NSString<span style="color: black;"> *nombreUser =[[</span>NSString<span style="color: black;"> </span>alloc<span style="color: black;">]</span>init<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
nombreUser=<span style="color: #3495af;">nombreUsuario</span>.<span style="color: #3495af;">text</span>;</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">int</span> length =[nombreUser <span style="color: #3495af;">length</span>];</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">int</span> paswor2 =[paswor <span style="color: #3495af;">length</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">if</span> (length==0 | paswor2==0)</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">return</span>;</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">NSString</span> *mensajeAlerta =[<span style="color: #3495af;">NSString</span> <span style="color: #3495af;">stringWithFormat</span>:<span style="color: #b4261a;">@"Bienvenido %@"</span>,nombreUser];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UIAlertView<span style="color: black;"> * alerta =[[</span>UIAlertView<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Usuario Aceptado"</span><span style="color: black;"> </span>message<span style="color: black;">:mensajeAlerta </span>delegate<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Ok"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
[alerta <span style="color: #3495af;">show</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Crear una alerta con varias opciones y saber cual de las opciones a sido pulsada:</b></div>
<div style="font-family: Menlo; font-size: 14px;">
Primero con UIAlertView.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">IBAction</span>)crearAlerta:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UIAlertView<span style="color: black;"> *alerta=[[</span>UIAlertView<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Alerta creada"</span><span style="color: black;"> </span>message<span style="color: black;">:</span><span style="color: #b4261a;">@"Varias Opciones"</span><span style="color: black;"> </span>delegate<span style="color: black;">:</span><span style="color: #0433ff;">self</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"ok"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">:</span><span style="color: #b4261a;">@"Opcion 1"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"opcion 2"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Opcion 3"</span><span style="color: black;">, </span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
[alerta <span style="color: #3495af;">show</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #0433ff;">void</span>)alertView:(<span style="color: #3495af;">UIAlertView</span>*)alertView clickedButtonAtIndex:(<span style="color: #3495af;">NSInteger</span>)buttonIndex</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">if</span> (buttonIndex== alertView.<span style="color: #3495af;">cancelButtonIndex</span>)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el boton de Cancelar o OK"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==alertView.<span style="color: #3495af;">firstOtherButtonIndex</span>)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Se a pulsado el primer Boton"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==alertView.<span style="color: #3495af;">firstOtherButtonIndex</span> +1)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el segundo Boton"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==alertView.<span style="color: #3495af;">firstOtherButtonIndex</span> +2)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el tercer boton"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
Ahora veremos el mismo ejemplo pero con el botón rojo(destructivo):</div>
<div style="font-family: Menlo; font-size: 14px;">
Aqui usaremos el UIActionSheet.</div>
<div style="font-family: Menlo; font-size: 14px;">
Tenemos que añadir el protocolo <UIAlertViewDelegate>.</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">IBAction</span>)botonRojo:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UIActionSheet<span style="color: black;"> *botonRojo =[[</span>UIActionSheet<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Con el Boton Rojo"</span><span style="color: black;"> </span>delegate<span style="color: black;">:</span><span style="color: #0433ff;">self</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Salir"</span><span style="color: black;"> </span>destructiveButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Borrar todo"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">:</span><span style="color: #b4261a;">@"Opcion 1"</span><span style="color: black;">,</span><span style="color: #b4261a;">@"Opcion2"</span><span style="color: black;">, </span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
[botonRojo <span style="color: #3495af;">showInView</span>:<span style="color: #0433ff;">self</span>.<span style="color: #3495af;">view</span>];//Observamos que la forma de llamarlo es diferente</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #0433ff;">void</span>)actionSheet:(<span style="color: #3495af;">UIActionSheet</span> *)actionSheet clickedButtonAtIndex:(<span style="color: #3495af;">NSInteger</span>)buttonIndex</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">if</span> (buttonIndex== actionSheet.<span style="color: #3495af;">cancelButtonIndex</span>)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el boton de Cancelar o OK"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==actionSheet.<span style="color: #3495af;">destructiveButtonIndex</span>)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el boton rojo"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==actionSheet.<span style="color: #3495af;">firstOtherButtonIndex</span>)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Se a pulsado el primer Boton"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==actionSheet.<span style="color: #3495af;">firstOtherButtonIndex</span> +1)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el segundo Boton"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">else</span> <span style="color: #0433ff;">if</span> (buttonIndex==actionSheet.<span style="color: #3495af;">firstOtherButtonIndex</span> +2)</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Pulsado el tercer boton"<span style="color: black;">);</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Alerta con entrada de texto del Usuario:</b></div>
<div style="font-family: Menlo; font-size: 14px;">
Muestra el nombre introducido en la propiedad text de una Label.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">IBAction</span>)entradaUsuario:(<span style="color: #0433ff;">id</span>)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UIAlertView<span style="color: black;"> *conEntrada =[[</span>UIAlertView<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Cual es su nombre?:"</span><span style="color: black;"> </span>message<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;"> </span>delegate<span style="color: black;">:</span><span style="color: #0433ff;">self</span><span style="color: black;"> </span>cancelButtonTitle<span style="color: black;">:</span><span style="color: #b4261a;">@"Aceptar"</span><span style="color: black;"> </span>otherButtonTitles<span style="color: black;">:</span><span style="color: #0433ff;">nil</span><span style="color: black;">];</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> conEntrada.</span>alertViewStyle<span style="color: black;"> =</span>UIAlertViewStylePlainTextInput<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px;">
[conEntrada <span style="color: #3495af;">show</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #0433ff;">void</span>)alertView:(<span style="color: #3495af;">UIAlertView</span>*)alertView clickedButtonAtIndex:(<span style="color: #3495af;">NSInteger</span>)buttonIndex</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">UITextField</span> *field1 =[alertView <span style="color: #3495af;">textFieldAtIndex</span>:0];</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>verNombre<span style="color: black;">.</span>text<span style="color: black;">=[</span>NSString<span style="color: black;"> </span>stringWithFormat<span style="color: black;">:</span><span style="color: #b4261a;">@"Nombre: %@"</span><span style="color: black;">,field1.</span>text<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Métodos que se ejecutan en el AppDelegate.m, según en estado se encuentre la aplicación.</b></div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">BOOL</span>)application:(<span style="color: #3495af;">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span style="color: #3495af;">NSDictionary</span> *)launchOptions</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Aqui es en el Bool"<span style="color: black;">);</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este siempre se ejecuta al iniciar la aplicación.</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Solo se ejecuta si la app esta cerrada totalmente</div>
<div style="color: #0433ff; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>return<span style="color: black;"> </span>YES<span style="color: black;">;</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)applicationWillResignActive:(<span style="color: #3495af;">UIApplication</span> *)application</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Aqui es en el applicationWillResignActive"<span style="color: black;">);</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este se ejecuta cuando cerramos la aplicación con boton Home.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)applicationDidEnterBackground:(<span style="color: #3495af;">UIApplication</span> *)application</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Aqui es en el applicationDidEnterBackground"<span style="color: black;">);</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Esta se ejecuta cuando pasa a segundo plano.</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)applicationWillEnterForeground:(<span style="color: #3495af;">UIApplication</span> *)application</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Aqui es en el applicationWillEnterForeground"<span style="color: black;">);</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Se ejecuta Cuando vuelve del segundo plano.</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)applicationDidBecomeActive:(<span style="color: #3495af;">UIApplication</span> *)application</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Aqui es en el applicationDidBecomeActive"<span style="color: black;">);</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este se ejecuta cuando se inicia la aplicación y esta a la espera.</div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Tambien cuando vuelve desde segundo plano y se queda a la espera de algún evento.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)applicationWillTerminate:(<span style="color: #3495af;">UIApplication</span> *)application</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #b4261a; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span><span style="color: #3495af;">NSLog</span><span style="color: black;">(</span>@"Aqui es en el applicationWillTerminate"<span style="color: black;">);</span></div>
<div style="color: #008f00; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>//Este se ejecuta al cerrar definitivamente la aplicación.</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Crear una animación:</b></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>animacionImagen seria el nombre del UIImage donde se reproducira la animación.</b></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>NSArray<span style="color: black;"> *animacionArray=[[</span>NSArray<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithObjects<span style="color: black;">:</span></div>
<div style="font-family: Menlo; font-size: 11px;">
[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"anim1.png"</span>],</div>
<div style="font-family: Menlo; font-size: 11px;">
[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"anim2.png"</span>],</div>
<div style="font-family: Menlo; font-size: 11px;">
[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"anim3.png"</span>],</div>
<div style="font-family: Menlo; font-size: 11px;">
[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"anim4.png"</span>],</div>
<div style="font-family: Menlo; font-size: 11px;">
[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"anim5.png"</span>],</div>
<div style="font-family: Menlo; font-size: 11px;">
[<span style="color: #3495af;">UIImage</span> <span style="color: #3495af;">imageNamed</span>:<span style="color: #b4261a;">@"anim6.png"</span>],<span style="color: #0433ff;">nil</span>];</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>animacionImagen<span style="color: black;">.</span>animationImages<span style="color: black;">=animacionArray;</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>animacionImagen<span style="color: black;">.</span>animationDuration<span style="color: black;">=0.5;</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>animacionImagen<span style="color: black;">.</span>animationRepeatCount<span style="color: black;">=1;</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>animacionImagen<span style="color: black;">.</span>userInteractionEnabled<span style="color: black;">=</span><span style="color: #0433ff;">NO</span><span style="color: black;">;</span></div>
<div style="color: #008cb4; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span> <span style="color: black;">[</span>animacionImagen setHidden:NO<span style="color: black;">]</span>;</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span>animacionImagen<span style="color: black;"> </span>startAnimating<span style="color: black;">];</span></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 14px;">
<b>Reconoce si se a tocado en una zona de pantalla:</b></div>
<div style="font-family: Menlo; font-size: 14px; min-height: 16px;">
<b></b><br /></div>
<div style="font-family: Menlo; font-size: 11px;">
- (<span style="color: #0433ff;">void</span>)viewDidLoad</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #0433ff;">super</span><span style="color: black;"> </span>viewDidLoad<span style="color: black;">];</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> </span>UITapGestureRecognizer<span style="color: black;"> * tapImagen=[[</span>UITapGestureRecognizer<span style="color: black;"> </span>alloc<span style="color: black;">]</span>initWithTarget<span style="color: black;">:</span><span style="color: #0433ff;">self</span><span style="color: black;"> </span>action<span style="color: black;">:</span><span style="color: #0433ff;">@selector</span><span style="color: black;">(handleTap:)];</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> tapImagen.</span>cancelsTouchesInView<span style="color: black;">=</span><span style="color: #0433ff;">NO</span><span style="color: black;">;</span></div>
<div style="color: #3495af; font-family: Menlo; font-size: 11px;">
<span style="color: black;"> [</span><span style="color: #0433ff;">self</span><span style="color: black;">.</span>view<span style="color: black;"> </span>addGestureRecognizer<span style="color: black;">:tapImagen];</span></div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px;">
-(<span style="color: #0433ff;">void</span>)handleTap:(<span style="color: #3495af;">UITapGestureRecognizer</span> *)sender</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #3495af;">CGPoint</span> startlocation=[sender <span style="color: #3495af;">locationInView</span>:<span style="color: #0433ff;">self</span>.<span style="color: #3495af;">view</span>];</div>
<div style="font-family: Menlo; font-size: 11px;">
<span style="color: #0433ff;">if</span> ((startlocation.<span style="color: #3495af;">y</span> >= 211) && (startlocation.<span style="color: #3495af;">y</span> <=(211 + 104)))</div>
<div style="font-family: Menlo; font-size: 11px;">
{</div>
<div style="font-family: Menlo; font-size: 11px;">
//Aqui se ejecutaría esto si el usuario toca la zona determinada para detectar las pulsaciones.</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px;">
}</div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
<div style="font-family: Menlo; font-size: 11px; min-height: 13px;">
<br /></div>
</div>
Francisco (Promedi)http://www.blogger.com/profile/07031556041497988665noreply@blogger.com0