Make sure your Spotify application is up and running for this to work properly.
iOS: a draggable UIButton
I started implementing my own scrolling UI for a control and I never attempted something like a draggable custom bit of UI in iOS before. If you’re interested, read along. My implementation is a first pass and it’s pretty simple. When you’ve come from an AS3 world it might not feel so simple until you see the solution however.
I created a custom UIButton in my .xib file and hooked it up in code. I gave it an instance name of dragButton.
In my code (.m) I created a selector for the button:
[dragButton addTarget:self action:@selector(draggedOut:withEvent:)
forControlEvents:UIControlEventTouchDragOutside |
UIControlEventTouchDragInside];
The delegate method:
- (void) draggedOut: (UIControl *) c withEvent: (UIEvent *) ev {
CGPoint point = [[[ev allTouches] anyObject] locationInView:self.view];
if(point.y > 120 && point.y <366)
c.center = CGPointMake(237, point.y - c.bounds.size.height/2 -5);
}
I needed to constrain my UIButton to an x position so it only moved vertically. There are more elegant approaches to the constraint, but for now this is working pretty well. I can drag it up and down in it’s view and it won’t go beyond my designated positions.
Simple yet effective.
Popularity: 3%
That vertical scrubber for UITableViews
I seem to almost always forget what the magic sauce is for producing that indexed scrubber on the right side for a grouped table in iOS. Google is pretty good for most things iOS, but for this particular thing it comes up short unless you remember exactly what it is you are looking for. Defeating the purpose of the search in my estimation.
Anyway, I am posting this here mainly as a reference to myself, but also to others who may need to use this functionality but didn’t know exactly how it’s done, etc. I am only posting the magic method.
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
//This of course can be whatever array you need to pass back
//even for different table views, etc.
NSArray *arrIndexes = [NSArray arrayWithArray:
[@"A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,#"
componentsSeparatedByString:@","]];
return arrIndexes;
}
Popularity: 2%
UX: Google’s Chrome versus Apple’s Safari
I enjoy almost all aspects of Apple’s Safari browser. It’s true. While it might not be the most popular browser by any stretch of imagination, it serves my needs very well. I use Google’s Chrome daily however. Why?
Chrome has a nifty little feature that I use constantly that Safari doesn’t have… search. Chrome doesn’t have a search input field. The address field serves double-duty as search entry for results in Google. Safari has it’s own dedicated search field, most likely to give users a choice of which engine they would like to have the search query sent to.
While that’s nice as far as options go, the unified address entry and search entry in Chrome saves me a lot of time. Whether it be looking up some class references through Google, performing an image search, etc. Chrome much quicker.
If Apple added this (if they could for legal reasons), it would be most welcome. Whenever I do fire Safari up I find myself mistakenly using it like Chrome, and I get to the built-in page telling me that the page couldn’t be found, and populating a search box with my query… forcing another page load with the fetch.
Happy Friday everyone.
Popularity: 1%
iOS: scheduled NSTimer versus performSelector with delay
There are a few times when a little one-off delay in providing UI interaction or animation provides some polish to your UX in an iOS application. There are two ways that one can go about doing this:
[NSTimer scheduledTimerWithTimeInterval:1.0
target:self
selector:@selector(turnOffSpinner:)
userInfo:nil
repeats:NO];
// or
[self performSelector:@selector(turnOffSpinner:) withObject:nil afterDelay:1.0];
They work in the same way, and since there is no repeat (no nth time to consider, etc.) I don’t know if there is really a difference here besidesĀ preferenceĀ or code appearance. I can’t invalidate the performSelector of course.
I am curious if anyone has an opinion on this type of use case or not.
Personally I like the performSelector path for this type of thing – it’s cleaner in appearance and communicates the idea a bit better. To me at least.
Popularity: 14%
ESPN: a simple audio UX
ESPN has a great little bit of user experience that they embed around their site that simply plays bits of recorded audio. Think of them as tiny podcasts if you’d like. I think the UI for this bit of functionality is rock-solid simple and usable. At least on a very fast internet connection (the thing buffers content for playback which can take a little time to happen before playback actually starts).
So what am I talking about? Here is the control lifted directly from ESPN (Mike & Mike in the Morning). “Pittsburgh Steelers safety Troy Polamalu addresses his comments about commissioner Roger Goodell and talks about dealing with injuries on the team. Plus, former NFL player Brian Bosworth joins the show to discuss hair.” I have no idea how long this MP3 file will exist on ESPN’s server, so if you come here at a later date, functionality might be missing (I don’t plan on cluttering my server with their media). I didn’t ask for permission to shlock the mp3 file, just sayin’.
Popularity: 1%
DragKit for iOS (open source)
MIT OS license.
If you’d like to add drag and drop to your application, there’s an open source framework for that. Not only will it work within your own application, but it will also work between DragKit enabled applications.
It was developed for iOSDevCamp 2010 and won the award for best open source project. Created by Zac White with help from Barry Burton and Andy Mai.
Check out the branches that have been made at the github destination.
Popularity: 2%
ShareKit for iOS (open source)
If you’re an iOS developer and would like to add full sharing to your application, an open source project exists to allow pretty easy and configurable ways of doing just that. You can find the source located at github and it’s been established by “ideashower” (Nate Weiner) from San Francisco. The information home about the repository can be found at http://www.getsharekit.com/.
What services are currently supported?
- Delicious
- Google Reader
- Instapaper
- Pinboard
- Read It Later
- Tumblr
You are able to share URLs, images, text, and even files. Offline sharing is handled as well, keeping pending items in queue awaiting the next connected session. The UI is customizable to a point, however this is open source so you can change it’s implementation to suit your needs. To get things rolling only requires a few lines of code.
There is a pretty active Issue Tracker and the documentation is pretty good. There is a blog for the project and a list of common issues. It’s been noted that if you build and get 12 compiler errors, the problem can stem from the location of your Xcode installation.
ShareKit/Core/SHK.m:35:28: error: objc/objc-class.h: No such file or directory
If you see this error, you may need to change the import statement located in SHK.m from
#import <objc/objc-class.h>
to
#import <objc/runtime.h>
So there you have it – if you’ve wanted to add this functionality to your application but put it off because of the work you’d be required to put in to make it happen, this could save you a lot of time and add a whole new social spin to your application(s).
Popularity: 2%
In case you didn’t know about XServe
Apple discontinues the Xserve http://is.gd/gKPpr
Some were surprised, some were not surprised, and the rest never knew what an XServe was previously.
Popularity: 1%
What Apple’s Ping Might Need

