iOS

Nothing to do? Well, pop over!

I’m doing some iPad coding and I really like the UIPopoverController widget for displaying various things. It is versatile and you can put almost anything in it. It could be used like a menu or contain a tableview or a palette with shapes or... The possibilities are endless, almost. So when I needed to use a popover in another iPhone application that I wrote I was so disappointed it was a iPad only class. I wanted to implement a right navigationbar button so the user could set the sort order in a tableview and I thought the popover was the right way to do it. I have no explanation for why Apple has chosen to only use it on bigger screens. I can understand that you have to be a little careful with the use of it but to omit it on the iPhone is just not right. So I looked on the net for an open source implementation and found Werner Altewischer’s WEPopoverController. It did the thing nicely but it had some images in the resource group an since I collect reusable classes in a static lib I thought I fix this. After some coding I found myself rewriting the whole thing.
Read More...
Comments

Show me if it works

In my current project I needed to use a SearchBar. The standard UISearchBar in UIKit is working fine but it lacks some user feedback. When a search is performed the user ought to have some kind of feedback. Especially when the search is performed over the internet and the mobile net. So including an UIActivityView in the search bar was a natural extension.

Fortunately someone on ‘StackOverflow’ had asked for this before. The answer on the question pointed out how to get hold of the UITextField inside the UISearchBar, because there isn’t any property for it.

The only problem I had with this was a UX one: Should the UIActivityIndicator sit on the left or the right side in the textfield? On the left there is an icon showing a magnifying glass and on the right is the clear button and if needed the bookmark button. So which of these icons is to be gone hidden during the actual search. Since the left one wasn’t a button I choose that side, but if the Magnifying glass is a search option popup maybe it would maybe be better having it on the other side. Please let me know what you think.

I have put the simple subclass of UISearchBar on GitHub here. It’s named OOSearchBar and has two methods startAnimating: and stopAnimating:, use them in the UISearchBarDelegate methods.
Comments

I'm into controls

While writing a long blog entry that never gets finished I thought I’d share a website where lots of public Cocoa controls are gathered. The site is named CocoaControls and contains most of the more usable controls out there. No need to crawl the web to find them, just go there. It has not been easier to find, download and try them out. New ones are coming in daily!
Comments

Go with the flow

I was just about to convert our Mac CoverFlow classes (my partner Martin Carlberg wrote them in our GIS project) to iPhone, when I realized that there is a nice implementation already written by Devin Ross at DevinsHeaven. It is part of a library called Tapku library that can be found at GitHub. I found it while reading the excellent blog Applausible who also has a little tutorial how to use the Tapku classes.

Another implementation I also found on GitHub was Alex Fajkowskij’s OpenFlow. But based on a simple test and run I will try the Tapku library in my first CoverFlow app.
Comments

Where did I put my framework

After working with AppKit since 1989 (yes, I’m that old, even older than @johaneltes) I am so used to package my ideas in frameworks so when I started to develop for the iOS platform I almost gave up. Why the .... have Apple only granted themselves to use this fantastic concept. Well, it turned out that there are other solutions and I might understand Apple for that paranoid security concern of theirs.

There are other solutions to the problem even though the best parts of the .frameworks are capsulation and the ability to include resources of different kinds.

One approach is to have your classes in groups that are created from folder that you drop into your different projects. But this don’t get you the freedom to write stuff without sharing the code. It is possible to have the code and the resources in the same or in subgroups.

Another way is to write static libraries with the classes you wish to share between projects. How to do this is explained in the iCodeBlog, excellent reading. The drawback with this solution is of cause that the static library can’t contain resources.


Comments

The akwardness of code signing

In this post I will share a link to a site written by Ray Wenderlich - http://www.raywenderlich.com/ . He is a programmer / gamer on the iOS platform. In his latest post he explains something that most iOS developers hates - Codesigning, a subject driving almost everybody insane. If it has disturbed you, please read it. He has even made an object model over the entities Apple has used.
Comments