Archive for June, 2010

UIScrollView Menu

Here’s a detailed howto on implementing a useful-looking UI widget extension:

Digital Post, my newspaper app for the iPad, uses a number of custom user interface elements to build out the full user experience. One of these custom components is a horizontal topic selector that you can swipe and also tap to select individual topics…

UIScrollViewSlider.png

Not terribly complicated, but a nice implementation, featuring just how easy it is to use UITapGestureRecognizer.

Continue Reading →
0

Tip: UITabBar Tint

So you may have noticed that unlike most controls in UIKit, there’s no way to mess with the tint color of a UITabBar. But let’s say you really really want to make your UITabBar look different: well, from the people who brought you that nifty BarTint tool, here’s how to go about that:

CGSize tabBarSize = [tabBar frame].size;
tabBarFakeView = [[UIView alloc] initWithFrame:
CGRectMake(0,0,tabBarSize.width, tabBarSize.height)];
[tabBar insertSubview:tabBarFakeView atIndex:0];
[tabBarFakeView setBackgroundColor:[UIColor redColor]];

… and apparently the buttons will get drawn acceptably on top of whatever color/image/whatever you stick a view in there for. We’d be just a teensy little bit nervous that the SDK Police might consider this “undocumented API”, having encountered issues of that sort before, but hey, if somebody really really wants their UI to look just so, there you go!

Continue Reading →
0

Instant Translation

Think it’d be neat to embed Google Translate facilities directly into your app? Well, in case you didn’t know, there’s a public AJAX Language API for that, and it’s pretty dead simple to put into your iPhone app:

Google Translate and iPhone apps

Only available while online of course, and chances are that there’s licensing restrictions that you’d better be aware of, but hey, free insta-translation of any sort is pretty nifty!

UPDATE:

Ray Wenderlich now has, of course, a detailed tutorial on the subject:

How To Translate Text With Google Translate and JSON on the iPhone

Continue Reading →
0

Syntax Coloring

Here’s a good start for you if you’re tasked with writing a syntax coloring editor: The “vital pulp” (as they put it) of text editor Smultron, now being further developed as a fork named Fraise, is now packaged up as an Apache-licensed framework named Fragaria. (Where do they get these names from?)

NSTextView-based, so not of immediate application to your iDevice coding, but hey it’s something!

h/t: cocoadev!

Continue Reading →
0

Pull-To-Reload UITableView

So this may be old news to you, but the official iPhone Twitter client (née Tweetie 2) has a super-nifty interface enhancement where to reload your tweets you pull down the top of the list and it gives you a prompt to refresh. Pretty cool, huh?

Well, here’s an explanation with complete source of how to add it to your own projects!

How to make a Pull-To-Reload TableView just like Tweetie 2

Working implementation available for €20 with the My App Sales source, if you’d like that, but like most things, it’s pretty straightforward once someone shows you how.

… and apropos of discussing things Twitterish, should your image there be of large concern to you, you might find amusing/educational this semi-rant: Elements Of Twitter Style. Whilst personally we haven’t actually embraced Twitter past installing Duane’s nifty WordTwit plugin to treat it as an alternative RSS feed essentially, we’ve grudgingly acquiesced that there are some feeds out there with enough interesting content to bother devoting a modicum of attention to. Yeah, we know, doesn’t sound very much like a troll, getting involved in anything social media-ish, does it. Cha, what next, signing up for Facebook? The horror!

UPDATE:

Here’s another simple and free implementation: iPhone Pull to Refresh!

And another: EGOTableViewPullRefresh!

h/t: @rwenderlich!

Continue Reading →
1
Page 3 of 3 123