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

<channel>
	<title>Mobilewits &#187; Xamarin.iOS</title>
	<atom:link href="http://www.mobilewits.com/blog/category/xamarin-ios/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mobilewits.com/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 27 Aug 2015 22:17:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Hello World, How it works?</title>
		<link>http://www.mobilewits.com/blog/hello-world-how-it-works/</link>
		<comments>http://www.mobilewits.com/blog/hello-world-how-it-works/#comments</comments>
		<pubDate>Tue, 10 Mar 2015 12:10:57 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=68</guid>
		<description><![CDATA[In the last tutorial we see how to create a basic hello World app, now in this we are going to see what we did there and try to understand how all this works for batter understanding. What we are going to cover in this tutorial: Introduction to Xamarin Studio – Introduction to Xamarin Studio and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In the last tutorial we see how to create a basic hello World app, now in this we are going to see what we did there and try to understand how all this works for batter understanding.</p>
<p>What we are going to cover in this tutorial:</p>
<ul>
<li><strong>Introduction to Xamarin Studio</strong> – Introduction to Xamarin Studio and creating a new application.</li>
<li><strong>User Interface (UI) – </strong>Creating user interfaces with the iOS Designer.</li>
<li><strong>View Controllers and the View Lifecycle</strong> – An introduction to the View Lifecycle and managing Content View Hierarchies with the View Controller.</li>
</ul>
<p><strong>Introduction to Xamarin Studio:</strong></p>
<p>Xamarin Studio is a free, open-source IDE that combines features from Visual Studio and XCode. It features a fully integrated visual designer, a text editor complete with refactoring tools, an assembly browser, source code integration, and more. In this guide we&#8217;ll learn to use some basic Xamarin Studio features, but if you&#8217;re new to Xamarin Studio you will want tUser Interface:o check out the in-depth Introduction to Xamarin Studio.</p>
<p><strong>User Interface:</strong></p>
<p>As same as iOS Xcode Xamarin uses same User Interface builder Storyboard to develop GUI for user.<br />
The iOS Designer is a visual tool for building user interfaces in Xamarin. We can launch the Designer by double-clicking on any Storyboard (.storyboard) file, which will open to a view that resembles the following screenshot:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/2a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/2a.png" alt="2a" class="alignnone wp-image-71 size-full" width="1920" height="971" /></a></p>
<p>This storyboard is a file that contains visual design of your application’s all the screens and views as well as transitions and relationships between different screens of application.</p>
<p><strong>View Controllers and the View Lifecycle:</strong></p>
<p>Storyboard provides us user interface to display the controls and contents but what about interaction with these controls? For this we need a View Controllers file, View Controllers are used to manage View in Content hierarchy.<br />
It contains code that gives power to interact with controls.</p>
<p><strong>View Controllers and Storyboards:</strong></p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/2b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/2b.png" alt="2b" class="alignnone wp-image-72 size-full" width="583" height="459" /></a></p>
<p>We can specify custom view controller class name for view controller by editing Class property in the identity section of properties pad. We have here Hello_WorldViewController.</p>
<p>This links the Storyboard representation of the View Controller to the Hello_WorldViewController C# class. If we open the Hello_WorldViewController.cs file, we see that our View Controller is a subclassof UIViewController, as illustrated by the code below:</p><pre class="crayon-plain-tag">public&nbsp;partial&nbsp;class&nbsp;Hello_WorldViewController&nbsp;:&nbsp;UIViewController
{
 &nbsp;&nbsp;   public&nbsp;Hello_WorldViewController&nbsp;(IntPtr&nbsp;handle)&nbsp;:&nbsp;base&nbsp;(handle)
 &nbsp;&nbsp;   {
 &nbsp;&nbsp;   }
 }</pre><p>The Hello_WorldViewController now drives the interactions of the Content View Hierarchy associated with this View Controller in the Storyboard. Next we’ll learn about the View Controller&#8217;s role in managing the Views by introducing a process called the View lifecycle.</p>
<p>View Lifecycle:<br />
The View Controller is in charge of loading and unloading Content View Hierarchies from the Window. When something of importance happens to a View in the Content View Hierarchy, the operating system notifies the View Controller through events in the View lifecycle. By overriding methods in the View lifecycle, we can interact with the objects on the screen and create a dynamic, responsive user interface.</p>
<p>These are the basic lifecycle methods and their function:</p>
<ul>
<li><strong>ViewDidLoad</strong> &#8211; Called once the first time the View Controller loads its Content View Hierarchy into memory. This is a good place to do initial setup because it is when Subviews first become available in code.</li>
<li><strong>ViewWillAppear</strong> &#8211; Called every time a View Controller&#8217;s View is about to be added to a Content View Hierarchy and appear on the screen.</li>
<li><strong>ViewWillDisappear</strong> &#8211; Called every time a View Controller&#8217;s View is about to be removed from a Content View Hierarchy and disappear from the screen. This lifecycle event is used for cleanup and saving state.</li>
<li><strong>ViewDidAppear and ViewDidDisappear</strong> &#8211; Called when a View gets added or removed from the Content View Hierarchy, respectively.</li>
</ul>
<p>When we add custom code to any stage of the Lifecycle, we override that Lifecycle method’s base implementation. We tap into the existing Lifecycle method, which has some code already attached to it, and we extend it with our own code. We call the base implementation from inside our method to make sure the original code runs before our new code.</p>
<p>Responding to User Interaction:</p>
<p>When user interact with view controller like button presses, navigations, and more. The simplest way to handle user interaction is to wire up a control to listen to user input and attach an event handler to respond to the input.</p>
<p>In our previous project we create a Click here button to prompt alertview.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/a-193x300.png" alt="a" class="alignnone size-medium wp-image-14" width="193" height="300" /></a></p>
<p>When we assigned a Name to the Button control in the Properties Pad, the iOS designer automatically mapped it to a control in the Hello_WorldViewController.cs, making the btn_click available to us inside the Hello_WorldViewController class.</p>
<p>In the btn_click method</p><pre class="crayon-plain-tag">partial&nbsp;void&nbsp;btn_click&nbsp;(UIButton&nbsp;sender)
{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;av&nbsp;=&nbsp;new&nbsp;UIAlertView&nbsp;(&quot;Hello&quot;,&quot;hello&nbsp;world&quot;,null, &quot;OK&quot;,null);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;av.Show&nbsp;();
}</pre><p>I hope this gives you somewhat understanding of Xamarin iOS app development.</p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/Hello-World-How-it-works-">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/hello-world-how-it-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World! Build your first Xamarin iOS App</title>
		<link>http://www.mobilewits.com/blog/hello-world-build-your-first-xamarin-ios-app/</link>
		<comments>http://www.mobilewits.com/blog/hello-world-build-your-first-xamarin-ios-app/#comments</comments>
		<pubDate>Sat, 07 Mar 2015 05:36:11 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=12</guid>
		<description><![CDATA[Take a Look at Your First App Before we go into the coding part, let’s first take a look at our version of the “Hello World” app. The final deliverable will look like this Start Coding! First, launch Xamarin. Once launched, Xamarin displays a welcome dialog. From here, choose “New Solution” to start a new [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Take a Look at Your First App</strong></p>
<p>Before we go into the coding part, let’s first take a look at our version of the “Hello World” app. The final deliverable will look like this</p>
<p style="float: left; width: 250px;"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/a-193x300.png" width="193" height="300" /></p>
<p><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/b-191x300.png" width="191" height="300" /></p>
<p><strong>Start Coding!</strong></p>
<p>First, launch Xamarin. Once launched, Xamarin displays a welcome dialog. From here, choose “New Solution” to start a new project:<br />
<a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png" class="  alignnone wp-image-18 size-full" width="300" height="115" /></a></p>
<p>From the New Solution Dialogue, we’ll choose C# &gt; iOS &gt; Unified API &gt; iPhone &gt; Single View Application  template. Let&#8217;s give it the  Name Hello_world, and the Solution Name Hello_world:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/d.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/d.png" class="  alignnone wp-image-20 size-full" width="928" height="561" /></a></p>
<p>Next, we’ll open the MainStoryboard.storyboard file by double-clicking on it in the Solution pad:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/e.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/e.png" class="  alignnone wp-image-21 size-full" width="1919" height="972" /></a></p>
<p>From the Toolbox (the area on the right), let’s type &#8220;Button&#8221; into the search bar and drag a Button onto the design surface (the area in the center)</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/f.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/f.png" class="  alignnone wp-image-23 size-full" width="1919" height="903" /></a></p>
<p>With the Button selected on the design surface, change the Name property in the Identity section of the Property Pad to btn_. Change the Title property to &#8220;Click Here&#8221;:</p>
<p>Next, grab the handles of the Dragging Controls (the circles around the control) and make the button wider:</p>
<p>Now go to Event tag in button property and write event name in Up Side property. This is the method or event name that has the code that you want to execute when button will press.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/g.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/g.png" class="  alignnone wp-image-24 size-full" width="300" height="408" /></a></p>
<p>Next we’re going to add code to wire up the user interface. Let’s add the code to power the user interface into the Hello_WorldViewController class. Double-click on Hello_WorldViewController.cs in the Solution Pad to open it.</p>
<p>You will find btn_click event</p><pre class="crayon-plain-tag">partial void btn_click(UIButton sender)
{
    var av= new UIAlertView(“Hello”,
    “hello world”,
    null,
    “OK”,
    unll);
    av.show();
}</pre><p>Just write above code into btn_click event to prompt alertview and that’s it.</p>
<p>Let’s save our work, and then build the application by choosing Build=&gt;Build All. If our application compiles, we will get a success message at the top of the IDE:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/h.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/h.png" class="alignnone wp-image-25 size-full" width="627" height="67" /></a></p>
<p>If there are errors, we can go through the previous steps and correct any mistakes until the application builds successfully.</p>
<p>Finally, let’s test our application in the iOS Simulator. In the top left of the IDE, choose Debug from the first dropdown, and iPhone from second dropdown, and press Start (the round button that resembles a Play button):</p>
<p>This will launch our application inside the iOS Simulator:</p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/Hello-World-How-it-works-">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/hello-world-build-your-first-xamarin-ios-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create Action sheets using Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-to-create-action-sheets-using-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-to-create-action-sheets-using-xamarin-ios/#comments</comments>
		<pubDate>Wed, 11 Mar 2015 13:21:01 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=95</guid>
		<description><![CDATA[In this tutorial we are going to see some basic controls that are needed to develop a regular application like: ActionSheet Buttons Label ImageView ActionSheet: Action sheets consist of a really convenient and fast way to display a bunch of options that the user should select from, and it is widely used in great number [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we are going to see some basic controls that are needed to develop a regular application like:</p>
<ul>
<li>ActionSheet</li>
<li>Buttons</li>
<li>Label</li>
<li>ImageView</li>
</ul>
<p><strong>ActionSheet:</strong> Action sheets consist of a really convenient and fast way to display a bunch of options that the user should select from, and it is widely used in great number of applications. Its disadvantage though is that it adopts the iOS’s look and feel without being able to be graphically modified; therefore it might not fit to applications with customized GUI.</p>
<p>We are going to see a small tutorial that display ActionSheet when press on certain buttons. When we complete our tutorial it will look like this:</p>
<p style="float: left; width: 250px;"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4a-191x300.png" alt="4a" width="191" height="300" /></p>
<p><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4b-192x300.png" alt="4b" width="192" height="300" /></p>
<p>Select Unified API and iPhone , we are going to need only 1 screen so we are taking Single View Application. Give name of application “ActionSheet_Demo”.</p>
<p><strong>Let’s begin:</strong> Go on New Solution and create new iOS solution.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png" alt="c" class="alignnone size-full wp-image-18" width="300" height="115" /></a></p>
<p>Select Unified API and iPhone , we are going to need only 1 screen so we are taking Single View Application. Give name of application “ActionSheet_Demo”.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4c.png" alt="4c" class="alignnone size-full wp-image-101" width="930" height="563" /></a></p>
<p>Now we get a blank storyboard where we take 2 buttons for using storyboard. When you clink on these buttons it invokes a ActionSheet controller.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4d.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4d.png" alt="4d" class="alignnone size-full wp-image-102" width="395" height="559" /></a></p>
<p>Now go and declare name in identity to access button click event or touch up inside. Here we give btn_normal for Simple Action Sheet and btn_option for Delete Confirmation Action Sheet.</p>
<p>In ActionSheet_DemoViewController file declare UIActionSheet object.</p><pre class="crayon-plain-tag">public partial class ActionSheet_DemoViewController : UIViewController
{
    UIActionSheet normal;
    UIActionSheet option;
}</pre><p>Now go in ViewDidLoad method and write code below</p><pre class="crayon-plain-tag">public override void ViewDidLoad ()
{
      string[] tableItems = new string[] {"Move","Fruits","Duplicate"};
      base.ViewDidLoad ();
      normal = new UIActionSheet ("Simple ActionSheet", null, "Cancel", "Delete", n	ull);
      option = new UIActionSheet ("ActionSheet with option", null, "Delete it", "Copy", 	tableItems);
         
}</pre><p>We’re almost done here, now just call the object ob UIActionSheet and you get ActionSheet.<br />
Find TouchUpInside method of buttons that we were created earlier and call actionsheet method with the help of object.</p>
<p>Write the code below to get it done:</p><pre class="crayon-plain-tag">partial void btn_normal_TouchUpInside (UIButton sender)
{
    normal.ShowInView (View);
}

partial void btn_delete_TouchUpInside (UIButton sender)
{
    option.ShowInView (View);
}</pre><p>We’ve created UIActionSheet object and used with button actions but what about using this actionsheet buttons???</p>
<p>For that, we’ve to use</p><pre class="crayon-plain-tag">normal.Clicked += (btn_sender, args) =&gt; Console.WriteLine("{0} Clicked", args.ButtonIndex);
and
option.Clicked += (btn_sender, args) =&gt; Console.WriteLine("{0} Clicked", args.ButtonIndex);</pre><p>Add these lines before you call the methods of ActionSheet ShowInView in button action event.<br />
And that’s it, you get index number of button in your Application Output. Just run and check it.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4a.png" alt="4a" class="alignnone size-full wp-image-99" width="321" height="503" /></a></p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-create-Action-sheets-using-Xamarin-iOS.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-create-action-sheets-using-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use Buttons in Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-to-use-buttons-in-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-to-use-buttons-in-xamarin-ios/#comments</comments>
		<pubDate>Wed, 11 Mar 2015 15:11:58 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=105</guid>
		<description><![CDATA[Buttons are the basic controls that are needed in every basic app in every platform. In Xamarin iOS we have six different types of buttons. System DetailDisclosure InfoDark InfoLight ContactAdd Custom Adding buttons in our view is very simple just drag and drop button control from toolbox. To change type of the button go to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Buttons are the basic controls that are needed in every basic app in every platform. In Xamarin iOS we have six different types of buttons.</p>
<p><span style="text-decoration: underline;"></span></p>
<ul>
<li>System</li>
<li>DetailDisclosure</li>
<li>InfoDark</li>
<li>InfoLight</li>
<li>ContactAdd</li>
<li>Custom</li>
</ul>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.2a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.2a.png" alt="4.2a" class="alignnone size-full wp-image-106" width="323" height="509" /></a></p>
<p>Adding buttons in our view is very simple just drag and drop button control from toolbox.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.2b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.2b.png" alt="4.2b" class="alignnone size-full wp-image-107" width="300" height="284" /></a></p>
<p>To change type of the button go to the property and select widget, go to the Type and select any of the button types</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.2c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.2c.png" alt="4.2c" class="alignnone size-full wp-image-108" width="301" height="406" /></a></p>
<p><strong>Manually create button in code:</strong></p><pre class="crayon-plain-tag">var buttonRect = UIButton.FromType(UIButtonType.System);
buttonRect.SetTitle ("Button!", UIControlState.Normal);</pre><p>How to handle Click event of Button:</p><pre class="crayon-plain-tag">1. Button1.TouchUpInside += delegate {     
      new UIAlertView("Button1", "TouchUpInside handled", null, "OK", null).Show(); 
};

2. Button2.TouchUpInside += (sender, ea) =&gt; {     
	new UIAlertView("Button2", "TouchUpInside handled", null, "OK", null).Show(); 
};</pre><p>And that’s it. You have all the things that are needed for a button control.</p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-use-Buttons-in-Xamarin-iOS.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-use-buttons-in-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use ImageView and Labels in Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-to-use-imageview-and-labels-in-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-to-use-imageview-and-labels-in-xamarin-ios/#comments</comments>
		<pubDate>Wed, 11 Mar 2015 15:18:30 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=110</guid>
		<description><![CDATA[It’s very easy to user ImageView and Label directly with storyboard at design time, but how to use this controls at runtime or change its property through coding. In this tutorial we are going to see how to use this controls at coding side. After completion of this demo it’ll look like this: Create a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>It’s very easy to user ImageView and Label directly with storyboard at design time, but how to use this controls at runtime or change its property through coding. In this tutorial we are going to see how to use this controls at coding side.</p>
<p>After completion of this demo it’ll look like this:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.3a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.3a.png" alt="4.3a" class="alignnone size-full wp-image-111" width="322" height="504" /></a></p>
<p>Create a new Solution in Xamarin studio and give it any name and select Single Screen Application.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png" alt="c" class="alignnone size-full wp-image-18" width="300" height="115" /></a></p>
<p>Now just drag and drop a ImageView and Label Control on View hierarchy, now it looks like this:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.3b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/4.3b.png" alt="4.3b" class="alignnone size-full wp-image-112" width="424" height="606" /></a></p>
<p>In ImageView name property write imageView and in Label name property write lbl_name.</p>
<p>Now go to your controller.cs file and in ViewDidload method write:</p><pre class="crayon-plain-tag">imageView.Image =  UIImage.FromBundle ("image1.png");
lbl_name.Text = "Image";</pre><p>That’s it. With this you can write any text to label runtime with coding or select image runtime with imageview control.</p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-use-ImageView-and-Labels-in-Xamarin-iOS.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-use-imageview-and-labels-in-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create a Simple TableView App in Xamarin iOS app.</title>
		<link>http://www.mobilewits.com/blog/how-to-create-a-simple-tableview-app-in-xamarin-ios-app/</link>
		<comments>http://www.mobilewits.com/blog/how-to-create-a-simple-tableview-app-in-xamarin-ios-app/#comments</comments>
		<pubDate>Wed, 11 Mar 2015 15:40:48 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=114</guid>
		<description><![CDATA[Table View is one of the common UI elements in iOS apps. Most apps, in some ways, make use of Table View to display list of data. The best example is the built-in Phone app. Your contacts are displayed in a Table View. Another example is the Mail app. It uses Table View to display [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Table View is one of the common UI elements in iOS apps. Most apps, in some ways, make use of Table View to display list of data. The best example is the built-in Phone app. Your contacts are displayed in a Table View. Another example is the Mail app. It uses Table View to display your mail boxes and emails. Not only designed for showing textual data, Table View allows you to present the data in the form of images. The built-in Video and YouTube app are great examples for the usage.</p>
<p><strong>After we complete our sample app it will look like this:</strong></p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5a.png" alt="5a" class="alignnone size-full wp-image-115" width="321" height="591" /></a></p>
<p><strong>Create Sample Project:</strong></p>
<p>Open Xamarin and select New Solution</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/c.png" alt="c" class="alignnone size-full wp-image-18" width="300" height="115" /></a></p>
<p>Select iOS inside C# and iPhone Unified API, we are going to develop a single view application so select it. Give this project name SampleTableView:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5b.png" alt="5b" class="alignnone size-full wp-image-116" width="934" height="563" /></a></p>
<p>in the newly created project we have some default files and a storyboard that we are going to use further in our sample application</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5c.png" alt="5c" class="alignnone size-full wp-image-117" width="302" height="268" /></a></p>
<p>Now open MainStoryboard.storyboard and drag and drop TableView from ToolBox and give it name=”tableData”:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5d.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5d.png" alt="5d" class="alignnone size-full wp-image-118" width="806" height="771" /></a></p>
<p>For assigning data to the TableView we need a source class that pass data and information like how many rows and which type of cell we are going to use for TableView.</p>
<p>For that we are going to use implementation of UITableViewSource and assign it to the UITableView.<br />
There are only two mandatory methods to make a table display data:</p>
<p><strong>RowsInSection</strong> – return an nint count of the total number of rows of data the table should display</p>
<p><strong>GetCell</strong> – return a UITableCellView populated with data for the corresponding row index passed to the method.</p>
<p>For adding this file into your project go to the solution and select add new file:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5e.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5e.png" alt="5e" class="alignnone size-full wp-image-119" width="603" height="533" /></a></p>
<p>Now select General and Empty Class, give it name TableSource. It will create a blank file that we are going to use as Table Source.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5f.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5f.png" alt="5f" class="alignnone size-full wp-image-122" width="717" height="550" /></a></p>
<p>Find this TableSouce file from solution and open it.</p>
<p>We need to implement UITableViewSource file into our TableSource file, For that:</p>
<p>1) Import UIKit into TableSource file with “using UIKit”<br />
2) Now you can add UITableViewSource to your file and implement its methods : RowsInSection and GetCell<br />
3) Declare a string array named tableData and a string variable named cellIdentifier.</p>
<p>In TableSource method insert a string array parameter:</p><pre class="crayon-plain-tag">public TableSource (string[] items)     
{         
    tableData = items;     
}</pre><p>4) Now in RowInSection:</p><pre class="crayon-plain-tag">public override nint RowsInSection (UITableView tableview, nint section)
{
    return itemData.Length;
}</pre><p>5) In GetCell method:</p><pre class="crayon-plain-tag">public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
{
            UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
            // if there are no cells to reuse, create a new one
            if (cell == null)
                cell = new UITableViewCell (UITableViewCellStyle.Default, cellIdentifier);
            cell.TextLabel.Text = itemData[indexPath.Row];
            return cell;
}</pre><p>Now our file look like this:</p><pre class="crayon-plain-tag">using System;
using UIKit;

namespace SampleTableView
{
    public class TableSource : UITableViewSource
    {
        string[] itemData;
        string cellIdentifier = "TableCell";
        public TableSource (string[] items)
        {
            itemData = items;
        }
        public override nint RowsInSection (UITableView tableview, nint section)
        {
            return itemData.Length;
        }
        public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
            // if there are no cells to reuse, create a new one
            if (cell == null)
                cell = new UITableViewCell (UITableViewCellStyle.Default, cellIdentifier);
            cell.TextLabel.Text = itemData[indexPath.Row];
            return cell;
        }
    }
}</pre><p>To use this subclass, the sample file SampleTableViewViewController.cs creates a string array to construct the source then assigns it to a UITableView instance. The SampleTableViewViewController ViewDidLoad method looks like this:</p>
<p>&nbsp;</p><pre class="crayon-plain-tag">public override void ViewDidLoad ()
{
        base.ViewDidLoad ();
        string[] itemData = new string[] {"Vegetables","Fruits","Flower Buds","Legumes","Bulbs","Tubers"};
        tableData.Source = new TableSource (itemData);
}</pre><p>Now try to build and run the app. If you done all the things right it’ll look like this:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/5a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/5a.png" alt="5a" class="alignnone size-full wp-image-115" width="321" height="591" /></a></p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-Create-a-Simple-TableView-App-in-Xamarin-iOS-app.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-create-a-simple-tableview-app-in-xamarin-ios-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to  create a Custom Cell for UITableView in Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-to-create-a-custom-cell-for-uitableview-in-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-to-create-a-custom-cell-for-uitableview-in-xamarin-ios/#comments</comments>
		<pubDate>Thu, 12 Mar 2015 09:40:49 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=126</guid>
		<description><![CDATA[TableView is wastly used for displaying data with images and buttons and etc. We just seen in our last project how to create a Simple TableView in Xamarin. Our next tutorial is for creating a Custom Cell with which you can add your own type of style to cell, after we are done with our [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>TableView is wastly used for displaying data with images and buttons and etc. We just seen in our last project how to create a Simple TableView in Xamarin.<br />
Our next tutorial is for creating a Custom Cell with which you can add your own type of style to cell, after we are done with our tutorial it will look like:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/6a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/6a.png" alt="6a" class="alignnone size-full wp-image-127" width="320" height="595" /></a></p>
<p><strong>Creating a Custom Cell:</strong></p>
<p>Create a New Solution and Select Unified API for iPhone and select Single View Application and give solution name as “CustomCellTableview.iOS”.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/6b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/6b.png" alt="6b" class="alignnone size-full wp-image-128" width="932" height="566" /></a></p>
<p>Please refer our last tutorial where we created simple table view and add data into it and implement it in this project so we move further.</p>
<p><strong>Creating a Custom Cell:</strong></p>
<p>First go into storyboard and add a imageview and label into table cell. And give<br />
imageview name as “img_profile” and label as “name”.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/6c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/6c.png" alt="6c" class="alignnone size-full wp-image-129" width="457" height="646" /></a></p>
<p>Give identifier of cell as “TableCell”.</p>
<p>For creating a custom cell we have to implement UITableViewCell class and its methods. Add new file from general and name it CustomCell.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/6d.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/6d.png" alt="6d" class="alignnone size-full wp-image-130" width="721" height="547" /></a></p>
<p>Open CustomCell file and import UIKit in the file.<br />
Extend class with UITableViewCell and create a method named UpdateCell that we are going to call when we want to update the cell.</p>
<p>Write below code into file:</p><pre class="crayon-plain-tag">partial class CustomCell : UITableViewCell
{
        public CustomCell (IntPtr handle) : base (handle)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Gray;
        }
        public void UpdateCell (string name, UIImage image)
        {
            img_profile.Image = image;
            lbl_name.Text = name;
        }
}</pre><p>Now we are done with this file, we call UpdateCell method and get name and Image from there and update it.</p>
<p>Go into TableSource file and we just need to update GetCell method, just write below code:</p><pre class="crayon-plain-tag">public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
{
            var cell = tableView.DequeueReusableCell (cellIdentifier) as CustomCell;
            cell.UpdateCell(itemData[indexPath.Row]
                , UIImage.FromFile ("Images/ic_facebook.png") );
            return cell;

}</pre><p>Don’t forget to create a folder named Images and inset file in it.<br />
Now we are ready to Build the app, just run the app if everything is OK you will see result as:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/6a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/6a.png" alt="6a" class="alignnone size-full wp-image-127" width="320" height="595" /></a></p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-create-a-Custom-Cell-for-UITableView-in-Xamarin-iOS.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-create-a-custom-cell-for-uitableview-in-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to handle Row selection and delete a Row in UITableView using Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-to-handle-row-selection-and-delete-a-row-in-uitableview-using-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-to-handle-row-selection-and-delete-a-row-in-uitableview-using-xamarin-ios/#comments</comments>
		<pubDate>Thu, 12 Mar 2015 12:17:27 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=132</guid>
		<description><![CDATA[In our last tutorial we have seen how to create a custom cell in TableView to display our custom contents. In this tutorial we are going to see how to access the row selection and delete the row from TableView. After we complete our tutorial it will look like: Let’s Start: In our last tutorial [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In our last tutorial we have seen how to create a custom cell in TableView to display our custom contents. In this tutorial we are going to see how to access the row selection and delete the row from TableView.</p>
<p>After we complete our tutorial it will look like:</p>
<p style="float: left; width: 250px;"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/7a-164x300.png" alt="7a" width="164" height="300" /></p>
<p><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/7b-163x300.png" alt="7b" width="163" height="300" /></p>
<p><strong>Let’s Start:</strong></p>
<p>In our last tutorial we have seen how to create a simple table view and how to create a custom table cell. Just refer our previous tutorial because we are going to continue from there.</p>
<p><strong>Handle Row Selection:</strong></p>
<p>To handle user row selection we have to override RowSelection method UITableViewSource, using NSIndexPath indexpath to determine which row was selected.</p>
<p>Just add this method in TableSource:</p><pre class="crayon-plain-tag">public override void RowSelected (UITableView tableView, Foundation.NSIndexPath indexPath)
{
            new UIAlertView("Row Selected", itemData[indexPath.Row], null, "OK", null).Show();
        
            tableView.DeselectRow (indexPath, true); // iOS convention is to remove the highlight
}</pre><p>Now try to run the project and you will get your selected row in Alert.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/7a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/7a-164x300.png" alt="7a" class="alignnone size-medium wp-image-133" width="164" height="300" /></a></p>
<p>Delete a row in TableView by Swipe:</p>
<p>To delete a row in TableView you have to override a method in UITableViewSource subclass.It provides swipe to delete gesture that can implemented with single mode override.</p>
<p>There are 3 method override that affect the swipe gesture to show a Delete button in cell:</p>
<p><strong>CommitEditingStyle:</strong></p>
<p>The table source detects if this method is overridden and automatically enables the swipe-to-delete gesture. The method’s implementation should call DeleteRows on the UITableView to cause the cells to disappear, and also remove the underlying data from your model (for example, an array, dictionary or database).</p>
<p><strong>CanEditRow:</strong>  If CommitEditingStyle is overridden, all rows are assumed to be editable. If this method is implemented and returns false (for some specific rows, or for all rows) then the swipe-to-delete gesture will not be available in that cell.</p>
<p><strong>TitleForDeleteConfirmation:</strong> Optionally specifies the text for the Delete button. If this method is not implemented the button text will be &#8220;Delete”.</p>
<p>Before going to start the code we have to understand that we cannot simply delete data from array, so we have to take a List to perform this operation.</p>
<p>So first, create a List of String type and insert data into it in ViewDidLoad method of CustomCellTableview_iOSViewController.</p>
<p>Now your ViewDidLoad should look like this:</p><pre class="crayon-plain-tag">public override void ViewDidLoad ()
{
            base.ViewDidLoad ();
            List&lt;string&gt; itemData= new List&lt;string&gt;();
            itemTable.Add ("Vegetables");
            itemTable.Add ("Fruits");
            itemTable.Add ("Flower Buds");
            itemTable.Add ("Legumes");
            itemTable.Add ("Bulbs");
            itemTable.Add ("Tubers");
            tableData.Source = new TableSource (itemData);
}</pre><p>Then we have to also update our TableSource file because we pass string array in its constructor and now we have a List.</p>
<p>So in TableSource.cs file we have to change the Constructor and in override method RowsInSection we have to change accounting to the List.<br />
Your updated TableSource file will look like this:</p><pre class="crayon-plain-tag">namespace CustomCellTableview.iOS
{
    public class TableSource : UITableViewSource
    {
        //string[] itemData;
        List&lt;string&gt; itemData= new List&lt;string&gt;();
        string cellIdentifier="TableCell";
        public TableSource (List&lt;string&gt; items)
        {
            itemData = items;
        }
        public override nint RowsInSection (UITableView tableview, nint section)
        {
            return itemData.Count;
        }
    }
}</pre><p>Now we are going to user override method of CommitEditingStyle in our TableSource file, here we simply going to remove the data from itemData List and remove TableView row.</p>
<p>The finale code of these 3-override methods will look like:</p><pre class="crayon-plain-tag">public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath)
        {
            switch (editingStyle) {
            case UITableViewCellEditingStyle.Delete:
                // remove the item from the underlying data source
                itemData.RemoveAt(indexPath.Row);
                // delete the row from the table

                tableView.DeleteRows (new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade);
                break;
            case UITableViewCellEditingStyle.None:
                Console.WriteLine ("CommitEditingStyle:None called");
                break;
            }
        }
        public override bool CanEditRow (UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            return true;
        }
        public override string TitleForDeleteConfirmation (UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            return "Delete";
        }</pre><p>We are done with updating and inserting code for the Swipe to delete in our project. Try to build and run the project, if everything is ok as I mention then your app will look like this:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/7b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/7b-163x300.png" alt="7b" class="alignnone size-medium wp-image-134" width="163" height="300" /></a></p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-handle-Row-selection-and-delete-a-Row-in-UITableView-using-Xamarin-iOS.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-handle-row-selection-and-delete-a-row-in-uitableview-using-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set Application icons and launch images in Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-to-set-application-icons-and-launch-images-in-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-to-set-application-icons-and-launch-images-in-xamarin-ios/#comments</comments>
		<pubDate>Thu, 12 Mar 2015 13:16:29 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=143</guid>
		<description><![CDATA[In iOS Application Icons and Launch Images to support Applications. This Application Icons are show in Home Screen, in Spotlight and Setting screen. There are strict instructions about setting icons and images in iPhones and iPads. Applications that targets iOS 7 and early require following icons: With Application icons there are iTunes images and launch [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In iOS Application Icons and Launch Images to support Applications. This Application Icons are show in Home Screen, in Spotlight and Setting screen.</p>
<p>There are strict instructions about setting icons and images in iPhones and iPads.</p>
<p>Applications that targets iOS 7 and early require following icons:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/8a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/8a-300x126.png" alt="8a" class="alignnone size-medium wp-image-144" width="300" height="126" /></a></p>
<p>With Application icons there are iTunes images and launch images should supplied. Dimensions of this images are:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/8b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/8b-300x221.png" alt="8b" class="alignnone size-medium wp-image-145" width="300" height="221" /></a></p>
<p><strong>Application Icons</strong></p>
<p>Every iOS app has application icon that is used to launch the application. This icon is also used in game center.<br />
For example:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/8c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/8c-163x300.png" alt="8c" class="alignnone size-medium wp-image-146" width="163" height="300" /></a></p>
<p>To add Application icons we have to edit in info.plist file in our Xamarin Project.<br />
For this we are going to create a new solution and give it name “SampleApplicationIcon.iOS”.</p>
<p>Now go into info.plist file and find iPhone Icons and in Source select “Don’t use Asset Catalog “</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/8d.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/8d-300x180.png" alt="8d" class="alignnone size-medium wp-image-149" width="300" height="180" /></a></p>
<p>Here you’ll find space for add images according to iOS and resolutions. You can directly drag and drop images on this or you can select it from finder. After you add images to Application images it will look like:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/8e.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/8e-300x180.png" alt="8e" class="alignnone size-medium wp-image-151" width="300" height="180" /></a></p>
<p>Now Run the application and you’ll see the Application icon in the Home Screen.</p>
<p>Setting Launch Screens</p>
<p>Launch screen is the screen that appear when application launch. For Launch screen Xamarin iOS provides Xamarin Launch images, same as Application Icons.</p>
<p>You can drag and drop Images into this space and run the app. You will see launch screen.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/8f.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/8f-300x179.png" alt="8f" class="alignnone size-medium wp-image-152" width="300" height="179" /></a></p>
<p><strong>If you like this tutorial then you can download full copy of the code from <a target="_blank" href="https://github.com/mobilewits/How-to-set-Application-icons-and-launch-images-in-Xamarin-iOS.">github</a>. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-to-set-application-icons-and-launch-images-in-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Navigation with Segue works in Xamarin iOS.</title>
		<link>http://www.mobilewits.com/blog/how-navigation-with-segue-works-in-xamarin-ios/</link>
		<comments>http://www.mobilewits.com/blog/how-navigation-with-segue-works-in-xamarin-ios/#comments</comments>
		<pubDate>Thu, 12 Mar 2015 14:37:00 +0000</pubDate>
		<dc:creator><![CDATA[xamarin]]></dc:creator>
				<category><![CDATA[Xamarin.iOS]]></category>

		<guid isPermaLink="false">http://mobilewits.com/blog/?p=154</guid>
		<description><![CDATA[Storyboard provides facility of transferring from 1 view to another without anytime of code. This is done by Segue. A Segue, or Segue Object, is used in iOS development to represent a transition between scenes. To create a segue, hold down the Ctrl key and click-drag from one scene to another. As we drag our mouse, a blue connector [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Storyboard provides facility of transferring from 1 view to another without anytime of code. This is done by Segue.</p>
<p>A Segue, or Segue Object, is used in iOS development to represent a transition between scenes. To create a segue, hold down the Ctrl key and click-drag from one scene to another. As we drag our mouse, a blue connector appears, indicating where the segue will lead as</p>
<p>demonstrated in the image below:<br />
<a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/9a.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/9a.png" alt="9a" class="alignnone wp-image-155 size-full" width="783" height="541" /></a></p>
<p>On mouse-up, a menu will appear letting us choose the action for our segue. It may look similar to the image below:</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/9b.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/9b.png" alt="9b" class="alignnone size-full wp-image-156" width="166" height="122" /></a></p>
<p>Create a new Solution:<br />
We are going to see how to create a Segue between 2 views and how to transfer data between them.<br />
Create a new solution and give it name “NavigationSegue.iOS” and select single view controller.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/9c.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/9c.png" alt="9c" class="alignnone wp-image-157 size-full" width="931" height="563" /></a></p>
<p>Go to storyboard and delete default view controller. Now add new navigation view controller into storyboard. Also add a normal view controller into storyboard. Now holddown the control key and click from button to second view controller. When we release the mouse it will ask for type of segue, select push.</p>
<p><a href="http://mobilewits.com/blog/wp-content/uploads/2015/03/9d.png"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/9d.png" alt="9d" class="alignnone wp-image-158 size-full" width="1297" height="869" /></a></p>
<p>Now build and run the application, you will see transfer of 1 view to another.</p>
<p style="float: left; width: 250px;"><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/9e-162x300.png" alt="9e" width="162" height="300" /></p>
<p><img src="http://mobilewits.com/blog/wp-content/uploads/2015/03/9f-163x300.png" alt="9f" width="163" height="300" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mobilewits.com/blog/how-navigation-with-segue-works-in-xamarin-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
