<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TiMoch &#187; Mobile Development</title>
	<atom:link href="https://timoch.com/blog/category/mobile-development/feed/" rel="self" type="application/rss+xml" />
	<link>https://timoch.com/blog</link>
	<description>on edge</description>
	<lastBuildDate>Tue, 29 Apr 2014 15:02:50 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Animate a UIView out of thin air</title>
		<link>https://timoch.com/blog/2012/09/animate-a-uiview-out-of-thin-air/</link>
		<comments>https://timoch.com/blog/2012/09/animate-a-uiview-out-of-thin-air/#comments</comments>
		<pubDate>Sat, 15 Sep 2012 12:44:00 +0000</pubDate>
		<dc:creator><![CDATA[timoch]]></dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[uiview]]></category>

		<guid isPermaLink="false">http://www.timoch.com/blog/?p=88</guid>
		<description><![CDATA[Today, I was trying to animate a menu-like view so that it slides out of a bar of buttons at the bottom of my application. Easy enough, I read some documentation about animations here. And I end up with code similar to this in the controller responsible for the sliding view: [crayon-69e5b0491698a184087640/] Nothing spectacular. I [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Today, I was trying to animate a menu-like view so that it slides out of a bar of buttons at the bottom of my application.</p>
<p>Easy enough, I read some documentation about animations <a href="http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/viewpg_iphoneos/animatingviews/animatingviews.html">here</a>. And I end up with code similar to this in the controller responsible for the sliding view:</p>
<p></p><pre class="crayon-plain-tag">CGRect frame = self.view.frame;
// make sure the view initially sits outside the screen
frame.origin.y = 480;
self.view.frame = frame;

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
frame.origin.y = referenceFrame.origin.y - frame.size.height;
self.view.frame = frame;
[UIView commitAnimations];</pre><p> </p>
<p>Nothing spectacular. I make sure the initial view in outside the visible part of the screen and I animate the view into its final position.</p>
<p>Now my view slides up but in my case the final position is on top of another view. So there is content below its final position. My sliding menu ends up sliding up in front of the button bar and all. Not so nice but the solution is simple right ? just animate the height of the view as well. It will appear to slide out of the whichever view you selected as a reference view.</p>
<p></p><pre class="crayon-plain-tag">CGRect final = self.view.frame;

// before animating, set the view height to 0
CGRect initial = final;
initial.origin.y = self.referenceFrame.origin.y;
initial.size.height = 0;
self.view.frame = initial;

[UIView beginAnimations:@"showShareMenu" context:NULL];
[UIView setAnimationDuration:1];
final.origin.y = self.referenceFrame.origin.y - final.size.height;
final.size.height = final.size.height;
self.view.frame = final;
[UIView commitAnimations];</pre><p> </p>
<p>Well not so fast !! my view has kept its initial size. I had to search for a while. My view was not resizing because of its content. In the end, I had to change my views property so that it &#8216;Clips Subviews&#8217;</p>
<p><a href="http://www.timoch.com/blog/wp-content/uploads/2012/09/clip-subviews1.png"><img class="aligncenter size-full wp-image-106" title="clip-subviews" src="http://www.timoch.com/blog/wp-content/uploads/2012/09/clip-subviews1.png" alt="" width="313" height="467" /></a></p>
<p>TiMoch <em>on edge</em></p>
]]></content:encoded>
			<wfw:commentRss>https://timoch.com/blog/2012/09/animate-a-uiview-out-of-thin-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transparent background UISearchView</title>
		<link>https://timoch.com/blog/2012/09/transparent-background-uisearchview/</link>
		<comments>https://timoch.com/blog/2012/09/transparent-background-uisearchview/#comments</comments>
		<pubDate>Sat, 08 Sep 2012 13:19:48 +0000</pubDate>
		<dc:creator><![CDATA[timoch]]></dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objc]]></category>

		<guid isPermaLink="false">http://www.timoch.com/blog/?p=61</guid>
		<description><![CDATA[While I was working on a small iPhone application I was required to put a search box but with a transparent background. The original design looks like this: I could not get the basic search control to not display its background. I tried using a standard text box, however the look and feel was not [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>While I was working on a small iPhone application I was required to put a search box but with a transparent background. The original design looks like this:</p>
<p style="text-align: center;"><a href="http://www.timoch.com/blog/wp-content/uploads/2012/09/transparent-search-box-design.png"><img class="aligncenter  wp-image-63" title="transparent-search-box-design" alt="" src="http://www.timoch.com/blog/wp-content/uploads/2012/09/transparent-search-box-design.png" width="447" height="67" /></a></p>
<p>I could not get the basic search control to not display its background. I tried using a standard text box, however the look and feel was not the same (the standard text view has round corners but here the whole side needs to a single half-circle).</p>
<p>I found a solution on stackoverflow.com : <a href="http://stackoverflow.com/questions/2913475/uisearchbar-transparent-background-view">http://stackoverflow.com/questions/2913475/uisearchbar-transparent-background-view</a></p>
<p>However, the solutions I found there were not optimal because they required custom code for each usage of a search box with transparent background.</p>
<p>I really wanted a more reusable solution. I adapted one of the solutions but subclassed <pre class="crayon-plain-tag">UISearchBar</pre> as follow:</p>
<p>in UITransparentBackgroundSearchBar.h:</p>
<p><a href="http://www.timoch.com/blog/wp-content/uploads/2012/09/tbsb-h.png"><img title="tbsb-h" alt="" src="http://www.timoch.com/blog/wp-content/uploads/2012/09/tbsb-h.png" width="585" height="102" /></a></p>
<p>and in UITransparentBackgroundSearchBar.m:</p>
<p><a href="http://www.timoch.com/blog/wp-content/uploads/2012/09/tbsb-m.png"><img title="tbsb-m" alt="" src="http://www.timoch.com/blog/wp-content/uploads/2012/09/tbsb-m.png" width="540" height="169" /></a></p>
<p>In your storyboard, set the search bar class to be UITransparentBackgroundSearchBar and voilà.</p>
<p>I am not that experienced with iOS development so there might be a gotcha I have not identified yet. I seems quite clean so I pretty confident.</p>
<p>Have fun,<br />
TiMoch <em>on edge</em></p>
]]></content:encoded>
			<wfw:commentRss>https://timoch.com/blog/2012/09/transparent-background-uisearchview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up an Android development environment</title>
		<link>https://timoch.com/blog/2012/07/setting-up-an-android-development-environment/</link>
		<comments>https://timoch.com/blog/2012/07/setting-up-an-android-development-environment/#comments</comments>
		<pubDate>Mon, 16 Jul 2012 19:44:03 +0000</pubDate>
		<dc:creator><![CDATA[timoch]]></dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.timoch.com/blog/?p=20</guid>
		<description><![CDATA[I am a newbie with mobile application development. As I start fiddling around, I find it is not exactly straightforward to setup an Android development environment for the first time. This post tries to take you through the few steps required before you can run a very first Android application. Installing Eclipse First you want [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I am a newbie with mobile application development. As I start fiddling around, I find it is not exactly straightforward to setup an Android development environment for the first time. This post tries to take you through the few steps required before you can run a very first Android application.</p>
<h1>Installing Eclipse</h1>
<p>First you want to install the Eclipse IDE. Eclipse is an Integrated Development Environment very much focused on Java development. Many plugins exist to extend its functionality. Some of which will make your life as an Android app developer much easier.</p>
<p>Point your browser to the Eclipse website <a title="www.eclipse.org" href="http://www.eclipse.org" target="_blank">eclipse.org</a> and go to their download page.</p>
<p>Many options there. I picked the Eclipse Classic package as I don&#8217;t yet need specific plugins from the other package. If I understand correctly, the plugins can be installed later on anyway so you can choose any of the options. Once downloaded, simply extract the archive content to your working directory of choice.</p>
<p>The package is quite big so it might take a while. In the meantime, you can already check out the <a title="Android Developer" href="http://developer.android.com" target="_blank">Android Developer</a> website. It contains a lot of useful information about developing and designing mobile application.</p>
<h1>Android SDK</h1>
<p>The next piece of software you need is the Android SDK. You can find the download page <a title="here" href="https://developer.android.com/sdk/index.html" target="_blank">here</a>. Download and start the installation. The Android SDK setup will take care of installing the Java SE Development Kit if it is not installed already. Choose where to install the SDK and continue the installation.</p>
<p>You are not done yet with the Android SDK installation. You still need to run the SDK manager to get the system images for the versions of Android you want to target. This is what it looks like:</p>
<p><a href="http://www.timoch.com/blog/wp-content/uploads/2012/07/android-sdk.png"><img class="aligncenter size-full wp-image-35" title="Android SDK Manager" src="http://www.timoch.com/blog/wp-content/uploads/2012/07/android-sdk.png" alt="" width="679" height="451" /></a></p>
<p>The screen show the versions of Android that you can target for your applications. Each version shown exposes a different level of functionality of the Android framework and devices. We will use the latest version here. For more information on how the API is versioned, you should have a look here on the Android developer site : <a href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_blank">What is an API level ?</a></p>
<h1>The ADT Plugin</h1>
<p>We are almost there. The last step is to install the eclipse plugin to support Android development. This plugin will integrate the Android SDK components into Eclipse so that development is as straightforward as possible. The plugin is called Android Development Tools (ADT for short). You can find more information about it <a href="http://developer.android.com/tools/sdk/eclipse-adt.html" target="_blank">here</a>.</p>
<p>The installation is done directly within Eclipse so go ahead and start it. Go to menu Help -&gt; Install New Software</p>
<p><a href="http://www.timoch.com/blog/wp-content/uploads/2012/07/sc-eclipse-install-software-menu.png"><img class="aligncenter size-full wp-image-42" title="Eclipse menu - Help -&gt; Install New Software" src="http://www.timoch.com/blog/wp-content/uploads/2012/07/sc-eclipse-install-software-menu.png" alt="" width="698" height="343" /></a></p>
<p>Add a new repository called ADT Plugin with the URL https://dl-ssl.google.com/android/eclipse/. Some time after selecting the repository, you should get a list of software similar to this. Select the whole Developer Tools branch and continue with the wizard by clicking Next.</p>
<p><a href="http://www.timoch.com/blog/wp-content/uploads/2012/07/sc-eclipse-available-software-window.png"><img class="aligncenter size-full wp-image-43" title="Eclipse - Available Software window" src="http://www.timoch.com/blog/wp-content/uploads/2012/07/sc-eclipse-available-software-window.png" alt="" width="737" height="691" /></a></p>
<p>And voilà ! <img src="https://timoch.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" />  You can now create new Android projects and code away for your favorite device.</p>
<h1>Conclusion</h1>
<p>In order to develop Android applications, you need to get:</p>
<ul>
<li><a href="http://eclipse.org" target="_blank">Eclipse IDE</a></li>
<li><a href="http://developer.android.com/sdk/index.html" target="_blank">Android SDK</a></li>
<li><a href="http://developer.android.com/tools/sdk/eclipse-adt.html" target="_blank">ADT Plugin for Eclipse</a></li>
</ul>
<div>Once this is setup, all you need is to get creative <img src="https://timoch.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /> </div>
<div></div>
<div>Have fun!</div>
<div>TiMoch <em>on edge</em></div>
]]></content:encoded>
			<wfw:commentRss>https://timoch.com/blog/2012/07/setting-up-an-android-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
