<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2484637286305291771</id><updated>2026-10-24T00:14:35.151-07:00</updated><category term="objective C"/><category term="iPad"/><category term="iPhone"/><category term="iOS"/><category term="windows phone 7"/><category term="wp7"/><category term="android"/><category term="Date Picker"/><category term="DatePicker"/><category term="DatePicker control"/><category term="DatePicker programmatically"/><category term="IsolatedStorage"/><category term="JQuery plugin"/><category term="ObjectiveC categories"/><category term="Silverlight DatePicker"/><category term="Visual Studio"/><category term="file"/><category term="image"/><category term="java"/><category term="json"/><category term="localization"/><category term="mobile web"/><category term="scroller"/><category term="unzip"/><category term="xCode"/><category term="Cordova Plugin"/><category term="JsonHelper"/><category term="Mouse Wheeling Ticker"/><category term="NSSortDescriptor"/><category term="PhoneGap Plugin"/><category term="SharpZipLib"/><category term="Silverlight Toolkit"/><category term="UINavigationBar"/><category term="UIScrollView"/><category term="UITableView"/><category term="UITextField"/><category term="UIWebVeiw"/><category term="WebBrowser"/><category term="WebView"/><category term="Worklight"/><category term="ZipArchive"/><category term="ajax loader"/><category term="authorization"/><category term="background"/><category term="bind"/><category term="bounce"/><category term="click delay"/><category term="compress"/><category term="css animation"/><category term="cursor position"/><category term="detect"/><category term="download"/><category term="embedded html"/><category term="emulator"/><category term="error"/><category term="exception"/><category term="http"/><category term="javascript"/><category term="jquery"/><category term="loader"/><category term="local notification"/><category term="localize DatePicker"/><category term="lproj"/><category term="merge"/><category term="onClick"/><category term="post data"/><category term="prototype"/><category term="section header"/><category term="selection range"/><category term="send post data"/><category term="sort"/><category term="spinner"/><category term="ssl certificate"/><category term="ssl connection"/><category term="static library"/><category term="tcp/ip monitor"/><category term="ticker"/><category term="uncompress"/><category term="windows phone"/><category term="windows registry"/><category term="zip"/><category term="zip file"/><title type='text'>Step by Step</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-688622718949854999</id><published>2013-10-10T07:45:00.000-07:00</published><updated>2013-10-10T08:05:12.115-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax loader"/><category scheme="http://www.blogger.com/atom/ns#" term="css animation"/><category scheme="http://www.blogger.com/atom/ns#" term="loader"/><category scheme="http://www.blogger.com/atom/ns#" term="spinner"/><title type='text'>Ajax loader with pure CSS3 instead GIF without additional HTML elements</title><content type='html'>HTML:
&lt;pre class=&quot;brush:xml&quot;&gt;
    &amp;lt;div id=&quot;container&quot; class=&quot;innerLoader&quot;&gt;&amp;lt;/div&gt;

    &amp;lt;button onclick=&quot;toogleClass();&quot;&gt;Inner Loader&amp;lt;/button&gt; 
&lt;/pre&gt;