It shows promise, but currently it’s awful. After using Apple’s Ping for a while now (mostly while grinding my teeth and wanting to really like it) I think that if Apple were to change course slightly and put some more development efforts behind it, it could really be something fun and useful.
Currently being accessible from within iTunes only is a severe hinderance. Most people do live in iTunes while at work, etc. when listening to their music and that which is available on a network. I have access to a world of music at work because of all of the Shared Libraries available to me. iTunes is the application open most on my desktop (except for perhaps Xcode or FlashBuilder). However I don’t want to use Ping within iTunes, I am only doing that out of necessity. It’s confining. It’s stuffy. It’s humid.
Ping really “feels” like an afterthought which has been shoehorned into the iTunes application.
“What’s the fastest way to get this service out there?”
“We could add an item in the Store grouping in iTunes and just slap the content in the pane.”
“But it looks terrible. I suppose it has to do with the Store because you can only like media that comes from there, so that kind of works. My kids are playing soccer in twenty minutes, I have to scoot. Go ahead and do that then. We’ll throw it up and see if it sticks.”
I think that I would rather have it a separate application with hooks to my own iTunes via a scripting bridge. It needs a new, usable interface. If I am in Ping and want to change the music I am listening to, why do I need to leave Ping to do so? Granted, once Ping loads it’s a quick switch between information panes, but I think Ping should enhance our experience, not be laid on top of it forcing a modal feel to it.
There is a lot of wasted white space in Ping, it doesn’t feel coherent or solid. If you want to look at laid-out content in an interface (data), it looks like swiss cheese that’s been attacked with buckshot. Over the course of a week. Unless I fullscreen iTunes on my seriously bad-boy monitors, it’s not very usable. It needs a redesign at least.
Allow others to build on the foundation. Ping would be pretty cool if it had public APIs that designers and developers could leverage in their own applications. I think this move would be most welcome and would bring a new level of use and interaction to the service. Just doing this might solve a lot of the problems people have with Ping. If Ping could integrate with other true social networks (Facebook, Twitter, etc.) would go a long, long way in driving huge adoption. Oh, and are these “bands” validated via Apple to be the real bands?
What are my friends listening to right now? I’d love to know. Those not on the same network as me. It’s a little intrusive so an opt-in would be good. Maybe I like what they are listening to and I can like it or comment on it.
Summation. I believe that public APIs could really help Ping. Apple likes to keep certain things close to the vest however and maintains their brand in a very strong manner. Releasing public APIs might result in terrible and buggy applications… some even written in… Flash.
If Apple released iOS classes to support Ping applications, that might be easier for Apple to consider. And they could control the applications coming through the App Store. You know… I’m sure someone in some room in Cupertino has asked about this very thing. Whether or not it happens is another thing altogether. I’d like to like Ping, but at this point I just can’t. I am a fanboy, but currently not a fan of Ping.
Popularity: 1%
Application development for the future…
I am not taking any sides on the state of application development technologies out there. I wanted to get that out of the way straight off. What I do see is a broadening of the landscape for designs and developers to consider.
Not long ago we had traditional desktop applications and the possible technologies that support those developments (Java, C#, C++, Objective-C, etcetera). Along came mobile devices and we have web applications (HTML, HTML 5, iOS, Android (Java), AIR, Silverlight, etcetera). Adobe is on the friendly bandwagon of HTML 5 support with some Labs tools and has an iOS compiler from it’s Flash tool (because iOS does not support Flash). … Continue Reading
Popularity: 3%


