Quick Tips

UITableView and UIViewcontroller as a subview

This drove me nuts for a few hours, but finally figured it out. I wanted to go ahead and share, since the web results I found when I was searching were only a few pieces here and there, and still didn't offer a final solution. So the scenario I encountered was that I have a UIViewController that will sometimes host a subview (that is another viewcontroller) and it has a UITableView in it. The idea is that sometimes the user will tap a button, and it will add a subview of that UIViewController. Originally ......

_OBJ_CLASS_$ Error (Symbol(s) missing) with Full and Free iOS apps

I am currently working on making a free version of my iOS application. I followed a fantastic tutorial a while back (?http://www.bit-101.com/bl... ) which got me up and running with a free and regular version, sharing the same code base. This is great, because changes made will be mirrored across both versions, so you don't have the nightmare of maintaining two sets of code. I shelved the free version for a while and then decided to come back to it, and hopefully get it out in time for 4.2's ......

UIViewController not being unloaded in ViewDidUnload

The past few months I've been working in objective-C since I've been doing some contract iPhone development work. I actually really like the platform. iOS is pretty fun to code for. However, it can also be incredibly frustrating--especially coming from using Visual Studio and C#. One of the things that stopped me for a while was that I noticed that my views were not being properly unloaded in a UINavigationController setup. Whenever I popped the view, I noticed that the retain count on it stayed ......

QuickTip: Getting ItemIndex from ListView_Command event

Just a quick tip today, for something that I use often, and maybe others are wondering what’s the fastest way to figure out what item is actually calling the command. So for our ListView_Command method, we have a “ListViewCommandEventArgs” parameter, which exposes the following properties; So we can get to the Item, but that doesn’t really help us figure out what Item is actually calling the command. Easy enough. I’ll need to use e.Item to get to the index. First I’ll make it into a ListViewDataItem, ......

Quick Tip: Check DataKeyNames in ListView If Events are Failing

Just a quick tip this morning. I have a TimeSheet program I wrote that I recently overhauled with new controls and databinding, etc. I have a ListView in it that displays all my time records in a paged format, and also allows me to delete entries. However, whenever I clicked “delete”, the page would just postback to itself and nothing would change. There were no exceptions or anything, so it was a bit of a head scratcher. I had this problem once before a long time back, and it turned out that my ......

Quick Tip: Cast DataItem in ListView to Business Object

So this is one of those things that has slipped past me for all these months and now that I’ve discovered it, I can’t believe I went without it. I recently found out that I can access a business object in the ItemDataBound event of a ListView which makes it way easier to do some last minute control changing (such as binding labels or hyperlinks, etc.) In my example, I have a LINQ to SQL class called Question. My ListView hooks up to a datasource of IEnumerable<Question> and displays its properties—nothing ......