JavaScript:
&lt;pre class=&quot;brush:javascript&quot;&gt;
    function toogleClass() {
        var container = document.getElementById(&#39;container&#39;);
        var className = container.className;
        if (className === &#39;innerLoader&#39;)
            container.className = &#39;&#39;;
        else 
            container.className = &#39;innerLoader&#39;;
        }
    }
&lt;/pre&gt;

CSS:
&lt;pre class=&quot;brush:css&quot;&gt;
 div {
  border:1px orangered solid;
  height: 200px;
 }
 .innerLoader {
  position: relative;
 }

 .innerLoader::after
 {
  content:&#39;&#39;;
  position: absolute;

  top:50%;
  left:50%;
  width: 30px;
  height: 30px;
  margin:-15px 0 0 -15px;
  border: 8px solid #000;
  border-right-color: rgba(128, 128, 128, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 20px 2px rgba(128, 128, 128, 0.4), inset 0 0 10px 0px rgba(128, 128, 128, 0.4);
  
  -webkit-animation-timing-function: linear;
  -webkit-animation-duration: 600ms;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-name: innerLoaderKeyframe;
 }
 @-webkit-keyframes innerLoaderKeyframe {
  from { -webkit-transform: rotate(0deg); }
  to { -webkit-transform: rotate(360deg); }
 }
&lt;/pre&gt;

If you want to use image use next CSS:
&lt;pre class=&quot;brush:css&quot;&gt;
 .innerLoader::after
 {
  content:&#39;&#39;;
  position: absolute;
  
  top: 0;
  left: 0;
  width: 100%;
  bottom: 0;
  background-image: url(ajax_loader.png);
  background-repeat: no-repeat;
  background-position: center;
  /*background-size: 13px 13px; // retina display*/
  
  -webkit-animation-timing-function: linear;
  -webkit-animation-duration: 600ms;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-name: innerLoaderKeyframe;
 }
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/688622718949854999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2013/10/ajax-loader-with-pure-css3-instead-gif.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/688622718949854999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/688622718949854999'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2013/10/ajax-loader-with-pure-css3-instead-gif.html' title='Ajax loader with pure CSS3 instead GIF without additional HTML elements'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-676275850822383564</id><published>2013-09-23T03:30:00.001-07:00</published><updated>2013-09-23T03:30:39.577-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cordova Plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="JsonHelper"/><category scheme="http://www.blogger.com/atom/ns#" term="PhoneGap Plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="windows phone"/><title type='text'>Use Cordova WP8 JsonHelper for deserialize json</title><content type='html'>In PhoneGap Documentation &lt;a href=&quot;http://docs.phonegap.com/en/3.0.0/guide_platforms_wp8_plugin.md.html#Windows%20Phone%20Plugins&quot;&gt;&quot;Developing a Plugin on Windows Phone&quot;&lt;/a&gt; explain how parse simple array of string:

&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;cordova.exec(win, fail, &quot;ServiceName&quot;, &quot;MethodName&quot;, [&quot;this is a string&quot;, &quot;54&quot;, &quot;{literal:&#39;trouble&#39;}&quot;]) ;

string[] optValues = JsonHelper.Deserialize&lt;string&gt;(options);
&lt;/string&gt;&lt;/pre&gt;
But if you have something more complexity like this:

&lt;br /&gt;
&lt;pre class=&quot;brush:jscript&quot;&gt;var moreBtns = 
[
    {
        name  : &#39;fb button&#39;,
        target: &#39;EXTERNAL&#39;,
        url   : &#39;http://www.facebook.com&#39;
    },
    {
        name  : &#39;twitter button&#39;,
        target: &#39;EXTERNAL&#39;,
        url   : &#39;http://www.twitter.com&#39;
    }
];
cordova.exec(win, fail, &quot;ServiceName&quot;, &quot;MethodName&quot;, [&quot;this is a string&quot;, &quot;54&quot;, moreBtns]) ;
&lt;/pre&gt;
How to parse it?
First of all create class for more button

&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;public class moreButtonClass
{
    public string name { get; set; }
    public string target { get; set; }
    public string url { get; set; }
}
&lt;/pre&gt;
and then parse

&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;string[] optValues = JsonHelper.Deserialize&lt;string&gt;(options);

if (optValues.Length &amp;gt; 2)
{
    moreButtonClass[] moreBtns = JsonHelper.Deserialize&lt;morebuttonclass&gt;(optValues[3]);

    for (int i = 0; i &amp;lt; moreBtns.Length; i++)
    {
        Debug.WriteLine(&quot;moreBtns[&quot; + i + &quot;][name]=&quot; + moreBtns[i].name);
        Debug.WriteLine(&quot;moreBtns[&quot; + i + &quot;][target]=&quot; + moreBtns[i].target);
        Debug.WriteLine(&quot;moreBtns[&quot; + i + &quot;][url]=&quot; + moreBtns[i].url);
    }
}
&lt;/morebuttonclass&gt;&lt;/string&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/676275850822383564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2013/09/use-cordova-wp8-jsonhelper-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/676275850822383564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/676275850822383564'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2013/09/use-cordova-wp8-jsonhelper-for.html' title='Use Cordova WP8 JsonHelper for deserialize json'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-991477363158831400</id><published>2013-08-01T01:56:00.000-07:00</published><updated>2013-08-22T07:18:37.882-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="WebView"/><title type='text'>WebViewCore:: Broken after finding a focusable Node</title><content type='html'>If you use WebView for your Android application and encounter a similar error message (and application is broken), probably you have this css property on html element:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;-webkit-user-modify: read-write-plaintext-only;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
just remove this property</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/991477363158831400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2013/08/webviewcore-broken-after-finding.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/991477363158831400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/991477363158831400'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2013/08/webviewcore-broken-after-finding.html' title='WebViewCore:: Broken after finding a focusable Node'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-8231712737812577594</id><published>2013-07-22T06:51:00.000-07:00</published><updated>2013-09-23T03:32:07.605-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tcp/ip monitor"/><category scheme="http://www.blogger.com/atom/ns#" term="Worklight"/><title type='text'>TCP/IP Monitor for IBM Worklight</title><content type='html'>&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Add property &lt;code&gt;-Dworklight.port=8085&lt;/code&gt; to eclipse.ini&lt;/li&gt;
&lt;li&gt;Open TCP/IP Monitor View&lt;/li&gt;
&lt;li&gt;Go to properties under bottom arrow&lt;/li&gt;
&lt;li&gt;Add new monitor&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5WXs_TB9Ec-sCWzKnmzYBadXGG9IrzVXDlD2-eCvA2rFJUzPzWgbIxTz7zB7sfewEhoYyBVhhf4kCpMZNaURfGx_9gjFCGea6jf2OTh-gt1Ytnn594AzdxOvhKs9Rt5NiZxUnwTt3qh99/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5WXs_TB9Ec-sCWzKnmzYBadXGG9IrzVXDlD2-eCvA2rFJUzPzWgbIxTz7zB7sfewEhoYyBVhhf4kCpMZNaURfGx_9gjFCGea6jf2OTh-gt1Ytnn594AzdxOvhKs9Rt5NiZxUnwTt3qh99/s1600/Untitled.png&quot; height=&quot;282&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Ok&lt;/li&gt;
&lt;li&gt;Select created monitor and click Start&lt;/li&gt;
&lt;li&gt;Ok&lt;/li&gt;
&lt;li&gt;Now you can see request/response of worklight&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/8231712737812577594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2013/07/tcpip-monitor-for-ibm-worklight.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/8231712737812577594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/8231712737812577594'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2013/07/tcpip-monitor-for-ibm-worklight.html' title='TCP/IP Monitor for IBM Worklight'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5WXs_TB9Ec-sCWzKnmzYBadXGG9IrzVXDlD2-eCvA2rFJUzPzWgbIxTz7zB7sfewEhoYyBVhhf4kCpMZNaURfGx_9gjFCGea6jf2OTh-gt1Ytnn594AzdxOvhKs9Rt5NiZxUnwTt3qh99/s72-c/Untitled.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2425173770237190494</id><published>2013-01-30T06:33:00.001-08:00</published><updated>2013-01-31T02:52:41.398-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="click delay"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile web"/><category scheme="http://www.blogger.com/atom/ns#" term="onClick"/><title type='text'>Remove click delay on mobile browser</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
mobileClick.js -  jQuery plugin that create self event &#39;mobileclick&#39;, not invoke &#39;click&#39; event, not interfering in propagate stack of events.
You need just bind &#39;mobileclick&#39; event to you html element:
&lt;pre class=&quot;js&quot;&gt;
$(&#39;you-element-selector&#39;).bind(&#39;mobileclick&#39;, function() {
    alert(&#39;test me&#39;);
})
// or
$(document).on(&#39;mobileclick&#39;, &#39;you-element-selector&#39;, function() {
    alert(&#39;test me&#39;);
})
&lt;/pre&gt;

&lt;a href=&quot;https://github.com/transoceanic/mobileClick&quot;&gt;github project: mobileClick&lt;/a&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2425173770237190494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2013/01/remove-click-delay-on-mobile-browser.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2425173770237190494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2425173770237190494'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2013/01/remove-click-delay-on-mobile-browser.html' title='Remove click delay on mobile browser'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-1080566819141817464</id><published>2012-08-09T02:49:00.000-07:00</published><updated>2012-08-09T02:49:11.701-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="ObjectiveC categories"/><category scheme="http://www.blogger.com/atom/ns#" term="section header"/><category scheme="http://www.blogger.com/atom/ns#" term="UITableView"/><title type='text'>Objective C: UITableView: Detect which section header on top</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;static NSInteger currentTopVisibleSection = -1;

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    NSIndexPath *topCellPath = [[tableView indexPathsForVisibleRows] objectAtIndex:0];
    if (currentTopVisibleSection != topCellPath.section) {
        currentTopVisibleSection = topCellPath.section;
        NSLog(@&quot;current section on top is %d&quot;, currentTopVisibleSection);
    }

    NSString *header = [NSString stringWithFormat:@&quot;Section %d&quot;, section];
    return header;
}
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/1080566819141817464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2012/08/objective-c-uitableview-detect-which.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/1080566819141817464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/1080566819141817464'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2012/08/objective-c-uitableview-detect-which.html' title='Objective C: UITableView: Detect which section header on top'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-4526482002448740504</id><published>2012-06-17T06:19:00.000-07:00</published><updated>2012-06-17T06:19:48.108-07:00</updated><title type='text'>iOS PhoneGap / Cordova – Splash screen control</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In Cordova from 1.6 version exist &lt;b&gt;“AutoHideSplashScreen”&lt;/b&gt; attribute. If you need show splash screen until you get onDeviceReady event - change value to &lt;b&gt;NO&lt;/b&gt;.
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush:jscript&quot;&gt;function onBodyLoad()
{  
 document.addEventListener(&quot;deviceready&quot;, onDeviceReady, false);
}
function onDeviceReady()
{
 navigator.splashscreen.hide();
}
&lt;/pre&gt;
&lt;br /&gt;
But if you have Cordova version until 1.8 it doesn&#39;t work. Use instead navigator object:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:jscript&quot;&gt; cordova.exec(null, null, &quot;SplashScreen&quot;, &quot;hide&quot;, []);
 cordova.exec(null, null, &quot;SplashScreen&quot;, &quot;show&quot;, []);
&lt;/pre&gt;
&lt;br /&gt;
But for iPad you need add to project two new images:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:jscript&quot;&gt; Default-Portrait.png
 Default-Landscape.png
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/4526482002448740504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2012/06/ios-phonegap-cordova-splash-screen.html#comment-form' title='62 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/4526482002448740504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/4526482002448740504'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2012/06/ios-phonegap-cordova-splash-screen.html' title='iOS PhoneGap / Cordova – Splash screen control'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>62</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2568265923760568114</id><published>2012-04-05T01:07:00.000-07:00</published><updated>2012-04-05T01:18:02.729-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cursor position"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile web"/><category scheme="http://www.blogger.com/atom/ns#" term="selection range"/><title type='text'>Mobile Web: Set cursor position to the end of a text field.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you want to place the cursor at the end of the text box, simply add the following code :
&lt;br /&gt;
&lt;pre class=&quot;brush:jscript&quot;&gt; 
elm.addEventListener(&quot;focus&quot;, function() {this.value=this.value}, false);
 
 
&lt;/pre&gt;
But if your code is designed for mobile browsers, it will not work.&lt;br /&gt;
Use this code:
&lt;br /&gt;
&lt;pre class=&quot;brush:jscript&quot;&gt; 
elm.addEventListener(&quot;focus&quot;, function(){
             if(this.setSelectionRange) {
           var _this = this;
           setTimeout(function(){
                                    _this.setSelectionRange(9999, 9999);
                                }, 0);
             } else
                 this.focus();
   }, false);
 
 
&lt;/pre&gt;
Why do you want to do this?&lt;br /&gt;
If your site has the direction=&quot;RTL&quot;, then after the text field gets focus, the cursor is placed not at the end of the field and in the beginning.&lt;br /&gt;
So you can&#39;t add text to the end and erase text by backspace.
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2568265923760568114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2012/04/mobile-web-set-cursor-position-to-end.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2568265923760568114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2568265923760568114'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2012/04/mobile-web-set-cursor-position-to-end.html' title='Mobile Web: Set cursor position to the end of a text field.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2704191888816052172</id><published>2011-12-14T06:53:00.000-08:00</published><updated>2011-12-14T07:45:04.538-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="background"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="UITextField"/><title type='text'>Objective C: UITextField controlling background image/color</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you set
&lt;pre class=&quot;brush:cpp&quot;&gt;
UITextField *tf = [[UITextField alloc] init];
tf.borderStyle = UITextBorderStyleRoundedRect;
&lt;/pre&gt;
you can&#39;t control background of text field.
To controlling background you need
&lt;pre class=&quot;brush:cpp&quot;&gt;
#import &quot;QuartzCore/QuartzCore.h&quot;
...

UITextField *tf = [[UITextField alloc] init];
tf.borderStyle = UITextBorderStyleDefault;
tf.background = [UIImage imageNamed:@&quot;bg_000000_20.png&quot;];
tf.layer.cornerRadius = 5.0;
tf.layer.masksToBounds = YES;

// for vertical align
tf.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;

// for border
tf.layer.borderWidth = 1.0;
tf.layer.borderColor = [[UIColor darkGrayColor] CGColor];

// for left padding
tf.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)];
tf.leftViewMode = UITextFieldViewModeAlways;
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2704191888816052172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/12/objective-c-uitextfield-controlling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2704191888816052172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2704191888816052172'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/12/objective-c-uitextfield-controlling.html' title='Objective C: UITextField controlling background image/color'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-7022901136434609889</id><published>2011-12-13T06:28:00.000-08:00</published><updated>2013-01-23T05:30:09.894-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="windows registry"/><title type='text'>Java: Read key from Windows Registry.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
After create new windows registry in cmd by:
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;reg add HKLM\SOFTWARE\Policies\MyApplication\AES /v SecurityKey /d 12345678901234567890123456789012
&lt;/pre&gt;
need read it from java
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;

public class WindowsReqistry {

    /**
     * 
     * @param location path in the registry
     * @param key registry key
     * @return registry value or null if not found
     */
    public static final String readRegistry(String location, String key){
        try {
            // Run reg query, then read output with StreamReader (internal class)
            Process process = Runtime.getRuntime().exec(&quot;reg query &quot; + 
                    &#39;&quot;&#39;+ location + &quot;\&quot; /v &quot; + key);

            StreamReader reader = new StreamReader(process.getInputStream());
            reader.start();
            process.waitFor();
            reader.join();

            // Parse out the value
            String[] parsed = reader.getResult().split(&quot;\\s+&quot;);
            if (parsed.length &gt; 1) {
                return parsed[parsed.length-1];
            }
        } catch (Exception e) {}

        return null;
    }

    static class StreamReader extends Thread {
        private InputStream is;
        private StringWriter sw= new StringWriter();

        public StreamReader(InputStream is) {
            this.is = is;
        }

        public void run() {
            try {
                int c;
                while ((c = is.read()) != -1)
                    sw.write(c);
            } catch (IOException e) { 
            }
        }

        public String getResult() {
            return sw.toString();
        }
    }
    public static void main(String[] args) {

        // Sample usage
        String value = WindowsReqistry.readRegistry(&quot;HKLM\\SOFTWARE\\Policies\\MyApplication\\AES&quot;, &quot;SecurityKey&quot;);
        System.out.println(value);
    }
}
&lt;/value&gt;&lt;/registry&gt;&lt;/key&gt;&lt;/version&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/7022901136434609889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/12/java-read-key-from-windows-registry.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/7022901136434609889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/7022901136434609889'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/12/java-read-key-from-windows-registry.html' title='Java: Read key from Windows Registry.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-1493247853565691043</id><published>2011-11-06T03:30:00.000-08:00</published><updated>2011-11-06T03:30:12.510-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl certificate"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl connection"/><title type='text'>Android: Import SSL certificate and use it to SSL connection</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;First of all you need get SSL certificate. You can obtain certificate (file with .cer extention) from the chain included in the endpoint certificate or from the official site of the issuer (in the Base64 encoded X.509 format).&lt;br /&gt;&lt;br /&gt;Or if you have this certificate installed on you local computer you can obtain it by run &quot;mmc&quot; (Microsoft Management Console) from command line (&quot;Prompt&quot; or &quot;Run&quot;). If you don&#39;t have Certificate snap-in go to &amp;nbsp;File -&amp;gt; Add/Remove Snap-in... -&amp;gt; Select from available snap-ins &quot;Certificates&quot; -&amp;gt; Add to Selected snap-ins -&amp;gt; Ok.&lt;br /&gt;&lt;br /&gt;
Find certificate what do you need -&amp;gt; Right click -&amp;gt; All Tasks -&amp;gt; Export -&amp;gt; Select Base-64 encoded X.509 (.CER) -&amp;gt; Save into &lt;i&gt;my_certificate.cer&lt;/i&gt; in&lt;i&gt; my_certificate_path&lt;/i&gt; place.&lt;br /&gt;&lt;br /&gt;
Content of this file look like:
&lt;pre class=&quot;brush: xml;&quot;&gt;-----BEGIN CERTIFICATE-----
MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0B...
-----END CERTIFICATE-----
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;For create the keystore download latest release of &lt;a href=&quot;http://www.bouncycastle.org/latest_releases.html&quot; target=&quot;_blank&quot;&gt;Bouncy Castle provider&lt;/a&gt; (bcprov-jdkxx-xxx.jar) and store it in &lt;i&gt;provider_path&lt;/i&gt; place. You must have JRE installation for invoke &lt;i&gt;keytool&lt;/i&gt; (located under bin folder). You may add path to &lt;i&gt;keytool&lt;/i&gt; into CLASSPATH environment variable or use absolute path.&lt;/li&gt;
&lt;li&gt;Execute this command for create mykeystore.bks (don&#39;t use upper case and &quot;_&quot; for name):
&lt;pre class=&quot;brush:xml&quot;&gt;D:/PROGRA~1/Java/jre7/bin/keytool -importcert -v -trustcacerts -file &quot;my_certificate_pathmy_certificate.cer&quot; -alias myAlias -keystore &quot;my_keystore_path/mykeystore.bks&quot; -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath &quot;provider_path/bcprov-jdkxx-xxx.jar&quot; -storetype BKS -storepass &quot;my_password&quot;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;You may verify if the certificate was imported correctly
&lt;pre class=&quot;brush:xml&quot;&gt;D:/PROGRA~1/Java/jre7/bin/keytool -list -keystore &quot;my_keystore_path/mykeystore.bks&quot; -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath &quot;provider_path/bcprov-jdkxx-xxx.jar&quot; -storetype BKS -storepass &quot;my_password&quot;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Paste you &lt;i&gt;mykeystore.bks&lt;/i&gt; as a raw resource under res/raw (this generate R.raw.mykeystore resource)
&lt;/li&gt;
&lt;li&gt;
Create a custom &lt;code&gt;HttpClient&lt;/code&gt; to use you SSL certificate for HTTPS connection:
&lt;pre class=&quot;brush: java&quot;&gt;import java.io.InputStream;
import java.security.KeyStore;

import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.SingleClientConnManager;

import android.content.Context;

public class MyHttpsClient extends DefaultHttpClient {
  
    final Context context;
 
    public MyHttpsClient(Context context) {
        this.context = context;
    }
 
    @Override
    protected ClientConnectionManager createClientConnectionManager() {
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(new Scheme(&quot;http&quot;, PlainSocketFactory.getSocketFactory(), 80));
        // Register for port 443 our SSLSocketFactory with our keystore
        // to the ConnectionManager
        registry.register(new Scheme(&quot;https&quot;, newSslSocketFactory(), 443));
        return new SingleClientConnManager(getParams(), registry);
    }
 
    private SSLSocketFactory newSslSocketFactory() {
        try {
            // Get an instance of the Bouncy Castle KeyStore format
            KeyStore trusted = KeyStore.getInstance(&quot;BKS&quot;);
            // Get the raw resource, which contains the keystore with
            // your trusted certificates (root and any intermediate certs)
            InputStream in = context.getResources().openRawResource(R.raw.mykeystore);
            try {
                // Initialize the keystore with the provided trusted certificates
                // Also provide the password of the keystore
                trusted.load(in, &quot;my_password&quot;.toCharArray());
            } finally {
                in.close();
            }
            // Pass the keystore to the SSLSocketFactory. The factory is responsible
            // for the verification of the server certificate.
            SSLSocketFactory sf = new SSLSocketFactory(trusted);
            // Hostname verification from certificate
            // http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506
            sf.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);
            return sf;
        } catch (Exception e) {
            throw new AssertionError(e);
        }
    }
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Use you custom &lt;code&gt;HttpClient&lt;/code&gt;:
&lt;pre class=&quot;brush: java&quot;&gt;DefaultHttpClient client = new MyHttpsClient(getApplicationContext());
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/1493247853565691043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/11/android-import-ssl-certificate-and-use.html#comment-form' title='45 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/1493247853565691043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/1493247853565691043'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/11/android-import-ssl-certificate-and-use.html' title='Android: Import SSL certificate and use it to SSL connection'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>45</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-5706548669224546897</id><published>2011-10-27T01:30:00.000-07:00</published><updated>2012-06-20T23:29:19.073-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bounce"/><category scheme="http://www.blogger.com/atom/ns#" term="detect"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="scroller"/><category scheme="http://www.blogger.com/atom/ns#" term="UIScrollView"/><title type='text'>Objective C: Detect start of bouncing effect for UIScrollView</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
For detect bouncing of UIScrollView (or UITableView ...) using UIScrollViewDelegate:
&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;static BOOL _draggingView = NO;

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
 _draggingView = YES;
}

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
 _draggingView = NO;
}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
 NSInteger pullingDetectFrom = 50;
 if (self.contentOffset.y &amp;lt; -pullingDetectFrom) {
  _draggingView = NO;
  NSLog(@&quot;Pull Down&quot;);
 } else if (self.contentSize.height &amp;lt;= self.frame.size.height &amp;amp;&amp;amp; self.contentOffset.y &amp;gt; pullingDetectFrom) {
  _draggingView = NO;
  NSLog(@&quot;Pull Up&quot;);
 } else if (self.contentSize.height &amp;gt; self.frame.size.height &amp;amp;&amp;amp; 
       self.contentSize.height-self.frame.size.height-self.contentOffset.y &amp;lt; -pullingDetectFrom) {
  _draggingView = NO;
  NSLog(@&quot;Pull Up&quot;);
 }
}
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/5706548669224546897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-detect-start-of-bouncing.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/5706548669224546897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/5706548669224546897'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-detect-start-of-bouncing.html' title='Objective C: Detect start of bouncing effect for UIScrollView'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-997683221072657109</id><published>2011-10-18T02:16:00.000-07:00</published><updated>2011-10-18T02:16:28.486-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="NSSortDescriptor"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="sort"/><title type='text'>Objective C: Sort array of objects</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If we have array of some objects:&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;@interface SimpleObject : NSObject {
 NSInteger key;
 NSString *name;
        . . .
}
&lt;/pre&gt;
and we need to sort this array by &quot;name&quot; property of SimpleObject.
Use NSSortDescriptor:
&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;// declare array with SimpleObject instances
self.simpleObjectsArray = . . .

NSSortDescriptor *sortDescriptor =
        [[[NSSortDescriptor alloc] initWithKey:@&quot;name&quot; ascending:YES] autorelease];
NSArray *sortDescriptors = 
        [NSArray arrayWithObject:sortDescriptor];
// array contained all instances sorted by &quot;name&quot; field
NSArray *sortedArray = 
        [self.simpleObjectsArray sortedArrayUsingDescriptors:sortDescriptors];
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/997683221072657109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-sort-array-of-objects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/997683221072657109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/997683221072657109'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-sort-array-of-objects.html' title='Objective C: Sort array of objects'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-1762174724597549481</id><published>2011-10-11T05:54:00.000-07:00</published><updated>2011-10-30T00:55:42.318-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="local notification"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="UIWebVeiw"/><title type='text'>Objective C: Bring back user to your application during/after he End the Call</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
Sometime you need come back to application after phone call initiated by your own application.&lt;/div&gt;
&lt;div&gt;
Exist two options (each from them not 100% that do you want), but if no choice..&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;After starting phone call you getting local notification alert with two option&lt;/li&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Cancel (stay on call screen)&lt;/li&gt;
&lt;li&gt;Return (back to application during your call)&lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG28mc9DldOdBkiyaRfF3kLEbWiVRnukNVnmBqZUqAOgqggTtHuSRUCuAfL4y8HK1rxQI8YD2AbIqEZl5zUpLojksdO62vuS76Nr66ZoDPllfwLcKpqQbu6LumwdF5HOdkZZ9w5d1bJwNM/s1600/photo.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG28mc9DldOdBkiyaRfF3kLEbWiVRnukNVnmBqZUqAOgqggTtHuSRUCuAfL4y8HK1rxQI8YD2AbIqEZl5zUpLojksdO62vuS76Nr66ZoDPllfwLcKpqQbu6LumwdF5HOdkZZ9w5d1bJwNM/s320/photo.PNG&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/ul&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;NSURL *phoneSchemaURL = [NSURL URLWithString:@&quot;tel://123456789&quot;];
 
[[UIApplication sharedApplication] openURL:phoneSchemaURL];

UILocalNotification *localNotification = [[UILocalNotification alloc] init];
if (localNotification != nil) {
 NSDate *notificationDate = [[NSDate alloc] initWithTimeIntervalSinceNow: 3];
  
 localNotification.fireDate = notificationDate;
 [notificationDate release];
  
 localNotification.alertBody = @&quot;Stay in app&quot;;
 localNotification.alertAction = @&quot;Return&quot;;
  
 localNotification.soundName = UILocalNotificationDefaultSoundName;
  
 [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
}
[localNotification release];
&lt;/pre&gt;
&lt;li&gt;After ending phone call your application retrieve focus.
&lt;pre class=&quot;brush:cpp&quot;&gt;NSURL *phoneSchemaURL = [NSURL URLWithString:@&quot;tel://123456789&quot;];
 
 NSString *osVersion = [[UIDevice currentDevice] systemVersion];
 
if([osVersion compare: @&quot;3.1&quot; options: NSNumericSearch] &amp;gt;= NSOrderedSame ) {
 UIWebView *webview = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
 //or if you just want to call and back to application
 //UIWebView *webview = [[UIWebView alloc] init];

 [webview loadRequest:[NSURLRequest requestWithURL:phoneSchemaURL]];
  
 //if you just want to call and back to application remark code&amp;nbsp;below, but don&#39;t forget release webview&lt;/pre&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt; [self.view addSubview:webview];
 [webview release];
} else {
 // On 3.0 and below, dial as usual
 [[UIApplication sharedApplication] openURL: phoneSchemaURL];          
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/1762174724597549481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-user-back-to-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/1762174724597549481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/1762174724597549481'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-user-back-to-your.html' title='Objective C: Bring back user to your application during/after he End the Call'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG28mc9DldOdBkiyaRfF3kLEbWiVRnukNVnmBqZUqAOgqggTtHuSRUCuAfL4y8HK1rxQI8YD2AbIqEZl5zUpLojksdO62vuS76Nr66ZoDPllfwLcKpqQbu6LumwdF5HOdkZZ9w5d1bJwNM/s72-c/photo.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2496159413392529165</id><published>2011-10-02T03:45:00.000-07:00</published><updated>2011-10-02T03:45:38.685-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="authorization"/><category scheme="http://www.blogger.com/atom/ns#" term="http"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><title type='text'>Objective C: Basic HTTP Authorization</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp;First version of &quot;Authorization&quot;:&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;NSString *loginString = [NSString stringWithFormat:@&quot;%@:%@&quot;, [self userName], [self password]];
NSString *encodedLoginData = [Base64 encode:[loginString dataUsingEncoding:NSUTF8StringEncoding]];  
NSString *base64LoginData = [NSString stringWithFormat:@&quot;Basic %@&quot;,encodedLoginData];

NSURL *url=[NSURL URLWithString:@&quot;http://my_url.com&quot;];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
                timeoutInterval:10.0];

[request setHTTPMethod:@&quot;POST&quot;];

[request setValue:base64LoginData forHTTPHeaderField:@&quot;Authorization&quot;];

NSURLConnection *urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Second version of &quot;Authorization&quot;:&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;NSURL *URL = [NSURL URLWithString:url];
NSURLRequest *request = [NSURLRequest requestWithURL:URL
                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                     timeoutInterval:10.0];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
&lt;/pre&gt;
NSURLConnection Delegates&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
    if ([challenge previousFailureCount] == 0) {
        NSLog(@&quot;received authentication challenge&quot;);
        NSURLCredential *newCredential = [NSURLCredential credentialWithUser:@&quot;USER&quot;
                                                                    password:@&quot;PASSWORD&quot;
                                                                 persistence:NSURLCredentialPersistenceForSession];
        NSLog(@&quot;credential created&quot;);
        [[challenge sender] useCredential:newCredential forAuthenticationChallenge:challenge];
        NSLog(@&quot;responded to authentication challenge&quot;);    
    }
    else {
        NSLog(@&quot;previous authentication failure&quot;);
    }
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2496159413392529165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-basic-http-authorization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2496159413392529165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2496159413392529165'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/10/objective-c-basic-http-authorization.html' title='Objective C: Basic HTTP Authorization'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-9068081453064503343</id><published>2011-09-18T23:35:00.001-07:00</published><updated>2011-11-20T03:55:50.192-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><title type='text'>Objective C: Change title of back button in navigation bar</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You need change title of the back button from view controller which call to next view controller:
&lt;pre class=&quot;brush:cpp&quot;&gt;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if (self.detailsViewController == nil) {
        self.detailsViewController = [[DetailsViewController alloc] initWithNibName:@&quot;DetailsViewController&quot; bundle:nil];
 }
 
 [self.navigationController pushViewController:detailsViewController animated:YES];
 
 [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)viewDidLoad {
 self.title = NSLocalizedString(@&quot;root_tab_title_0&quot;, @&quot;My Title&quot;);

 //Set title for back button to this controller
 self.navigationItem.backBarButtonItem =
  [[[UIBarButtonItem alloc] initWithTitle:@&quot;My back button&quot;
      style:UIBarButtonItemStyleBordered
      target:nil
      action:nil] autorelease];
}

&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/9068081453064503343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-change-title-of-back-button.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/9068081453064503343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/9068081453064503343'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-change-title-of-back-button.html' title='Objective C: Change title of back button in navigation bar'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-7365042402619972120</id><published>2011-09-18T23:31:00.001-07:00</published><updated>2011-11-21T01:31:05.312-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="UINavigationBar"/><title type='text'>Objective C: Change title font in navigation bar</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 30)];
label.textAlignment = UITextAlignmentCenter;
label.adjustsFontSizeToFitWidth = YES;
label.minimumFontSize = 10.0;
[label setFont:[UIFont boldSystemFontOfSize:16.0]];
[label setBackgroundColor:[UIColor clearColor]];
[label setTextColor:[UIColor whiteColor]];
[label setText:@&quot;My Favorite Title&quot;];

[self.navigationItem setTitleView:label];
[label release];

&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/7365042402619972120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-change-title-font-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/7365042402619972120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/7365042402619972120'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-change-title-font-in.html' title='Objective C: Change title font in navigation bar'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2102047797018978117</id><published>2011-09-15T05:23:00.000-07:00</published><updated>2011-09-15T05:23:05.373-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><category scheme="http://www.blogger.com/atom/ns#" term="ObjectiveC categories"/><category scheme="http://www.blogger.com/atom/ns#" term="static library"/><category scheme="http://www.blogger.com/atom/ns#" term="xCode"/><title type='text'>Xcode: include ObjectiveC categories int static library</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;If you need to include&amp;nbsp;ObjectiveC categories or other framework using ObjectiveC categories&amp;nbsp;( for example JSON framework ) into your own static library you probably get&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 28.0px; text-indent: -28.0px;&quot;&gt;&lt;b&gt;-[__NSCFDictionary JSONRepresentation]: unrecognized selector sent to instance&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In your project that using your static library you need to set in Project Settings for &quot;Other Linker Flags&quot; property two additional flags:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&lt;b&gt;-ObjC&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;-all_load&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2102047797018978117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/xcode-include-objectivec-categories-int.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2102047797018978117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2102047797018978117'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/xcode-include-objectivec-categories-int.html' title='Xcode: include ObjectiveC categories int static library'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-6415087688415258302</id><published>2011-09-08T00:05:00.000-07:00</published><updated>2011-09-08T00:05:54.291-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="merge"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><title type='text'>Objective C: Merge two images</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre class=&quot;brush:cpp&quot;&gt;+ (UIImage*)mergeImage:(UIImage*)first withImage:(UIImage*)second
{
 // get size of the first image
 CGImageRef firstImageRef = first.CGImage;
 CGFloat firstWidth = CGImageGetWidth(firstImageRef);
 CGFloat firstHeight = CGImageGetHeight(firstImageRef);
 
 // get size of the second image
 CGImageRef secondImageRef = second.CGImage;
 CGFloat secondWidth = CGImageGetWidth(secondImageRef);
 CGFloat secondHeight = CGImageGetHeight(secondImageRef);
 
 // build merged size
 CGSize mergedSize = CGSizeMake(MAX(firstWidth, secondWidth), MAX(firstHeight, secondHeight));
 
 // capture image context ref
 UIGraphicsBeginImageContext(mergedSize);
 
 //Draw images onto the context
 [first drawInRect:CGRectMake(0, 0, firstWidth, firstHeight)];
 [second drawInRect:CGRectMake(0, 0, secondWidth, secondHeight)]; 
 
 // assign context to new UIImage
 UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
 
 // end context
 UIGraphicsEndImageContext();

 return newImage;
}
&lt;/pre&gt;&lt;br /&gt;
If you want to&amp;nbsp;resize&amp;nbsp;new image to new&amp;nbsp;desired size use function from &lt;a href=&quot;http://transoceanic.blogspot.com/2011/09/objective-c-resize-image.html&quot;&gt;previous post&lt;/a&gt;.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/6415087688415258302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-merge-two-images.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/6415087688415258302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/6415087688415258302'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-merge-two-images.html' title='Objective C: Merge two images'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2656621504937617334</id><published>2011-09-07T08:14:00.000-07:00</published><updated>2011-09-07T08:14:54.999-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="objective C"/><title type='text'>Objective C: Resize image</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre class=&quot;brush:cpp&quot;&gt;+ (UIImage*)resizeImageWithImage:(UIImage*)image toSize:(CGSize)newSize
{
    // Create a graphics image context
    UIGraphicsBeginImageContext(newSize);
 
    // draw in new context, with the new size
    [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
 
    // Get the new image from the context
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
 
    // End the context
    UIGraphicsEndImageContext();
 
    return newImage;
}
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2656621504937617334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-resize-image.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2656621504937617334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2656621504937617334'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/objective-c-resize-image.html' title='Objective C: Resize image'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2464622948703495901</id><published>2011-09-07T00:50:00.000-07:00</published><updated>2011-09-07T00:51:35.715-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="emulator"/><category scheme="http://www.blogger.com/atom/ns#" term="exception"/><title type='text'>Android Emulator: invalid command-line parameter exception.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The default installation location is:&lt;b&gt;&lt;i&gt; C:\Program Files\Android\android-sdk.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
If you&amp;nbsp;set&amp;nbsp;&lt;b&gt;&lt;i&gt;C:\Program Files\Android\android-sdk&lt;/i&gt;&lt;/b&gt;&amp;nbsp;as SDK Location (&lt;b&gt;Window&amp;nbsp;&lt;/b&gt;-&amp;gt;&amp;nbsp;&lt;b&gt;Preferences&amp;nbsp;&lt;/b&gt;-&amp;gt;&amp;nbsp;&lt;b&gt;Android&lt;/b&gt;) and&amp;nbsp;try to run android application from Eclipse&amp;nbsp;most likely you&#39;ll get an error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[Emulator] Hint: use &#39;@foo&#39; to launch a virtual device named &#39;foo&#39;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[Emulator] please use -help for more information&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In my opinion, this is because of space in &lt;i style=&quot;font-weight: bold;&quot;&gt;Program Files&lt;/i&gt;,&lt;br /&gt;
so set&amp;nbsp;SDK Location&amp;nbsp;for 32-bit Windows&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;C:\PROGRA~1\Android\android-sdk&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;and for 64-bit Windows&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;C:\PROGRA~2\Android\android-sdk&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2464622948703495901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/android-emulator-invalid-command-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2464622948703495901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2464622948703495901'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/android-emulator-invalid-command-line.html' title='Android Emulator: invalid command-line parameter exception.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-7857667846904231595</id><published>2011-09-05T01:58:00.000-07:00</published><updated>2013-07-02T03:34:41.041-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="post data"/><category scheme="http://www.blogger.com/atom/ns#" term="send post data"/><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7"/><category scheme="http://www.blogger.com/atom/ns#" term="wp7"/><title type='text'>WP7: Sending &quot;POST&quot; data and receive response</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Let&#39;s send &quot;POST&quot; data from our Windows Phone and get response.&lt;br /&gt;
&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create Windows Phone Application named &quot;SendPOSTdata&quot;.&lt;/li&gt;
&lt;li&gt;In MainPage.xaml.cs include some &quot;using&quot;:&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;using System;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.Net;
using System.Windows;
using Microsoft.Phone.Controls;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Create loaded event handler:&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;using System;
public MainPage()
{
    InitializeComponent();

    Loaded += new RoutedEventHandler(MainPage_Loaded);
}

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
    System.Uri myUri = new System.Uri(&quot;http://myPageUrlAddress.com/&quot;);
    HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(myUri);
    myRequest.Method = &quot;POST&quot;;
    myRequest.ContentType = &quot;application/x-www-form-urlencoded&quot;;
    myRequest.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback),myRequest);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Now we need create our &quot;POST&quot; data stream:&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;void GetRequestStreamCallback(IAsyncResult callbackResult)
{
    HttpWebRequest myRequest = (HttpWebRequest)callbackResult.AsyncState;
    // End the stream request operation
    Stream postStream = myRequest.EndGetRequestStream(callbackResult);

    // Create the post data
    string postData = &quot;param1=value1&amp;amp;param2=value2&quot;;
    byte[] byteArray = Encoding.UTF8.GetBytes(postData);

    // Add the post data to the web request
    postStream.Write(byteArray, 0, byteArray.Length);
    postStream.Close();

    // Start the web request
    myRequest.BeginGetResponse(new AsyncCallback(GetResponsetStreamCallback), myRequest);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;And at the end receive response:&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;void GetResponsetStreamCallback(IAsyncResult callbackResult)
{
    HttpWebRequest request = (HttpWebRequest)callbackResult.AsyncState;
    HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(callbackResult);
    using (StreamReader httpWebStreamReader = new StreamReader(response.GetResponseStream()))
    {
        string result = httpWebStreamReader.ReadToEnd();
        //For debug: show results
        Debug.WriteLine(result);
    }
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Run.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/7857667846904231595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/09/wp7-sending-post-data-and-receive.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/7857667846904231595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/7857667846904231595'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/09/wp7-sending-post-data-and-receive.html' title='WP7: Sending &quot;POST&quot; data and receive response'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-2638133199380415318</id><published>2011-08-21T06:58:00.000-07:00</published><updated>2011-09-04T02:09:09.558-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date Picker"/><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker"/><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker control"/><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker programmatically"/><category scheme="http://www.blogger.com/atom/ns#" term="localization"/><category scheme="http://www.blogger.com/atom/ns#" term="localize DatePicker"/><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight DatePicker"/><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7"/><category scheme="http://www.blogger.com/atom/ns#" term="wp7"/><title type='text'>WP7: How to Localize you DatePicker</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Create your DatePicker application described in this &lt;a href=&quot;http://transoceanic.blogspot.com/2011/08/wp7-create-datepicker-control.html&quot;&gt;article&lt;/a&gt; or your own application.&lt;/li&gt;
&lt;li&gt;Insert in MainPage.xaml.cs&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;using System.Globalization;
using System.Threading;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Segoe UI&#39;, Verdana, Arial; font-size: 14px;&quot;&gt;Windows&amp;nbsp;Phone supports the display languages you may find &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;Next code fragment do all you need (of course you must choose &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e5e5e5; font-family: &#39;Segoe UI&#39;, Verdana, Arial; font-size: 15px;&quot;&gt;Culture code&lt;/span&gt;&quot; you need):&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;public MainPage()
{
    CultureInfo newCulture = new CultureInfo(&quot;en-GB&quot;);
    Thread.CurrentThread.CurrentCulture = newCulture;
    Thread.CurrentThread.CurrentUICulture = newCulture;

    ...
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;But if your language not supported by windows phone?&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;public MainPage()
{
    CultureInfo newCulture = new CultureInfo(&quot;en-GB&quot;);

    //change format of DatePicker to you own format
    newCulture.DateTimeFormat.ShortDatePattern = &quot;d/MMM/yyyy&quot;;

    //set day names
    newCulture.DateTimeFormat.DayNames = new string[] { &quot;first day&quot;, 
                                                        &quot;second day&quot;, 
                                                        &quot;third day&quot;, 
                                                        &quot;4 day&quot;, 
                                                        &quot;5 day&quot;, 
                                                        &quot;6 day&quot;, 
                                                        &quot;7 day&quot; };

    //set month names
    newCulture.DateTimeFormat.MonthNames = new string[] {&quot;1 month&quot;, 
                                                         &quot;2 month&quot;, 
                                                         &quot;3 month&quot;, 
                                                         &quot;4 month&quot;, 
                                                         &quot;5 month&quot;, 
                                                         &quot;6 month&quot;, 
                                                         &quot;7 month&quot;, 
                                                         &quot;8 month&quot;, 
                                                         &quot;9 month&quot;, 
                                                         &quot;10 month&quot;, 
                                                         &quot;11 month&quot;, 
                                                         &quot;12 month&quot;, 
                                                         &quot;&quot;};

    Thread.CurrentThread.CurrentCulture = newCulture;
    Thread.CurrentThread.CurrentUICulture = newCulture;

    ...
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Enjoy&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/2638133199380415318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/08/wp7-how-to-localize-you-datepicker.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2638133199380415318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/2638133199380415318'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/08/wp7-how-to-localize-you-datepicker.html' title='WP7: How to Localize you DatePicker'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-5206973680491251368</id><published>2011-08-16T23:39:00.000-07:00</published><updated>2011-08-16T23:41:38.584-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="Mouse Wheeling Ticker"/><category scheme="http://www.blogger.com/atom/ns#" term="scroller"/><category scheme="http://www.blogger.com/atom/ns#" term="ticker"/><title type='text'>SourceForge.net: Mouse Wheeling Ticker: SCM</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;a href=&quot;https://sourceforge.net/scm/?type=svn&amp;amp;group_id=337484#.Tktguv59US8.blogger&quot;&gt;SourceForge.net: Mouse Wheeling Ticker: SCM&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://turboticker.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;Mouse Wheeling Ticker&lt;/a&gt; - ticker to scroll any content (in any browser) without much action which does not load the CPU and allows the mouse wheel to scroll. Enjoy :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/5206973680491251368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/08/sourceforgenet-mouse-wheeling-ticker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/5206973680491251368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/5206973680491251368'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/08/sourceforgenet-mouse-wheeling-ticker.html' title='SourceForge.net: Mouse Wheeling Ticker: SCM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2484637286305291771.post-6551552623412944566</id><published>2011-08-15T03:25:00.000-07:00</published><updated>2011-09-05T23:37:08.917-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date Picker"/><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker"/><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker control"/><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker programmatically"/><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight DatePicker"/><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight Toolkit"/><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7"/><category scheme="http://www.blogger.com/atom/ns#" term="wp7"/><title type='text'>WP7 - Create DatePicker control programmatically</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;If you need use DatePicker in your windows phone application you must create control field in xaml file. Or no...&lt;br /&gt;
Let&#39;s create DatePicker control programmatically without any code in xaml file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Install&amp;nbsp;&lt;a href=&quot;http://silverlight.codeplex.com/releases&quot;&gt;Silverlight Toolkit&lt;/a&gt;&amp;nbsp;last version.&lt;/li&gt;
&lt;li&gt;Create new &quot;Windows Phone Application&quot; named &quot;DatePickerControlProgrammatically&quot;.&lt;/li&gt;
&lt;li&gt;Adding new reference to Microsoft.Phone.Controls.Toolkit&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Main Menu -&amp;gt; Project -&amp;gt; Add Reference -&amp;gt; Tab &quot;.NET&quot; -&amp;gt; choose Microsoft.Phone.Controls.Toolkit.&lt;/li&gt;
&lt;li&gt;If you no find&amp;nbsp;Microsoft.Phone.Controls.Toolkit in &quot;.NET&quot; tab go to &quot;Browse&quot; tab and navigate to this dll in you computer (for me &quot;C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Toolkit\Sep10\Bin\Microsoft.Phone.Controls.Toolkit.dll&quot;).&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Create new folder in project &quot;Toolkit.Content&quot; and put inside two images for cancel and check control (you can get them in Silverlight Toolkit project or create you own icons):&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDh8hYr278CoHUxE3SwAmw48eLIQNHeKhSAYidmGK1UgJ7578uf_sdxpffUxPeKANI20ZCsrVVjMJGZbMYspAj7CqWrCiki2WZrc_S3hACwKka9-KP8hNIJUOWIR6kVc9dWl9xTUlG2kQf/s1600/ScreenClip.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDh8hYr278CoHUxE3SwAmw48eLIQNHeKhSAYidmGK1UgJ7578uf_sdxpffUxPeKANI20ZCsrVVjMJGZbMYspAj7CqWrCiki2WZrc_S3hACwKka9-KP8hNIJUOWIR6kVc9dWl9xTUlG2kQf/s1600/ScreenClip.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Don&#39;t forget change &quot;Build Action&quot; property for each image to &quot;Content&quot; from &quot;Resource&quot;. &lt;/li&gt;
&lt;li&gt;Override DatePicker class with our custom DatePickerCustom class. Create new class &quot;DatePickerCustom.cs&quot;:&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
using System.Windows.Controls;
using Microsoft.Phone.Controls;  

namespace DatePickerControlProgrammatically
{
    public class DatePickerCustom : DatePicker
    {
        public void ClickTemplateButton()
        {
            Button btn = (GetTemplateChild(&quot;DateTimeButton&quot;) as Button);
            ButtonAutomationPeer peer = new ButtonAutomationPeer(btn);
            IInvokeProvider provider = (peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider);

            provider.Invoke();
        }
    }
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;MainPage.xaml.cs - create new DatePickerCustom on Loaded event: &lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace DatePickerControlProgrammatically
{
    public partial class MainPage : PhoneApplicationPage
    {
        private DatePickerCustom datePicker;

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            // create datePicker programmatically
            if (this.datePicker == null)
            {
                this.datePicker = new DatePickerCustom();
                this.datePicker.IsTabStop = false;
                this.datePicker.MaxHeight = 0;

                this.datePicker.ValueChanged += new EventHandler&amp;lt;DateTimeValueChangedEventArgs&amp;gt;(datePicker_ValueChanged);

                LayoutRoot.Children.Add(this.datePicker);

            }
        }

        void datePicker_ValueChanged(object sender, DateTimeValueChangedEventArgs e)
        {
            // now we may use got value from datePicker
            PageTitle.Text = this.datePicker.ValueString;
        }
    }
}&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;For test add to MainPage.xaml two buttons - &quot;Get Date&quot; and &quot;Clear Date&quot;: &lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;Button Content=&quot;Get Date&quot; Height=&quot;72&quot; HorizontalAlignment=&quot;Left&quot; 
    Name=&quot;button1&quot; VerticalAlignment=&quot;Top&quot; 
    Width=&quot;160&quot; Click=&quot;button1_Click&quot;/&amp;gt;
&amp;lt;Button Content=&quot;Clear Date&quot; Height=&quot;72&quot; HorizontalAlignment=&quot;Right&quot; 
    Name=&quot;button2&quot; VerticalAlignment=&quot;Top&quot; 
    Width=&quot;160&quot; Click=&quot;button2_Click&quot;/&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;And to MainPage.xaml.cs add control for our buttons: &lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;private void button1_Click(object sender, RoutedEventArgs e)
{
    this.datePicker.ClickTemplateButton();
}

private void button2_Click(object sender, RoutedEventArgs e)
{
    PageTitle.Text = &quot;Page Title&quot;;
    clearDatePicker();
}

void clearDatePicker()
{
    this.datePicker.ValueChanged -= new EventHandler&amp;lt;DateTimeValueChangedEventArgs&amp;gt;(datePicker_ValueChanged);

    //this.datePicker.Value = &quot;8/16/2011&quot;;
    this.datePicker.Value = null;

    this.datePicker.ValueChanged += new EventHandler&amp;lt;DateTimeValueChangedEventArgs&amp;gt;(datePicker_ValueChanged);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Run&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://transoceanic.blogspot.com/feeds/6551552623412944566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://transoceanic.blogspot.com/2011/08/wp7-create-datepicker-control.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/6551552623412944566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2484637286305291771/posts/default/6551552623412944566'/><link rel='alternate' type='text/html' href='http://transoceanic.blogspot.com/2011/08/wp7-create-datepicker-control.html' title='WP7 - Create DatePicker control programmatically'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDh8hYr278CoHUxE3SwAmw48eLIQNHeKhSAYidmGK1UgJ7578uf_sdxpffUxPeKANI20ZCsrVVjMJGZbMYspAj7CqWrCiki2WZrc_S3hACwKka9-KP8hNIJUOWIR6kVc9dWl9xTUlG2kQf/s72-c/ScreenClip.png" height="72" width="72"/><thr:total>8</thr:total></entry></feed>