﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Talwrn Technology Blog</title>
    <description>Dotnetnuke module development, iPhone application development, among other things.</description>
    <link>http://www.talwrntech.co.uk/Blog/tabid/314/BlogId/11/Default.aspx</link>
    <language>en-GB</language>
    <webMaster>steve@talwrntech.co.uk</webMaster>
    <pubDate>Mon, 06 Feb 2012 00:49:43 GMT</pubDate>
    <lastBuildDate>Mon, 06 Feb 2012 00:49:43 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.5.0.35082</generator>
    <item>
      <title>Fishing UK – iPhone app for fishing in the UK</title>
      <description>&lt;p&gt;The latest (01.03.00) release of the Fishing UK iPhone app is out!&lt;/p&gt;
&lt;p&gt;This release has the following updates:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;ENH - Fishery details website link now opens in Safari&lt;/li&gt;
    &lt;li&gt;ENH - Added 5 star rating system&lt;/li&gt;
    &lt;li&gt;ENH - Added iOS 4.0 compatability&lt;/li&gt;
    &lt;li&gt;ENH - Added multi-tasking support&lt;/li&gt;
&lt;/ul&gt;&lt;a href=http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/45/Fishing-UK-ndash-iPhone-app-for-fishing-in-the-UK.aspx&gt;More...&lt;/a&gt;</description>
      <link>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/45/Fishing-UK-ndash-iPhone-app-for-fishing-in-the-UK.aspx</link>
      <comments>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/45/Fishing-UK-ndash-iPhone-app-for-fishing-in-the-UK.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/45/Fishing-UK-ndash-iPhone-app-for-fishing-in-the-UK.aspx</guid>
      <pubDate>Wed, 21 Jul 2010 20:11:07 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.talwrntech.co.uk/DesktopModules/Blog/Trackback.aspx?id=45</trackback:ping>
    </item>
    <item>
      <title>MonoTouch – map driving directions</title>
      <description>&lt;p&gt;The iPhone MKMapView doesn’t include driving directions as far as I’m aware, but the default map app does. So what do you do when you want driving directions in your own app? The answer is pretty simple and works on v3 and v4. All you need to do is construct a Url for google maps and pass it to the map app:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;                UIButton btnDirections = UIButton.FromType(UIButtonType.RoundedRect);
                btnDirections.Frame = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF(160, 320, 150, 40);
                btnDirections.SetTitle(&lt;span class="str"&gt;"Directions..."&lt;/span&gt;, UIControlState.Normal);
                btnDirections.TitleLabel.TextAlignment = UITextAlignment.Center;
                &lt;span class="kwrd"&gt;double&lt;/span&gt; slat = (&lt;span class="kwrd"&gt;double&lt;/span&gt;)appDelegate.myLocation.Coordinate.Latitude;
                &lt;span class="kwrd"&gt;double&lt;/span&gt; slng = (&lt;span class="kwrd"&gt;double&lt;/span&gt;)appDelegate.myLocation.Coordinate.Longitude;
                &lt;span class="kwrd"&gt;string&lt;/span&gt; saddr = slat.ToString() + &lt;span class="str"&gt;","&lt;/span&gt; + slng.ToString();
                &lt;span class="kwrd"&gt;string&lt;/span&gt; daddr = _fishery.FisheryLat.ToString() + &lt;span class="str"&gt;","&lt;/span&gt; + _fishery.FisheryLng.ToString();
                btnDirections.TouchDown += &lt;span class="kwrd"&gt;delegate&lt;/span&gt; {
                    NSUrl url = &lt;span class="kwrd"&gt;new&lt;/span&gt; NSUrl(&lt;span class="str"&gt;"http://maps.google.com/maps?saddr="&lt;/span&gt; + saddr + &lt;span class="str"&gt;"&amp;daddr="&lt;/span&gt; + daddr);
                    UIApplication.SharedApplication.OpenUrl(url);
                };
                &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.AddSubview(btnDirections);    &lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description>
      <link>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/44/MonoTouch-ndash-map-driving-directions.aspx</link>
      <comments>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/44/MonoTouch-ndash-map-driving-directions.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/44/MonoTouch-ndash-map-driving-directions.aspx</guid>
      <pubDate>Thu, 24 Jun 2010 10:18:04 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.talwrntech.co.uk/DesktopModules/Blog/Trackback.aspx?id=44</trackback:ping>
    </item>
    <item>
      <title>MonoTouch – Adding HTTPS web service</title>
      <description>&lt;p&gt;I recently secured one of my web services with HTTPS and when I tried to  add the service to a MonoTouch project nothing happened. The screen  looked like it was adding it but it didn’t finish I just had to cancel  it.&lt;/p&gt;&lt;a href=http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/43/MonoTouch-ndash-Adding-HTTPS-web-service.aspx&gt;More...&lt;/a&gt;</description>
      <link>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/43/MonoTouch-ndash-Adding-HTTPS-web-service.aspx</link>
      <comments>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/43/MonoTouch-ndash-Adding-HTTPS-web-service.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/43/MonoTouch-ndash-Adding-HTTPS-web-service.aspx</guid>
      <pubDate>Fri, 26 Mar 2010 21:36:49 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.talwrntech.co.uk/DesktopModules/Blog/Trackback.aspx?id=43</trackback:ping>
    </item>
    <item>
      <title>MonoTouch – UITableView async web service with progress</title>
      <description>&lt;p&gt;It’s recommended that web service calls are made asynchronously to make the app more responsive. However, the user needs to know that something is happening during the call. The NetworkIndicator can be used for this but I wanted something more obvious.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="600" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" align="center" width="200"&gt;&lt;a href="http://www.talwrntech.co.uk/Portals/6/Blog/Files/11/42/WLW-MonoTouchUITableViewasyncwebservicewithp_1259C-latest1_2.jpg"&gt;&lt;img title="latest1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="latest1" src="/Portals/6/Blog/Files/11/42/WLW-MonoTouchUITableViewasyncwebservicewithp_1259C-latest1_thumb.jpg" width="165" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" align="center" width="200"&gt;&lt;a href="http://www.talwrntech.co.uk/Portals/6/Blog/Files/11/42/WLW-MonoTouchUITableViewasyncwebservicewithp_1259C-latest2_2.jpg"&gt;&lt;img title="latest2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="latest2" src="/Portals/6/Blog/Files/11/42/WLW-MonoTouchUITableViewasyncwebservicewithp_1259C-latest2_thumb.jpg" width="165" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" align="center" width="200"&gt;&lt;a href="http://www.talwrntech.co.uk/Portals/6/Blog/Files/11/42/WLW-MonoTouchUITableViewasyncwebservicewithp_1259C-latest3_2.jpg"&gt;&lt;img title="latest3" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="latest3" src="/Portals/6/Blog/Files/11/42/WLW-MonoTouchUITableViewasyncwebservicewithp_1259C-latest3_thumb.jpg" width="165" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" align="center" width="200"&gt;User taps the ‘Latest’ button&lt;/td&gt;        &lt;td valign="top" align="center" width="200"&gt;Async call is made&lt;/td&gt;        &lt;td valign="top" align="center" width="200"&gt;Latest view is shown&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; LatestViewController : UIViewController
    {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; UIActivityIndicatorView progressIndicator;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; UITableView tableView;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; List&lt;Fishery&gt; Fisheries;
        
        &lt;span class="kwrd"&gt;private&lt;/span&gt; UIActivityIndicatorView ProgressIndicator ()
        {
            UIActivityIndicatorView pind = &lt;span class="kwrd"&gt;new&lt;/span&gt; UIActivityIndicatorView (&lt;span class="kwrd"&gt;new&lt;/span&gt; RectangleF(145f, 165f, 30f, 30f)){
                ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray,
                AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleBottomMargin,
                Tag = 1
            };
            &lt;span class="kwrd"&gt;return&lt;/span&gt; pind;
        }
        
        &lt;span class="rem"&gt;// show the progressIndicator in viewwillappear&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ViewWillAppear (&lt;span class="kwrd"&gt;bool&lt;/span&gt; animated)
        {                    
            progressIndicator = ProgressIndicator();
            progressIndicator.HidesWhenStopped = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
            progressIndicator.StartAnimating();
            &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.AddSubview(progressIndicator);
                
            UIApplication.SharedApplication.NetworkActivityIndicatorVisible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
        }
        
        &lt;span class="rem"&gt;// make the async call in viewdidappear&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ViewDidAppear(&lt;span class="kwrd"&gt;bool&lt;/span&gt; animated)
        {
            var service = &lt;span class="kwrd"&gt;new&lt;/span&gt; FishHere();
            service.GetLatestFisheriesCompleted += HandleServiceGetLatestFisheriesCompleted;
            service.GetLatestFisheriesAsync();
        }

        &lt;span class="rem"&gt;// handle the completed event and hide the progressIndicator&lt;/span&gt;
        &lt;span class="kwrd"&gt;void&lt;/span&gt; HandleServiceGetLatestFisheriesCompleted (&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, GetLatestFisheriesCompletedEventArgs args)
        {
            &lt;span class="rem"&gt;// Since the asych call runs on a separate thread,&lt;/span&gt;
            &lt;span class="rem"&gt;// we can't access UIKit obects from there, so we&lt;/span&gt;
            &lt;span class="rem"&gt;// invoke those  on the main thread&lt;/span&gt;
            InvokeOnMainThread (&lt;span class="kwrd"&gt;delegate&lt;/span&gt; {
                progressIndicator.StopAnimating();
                UIApplication.SharedApplication.NetworkActivityIndicatorVisible = &lt;span class="kwrd"&gt;false&lt;/span&gt;;

                Fisheries = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&lt;Fishery&gt;();

                System.Xml.XmlNode result = (System.Xml.XmlNode)args.Result;
                XDocument feed = XDocument.Parse(result.OuterXml);
                var query = from item &lt;span class="kwrd"&gt;in&lt;/span&gt; feed.Descendants(&lt;span class="str"&gt;"fishery"&lt;/span&gt;) select &lt;span class="kwrd"&gt;new&lt;/span&gt; Fishery
                        {
                                FisheryId = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"itemid"&lt;/span&gt;),
                                FisheryName = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"itemname"&lt;/span&gt;),
                                FisheryDescription = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"itemdesc"&lt;/span&gt;),
                                CountyName = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"countyname"&lt;/span&gt;),
                                CategoryName = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"categoryname"&lt;/span&gt;),
                                FisheryAddress = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"itemaddress"&lt;/span&gt;),
                                FisheryPostcode = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"postcode"&lt;/span&gt;),
                                FisheryEmail = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"itememail"&lt;/span&gt;),
                                FisheryUrl = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"itemurl"&lt;/span&gt;),
                                FisheryLat = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"latitude"&lt;/span&gt;),
                                FisheryLng = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"longitude"&lt;/span&gt;),
                                ParentCategoryID = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) item.Element(&lt;span class="str"&gt;"parentcategoryid"&lt;/span&gt;)
                            };
                
                Fisheries = query.ToList();
                
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (Fisheries.Count &gt; 0)
                {
                    tableView = &lt;span class="kwrd"&gt;new&lt;/span&gt; UITableView()
                    {
                        Delegate = &lt;span class="kwrd"&gt;new&lt;/span&gt; TableViewDelegate(&lt;span class="kwrd"&gt;this&lt;/span&gt;, Fisheries),
                        DataSource = &lt;span class="kwrd"&gt;new&lt;/span&gt; TableViewDataSource(Fisheries),
                        AutoresizingMask = UIViewAutoresizing.FlexibleHeight|UIViewAutoresizing.FlexibleWidth,
                        BackgroundColor = UIColor.GroupTableViewBackgroundColor,
                    };
                        
                    tableView.SizeToFit();
                    tableView.Frame = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF (0, 0, &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.Frame.Width, &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.Frame.Height);
                    &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.AddSubview(tableView);                    
                }
                &lt;span class="kwrd"&gt;else&lt;/span&gt;
                {
                    &lt;span class="rem"&gt;// add the view for the controls&lt;/span&gt;
                    UIView noResultView = &lt;span class="kwrd"&gt;new&lt;/span&gt; UIView();
                    noResultView.BackgroundColor = UIColor.Clear;
                    noResultView.SizeToFit();
                    noResultView.Frame = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF(0, 0, &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.Frame.Width, &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.Frame.Height);
            
                    &lt;span class="rem"&gt;// add the main image&lt;/span&gt;
                    UIImageView noResultsScreen = &lt;span class="kwrd"&gt;new&lt;/span&gt; UIImageView(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF(0, 0, 320, 375));
                    noResultsScreen.Image = UIImage.FromFile(&lt;span class="str"&gt;"images/home_back.png"&lt;/span&gt;);
                    noResultsScreen.Frame = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF(0, 0, 320, 375);
                    noResultView.AddSubview(noResultsScreen);
                
                    &lt;span class="rem"&gt;// Add the no results label&lt;/span&gt;
                    UITextView noResultsView = &lt;span class="kwrd"&gt;new&lt;/span&gt; UITextView(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF(0, 0, 320, 200));
                    noResultsView.Editable = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
                    noResultsView.TextAlignment = UITextAlignment.Center;
                    noResultsView.BackgroundColor = UIColor.Clear;
                    noResultsView.TextColor = UIColor.White;
                    noResultsView.Font = UIFont.FromName(&lt;span class="str"&gt;"Helvetica"&lt;/span&gt;, 18);
                    noResultsView.ScrollEnabled = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
                    noResultsView.Text = &lt;span class="str"&gt;"No Fisheries found"&lt;/span&gt;;
                    noResultView.AddSubview(noResultsView);

                    &lt;span class="kwrd"&gt;this&lt;/span&gt;.View.AddSubview(noResultView);
                }        
            });
        }
        
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ViewDidLoad ()
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.ViewDidLoad ();
            &lt;span class="kwrd"&gt;this&lt;/span&gt;.Title = &lt;span class="str"&gt;"Latest"&lt;/span&gt;;
        }
        
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; TableViewDelegate : UITableViewDelegate
        {
            &lt;span class="kwrd"&gt;private&lt;/span&gt; LatestViewController _lvc;
            &lt;span class="kwrd"&gt;private&lt;/span&gt; List&lt;Fishery&gt; _fisheries;
            
            &lt;span class="kwrd"&gt;public&lt;/span&gt; TableViewDelegate(LatestViewController controller, List&lt;Fishery&gt; fisheries)
            {
                _lvc = controller;
                _fisheries = fisheries;
            }
            
            &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RowSelected (UITableView tableView, NSIndexPath indexPath)
            {
                Fishery f = _fisheries[indexPath.Row];
                LatestViewDetailsController latestDetailsView = &lt;span class="kwrd"&gt;new&lt;/span&gt; LatestViewDetailsController(f);
                latestDetailsView.Title = f.FisheryName;
                _lvc.NavigationController.PushViewController(latestDetailsView, &lt;span class="kwrd"&gt;true&lt;/span&gt;);    
            }
        }
        
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; TableViewDataSource : UITableViewDataSource
        {
            &lt;span class="kwrd"&gt;static&lt;/span&gt; NSString kCellIdentifier = &lt;span class="kwrd"&gt;new&lt;/span&gt; NSString(&lt;span class="str"&gt;"MyIdentifier"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;private&lt;/span&gt; List&lt;Fishery&gt; Fisheries;
            &lt;span class="kwrd"&gt;private&lt;/span&gt; Dictionary&lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;, FisheryCellController&gt; controllers = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
            
            &lt;span class="kwrd"&gt;public&lt;/span&gt; TableViewDataSource (List&lt;Fishery&gt; Fisheries)
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;.Fisheries = Fisheries;
                controllers = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;, FisheryCellController&gt;();
            }
            
            &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; RowsInSection (UITableView tableView, &lt;span class="kwrd"&gt;int&lt;/span&gt; section)
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; Fisheries.Count;
            }
            
            &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
            {
                UITableViewCell cell = tableView.DequeueReusableCell (kCellIdentifier);
                FisheryCellController cellController = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (cell == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    cellController = &lt;span class="kwrd"&gt;new&lt;/span&gt; FisheryCellController();
                    NSBundle.MainBundle.LoadNib(&lt;span class="str"&gt;"FisheryCellController"&lt;/span&gt;, cellController, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
                    cell = cellController.Cell;
                    cell.Tag = Environment.TickCount;
                    controllers.Add(cell.Tag, cellController);
                }
                &lt;span class="kwrd"&gt;else&lt;/span&gt;
                {
                    cellController = controllers[cell.Tag];
                }
                Fishery fishery = Fisheries.ElementAt(indexPath.Row);
                cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
                cellController.Name = fishery.FisheryName;
                cellController.County = fishery.CountyName;
                cellController.CategoryImageView.Image = UIImage.FromFile(&lt;span class="str"&gt;"images/icon_fishery40x40.png"&lt;/span&gt;);
                &lt;span class="kwrd"&gt;return&lt;/span&gt; cell;
            }
        }
    }&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Big thanks to &lt;a href="http://conceptdev.blogspot.com"&gt;Craig’s blog&lt;/a&gt; for lots of things in here.&lt;/p&gt;</description>
      <link>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/42/MonoTouch-ndash-UITableView-async-web-service-with-progress.aspx</link>
      <comments>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/42/MonoTouch-ndash-UITableView-async-web-service-with-progress.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/42/MonoTouch-ndash-UITableView-async-web-service-with-progress.aspx</guid>
      <pubDate>Wed, 17 Mar 2010 20:52:50 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.talwrntech.co.uk/DesktopModules/Blog/Trackback.aspx?id=42</trackback:ping>
    </item>
    <item>
      <title>MonoTouch – UITextView rounded borders</title>
      <description>&lt;p&gt;Very simple way of creating rounded borders on a UITextView in MonoTouch.&lt;/p&gt;  &lt;p&gt;Before the rounded corners are applied the UITextView looks out of place on the UI:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.talwrntech.co.uk/Portals/6/Blog/Files/11/41/WLW-MonoTouchUITextViewroundedborders_1186B-uitextfield_before_200_2.jpg"&gt;&lt;img title="uitextfield_before_200" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="uitextfield_before_200" src="/Portals/6/Blog/Files/11/41/WLW-MonoTouchUITextViewroundedborders_1186B-uitextfield_before_200_thumb.jpg" width="165" border="0" /&gt;&lt;/a&gt;  &lt;/p&gt;  &lt;p&gt;After rounded corners are applied it makes all the difference:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.talwrntech.co.uk/Portals/6/Blog/Files/11/41/WLW-MonoTouchUITextViewroundedborders_1186B-uitextfield_after_200_2.jpg"&gt;&lt;img title="uitextfield_after_200" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="uitextfield_after_200" src="/Portals/6/Blog/Files/11/41/WLW-MonoTouchUITextViewroundedborders_1186B-uitextfield_after_200_thumb.jpg" width="164" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This can easily be applied by using CornerRadius:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;UITextView addTipText = &lt;span class="kwrd"&gt;new&lt;/span&gt; UITextView(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Drawing.RectangleF(30, 70, 260, 80));
addTipText.BackgroundColor = UIColor.White;
addTipText.Hidden = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
addTipText.Layer.CornerRadius = 8;
addTipText.Font = UIFont.FromName(&lt;span class="str"&gt;"Helvetica"&lt;/span&gt;, 14);
addTipText.ScrollEnabled = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
addView.AddSubview(addTipText);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description>
      <link>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/41/MonoTouch-ndash-UITextView-rounded-borders.aspx</link>
      <comments>http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/41/MonoTouch-ndash-UITextView-rounded-borders.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.talwrntech.co.uk/Blog/tabid/314/EntryId/41/MonoTouch-ndash-UITextView-rounded-borders.aspx</guid>
      <pubDate>Mon, 15 Mar 2010 19:55:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.talwrntech.co.uk/DesktopModules/Blog/Trackback.aspx?id=41</trackback:ping>
    </item>
  </channel>
</rss>
