Archive for 'iPad'

Font Notes

So in case you haven’t noticed, with 5.0 we’re up to 58, count ‘em, 58 built in font families on both iPhone and iPad. That site we mentioned last year is still up and running with pictures of all of them:

iOS Fonts – ‘A Place for Happy Typography’

Another handy reference detailing the 4.3 -> 5.0 changes can be found here:

New Fonts in iOS 5.0 – and Some Missing

If you’re looking to stand out a bit from the crowd, you might want to check out these people (h/t iOS Dev Weekly):

Mobile FontFonts. Build your app with better type.

… mobile fonts protect your brand and help set your app apart from the crowd. Optimized by hand for the iOS device screen, Mobile FontFonts enhance the user experience…

Not too sure what makes the iOS device screen overly different from any other, but hey whatever they’re doing there probably can’t hurt.

And for those of us who can’t really be bothered with paying for quality, might be worth a reminder that the sources of free fonts we mentioned way back when embedding custom fonts was, like, hard, are still all pretty much up and running; the big novelty since then is the Google Font API was released for those web folk, and to go with it a directory of open source fonts which has been chugging along nicely. As we’re sure you’ve heard, but just in case you have been under a rock the last year and a half, here’s some relevant links:

The Google Web Fonts Directory

The 10 best fonts from the Google Webfonts Directory

Download Google’s Web Fonts

Another newish site worth checking out:

Font Squirrel: “Only the best commercial-use free fonts”.

Any other particular font sources, free or paid (if they’re really awesome) that you fancy, Dear Readers?

Continue Reading →
0

Settings URLs

So you ever wanted to be able to send the user to a particular Settings page? Yeah, us too … pretty frequently actually.

Well, now you can in iOS 5 with the prefs: URL scheme with [UIApplication sharedApplication] openURL:

Turn on Location Services?

[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];

Set up Twitter?

[NSURL URLWithString:@"prefs:root=TWITTER"]];

Hook up a Bluetooth device?

[NSURL URLWithString:@"prefs:root=General&path=Bluetooth"]];

Handy, indeed. And why yes, yes they do work just fine in Mobile Safari as well; load this page up on your device and tap any of the sample links above to see for yourself!

Continue Reading →
10

Masking CALayers

Here’s today’s entry for the ‘Most Complicated Way To Do Something Easy’ sweepstakes:

Q: “I am trying to fade out he top/ bottom cells in a tableview. How do I achieve this effect?”

A: Adding Fading Gradients to UITableView

… have the part for the table view “cut out” in the image, i.e. have the center portion be Alpha 0 and the top and bottom would be an alpha gradient from 100% to 0%.

A designer versed with Photoshop could easily create something like this for you. Then you put this imageView on top of your table view, size the table view to fit inside the border. Finally you will want to make sure that userInteraction is disabled on the imageView, because otherwise no touches would be reaching the table view…

Yep, we’ve done exactly that several times, and used the same technique for custom-looking UIPickerView constructions and the like. That wouldn’t be worth bothering to mention, would it now? No, no it would not. But a lesson in how to spend a few hundred lines of code accomplishing the same task as taking ten seconds to drop on a PNG, well that’s worth a post just in case you ever have a hard problem that knowledge of CALayer masking would be actually needed to solve, yes?

While this solution is simple it does not satisfy me personally. As developer I want to achieve such an effect entirely in code because then it has the added advantage of being independent or resolution or interface orientation.

The first thing we’ll try is to mask the layer of the table view. On iOS each UIView has a CALayer that takes care of the actual drawing. And each CALayer has a mask property where you can set another layer to mask out parts of the host layer…

… If we stopped here then you would get the gradients, but they would move together with the contents of the table view. Luckily table views are UIScrollView child classes and thus you can also implement the UIScrollViewDelegate methods. We are using the one that fires on each movement to adjust the position of the masking layer…

… There’s another problem that only becomes apparent if you start scrolling and the vertical scroll bar shows: it is also affected by the mask which you probably don’t want because it looks weird. So instead of actually use the mask for the regular layer masking we add it as a sublayer…

Whilst our personal standards of satisfaction tend to place a vastly higher value on expediency and efficiency of client contentment … hey, there’s nothing more expedient and efficient than picking up tips from those of a more recherché inclination!

Continue Reading →
1

QuickLookMobileProvision

Now this is just all kinds of awesome. If you work on multiple iOS projects, you need this:

QuickLook plugin for Mobile Provision files

Let me introduce a new QuickLook plugin. This plugin allows you to get a QuickLook preview for all .mobileprovision files.

It gives you the name of the profile, its creation and expiration date, its App ID, and a sorted list of all the UDIDs included…

BEFORE:

“What the fluff is ‘E0F7F8BB-FB85-40BF-BFF4-830D526994E1.mobileprovision’”?

AFTER:

Screen shot 2011-10-17 at 11.50.59 PM.png

Yep, that’s some serious awesomeness indeed. Grab it right here!

h/t: @akosmasoftware!

Continue Reading →
1

TPMultiLayoutViewController

Here’s an interesting approach to managing the rotatable layout issue:

Seamlessly manage portrait and landscape view controller layouts

… When the orientation changes, I set self.view to the appropriate view. I initialise both views on load, and keep both of them synced to properly reflect the app’s state — basically, I’m double-handling everything, which bloats my code and increases the chance I’ll make a mistake.

So, here’s an easier way: Rather than maintaining two separate view hierarchies and switching between them when the orientation changes, why not just change the layout of one single view hierarchy? The only changes between the portrait and landscape views are layout changes, so if we can extract just the layout information from each view, then we don’t have to worry about maintaining both view hierarchies.

Basically, we’re talking about using each view version as a layout template only.

That’s what TPMultiLayoutViewController class does. It’s a drop-in UIViewController subclass that automatically manages switching between different view layouts for portrait and landscape orientations, without the need to maintain view state across two different view hierarchies…

Not sure if this isn’t more trouble than it’s worth, generally our layouts rotate fairly straightforwardly; but hey, if you’ve got something complex, this could be worth a look.

Continue Reading →
0

Devotionals

So it’s been a little while, hasn’t it? Amazing how life does run away with you. And we’re off again in another couple weeks too. No rest for the iOS programmer, indeed.

To gingerly ease ourselves back into the posting routine, let’s look at a couple of the recent fabrications stamped out of the troll foundries here, shall we? Haven’t done that for a while. And these are indeed somewhat of a divergence from the accustomed trollish oeuvre; they’re actually morally uplifting!

We speak here of a collection of devotionals programmed by your humble troll for publisher Thomas Nelson via the producers Jake Press who as you can see from their projects page we’ve done a good bit of stuff for before. Two are out now and more in the planning.

#1. Jesus Calling by Sarah Young:

ipad_iphone_jc.png
There’s a seven day displaying free sample version for you to check out here:

JesusCalling

#2. Live Loved by Max Lucado:

iphone_ipad_ll.png
And a free sampler for that one as well:

LiveLoved

Yes, indeed, it’s somewhat of a refreshing change to have a hand in developing something that our dear mother approves of. Indeed, it’s very religiously correct, this iOS of ours; in case you missed it, the Pope tweets from his iPad these days. So clearly we are on the cutting edge of modern spirituality here!

Continue Reading →
0

Autograph Library

So you got an application you need to capture actual signatures for? Release form, shipping delivery, that kind of thing? Well, here’s a licensable library to make that easy:

Ten One Design Autograph iOS Library

  • Simple integration with any UIView, or just call the built-in modal view.
  • Customizable stroke color and width, and signature size.
  • Advanced stroke smoothing for accurate signatures.
  • Velocity sensitive stroke width for biometric verification.
  • Customizable message. Show your customers what they’re signing for.
  • Three-finger swipe to undo/redo strokes.
  • Optional inclusion of date.
  • Optional unique security hash watermark for each signature (for tracking purposes).
  • Freely available demo version allows you to try it out before committing.

Handy if you need it, as we say. Check out the free Autograph app that makes your device into a signature capture pad to check it out, along with Mac and Windows helper apps to do something with those captured signatures.

Now, you thinking to yourself “Dude, I don’t sign my name with my finger”? Why no, no you don’t, and these Ten One people make a capacitive stylus “Pogo Sketch” for any device or the “Pogo Stylus” specifically for iPhone/iTouch to help you out with that. Or any other kind of drawing/writing etc.:

Drawing Applications: The Pogo Sketch is an interesting alternative to expensive graphics tablets, and a lot more portable. On a mobile device, the Pogo Stylus makes sketching a lot easier.

Taking Notes: TThere are some incredible note taking applications for the iPad and iPhone. They’re all great companions to the Pogo Sketch.

See our recommended iPhone/iPad applications here

Okay, we definitely have to check some of these note takers out. This stylus just might make the iPad actually better for our preferred scrawling style of note taking than paper, it looks like.

And to finish off on another note completely while we’re looking around their site … want an analog joystick for your iPad? Well look, they’ve got just the thing!

h/t: MacNN!

Continue Reading →
2

Custom Control Design

There is a most excellent article here on the design of a pretty neat control view:

… I personally find articles and talks about the evolution of a concept particularly interesting, so I thought I would write up a similar experience I had building an advanced custom control for the study app Mental Case…

MentalCaseForiPad.png  

Fascinating design process and good Core Animation tips too, why what more could you ask for?

h/t: Ole Begermann’s Best Links collection!

Continue Reading →
0

TDSemiModal

So you know that thing where you can’t present transparent screens with -presentModalViewController, it always blanks out the view being presented over? Kinda annoying when what you really want is something like this, right?

aiequ.png

But it’s not overly difficult to fake it by animating views around, so that’s what we’ve done in the past. But today we had a situation where a full screen view navigated to on the phone was to be a modal view rolled up from the bottom on the iPad, and we really didn’t want to go to the effort of duplicating all the controller logic, so we looked around a bit to see if anyone clever had found a good way to handle the situtation — and as you can no doubt guess from the above shot, we found it:

iOS: Semi-modal date picker for iPhone

Title notwithstanding, it’s not just for date pickers, although the one above is provided; it’s a nice little piece open sourced on github to present any view controller and its bits with translucency where desired, which the author calls “semi-modal”; and pretty much all you have to do is

1) Instead of -presentModalViewController, call

-(void)presentSemiModalViewController:(TDSemiModalViewController*)vc;

2) Instead of -dismissModalViewControllerAnimated, call
-(void)dismissSemiModalViewController:(TDSemiModalViewController*)vc;
And that’s just about it! Well, there’s some hardcoded phone screen sizes in there, but it’s just a couple lines to make it iPad-friendly. Sure beats stacking all your rollup views and their logic in the parent … especially when you’ve got them already written as separate controllers, yep.

h/t: Stack Overflow!

Continue Reading →
0

50pm – Sports Issue

Ah, we see there’s another troll production out in the wild these days, the followon to the 50pm magazine project from a little while back, and named followoningly enough 50pm – Sports Issue:

mzl.ndgubsmk.480x480-75.jpg

From our point of view it’s interesting enough to mention because the standard nav bar style interface from issue 1 is replaced with stylish and elegant overlay buttons; full annotation functionality was added; as well as lots of little giblets like Facebook sharing, annotation essays, backgrounder links, and so forth. From your point of view it’s interesting because the pictures are awesome.

WHAT DOES SYNCHRONIZED SWIMMING LOOK LIKE FROM THE BOTTOM OF THE POOL?

WHAT IS IT WITH SPORTS AND MAO ZEDONG?

WHY ARE URBAN ATHLETES JUMPING FROM ONE BUILDING TO THE NEXT?

WHAT DOES THE BODY BUILDING SCENE IN THE MIDDLE EAST LOOK LIKE?

If you like photography, sports, stories or all of these, then 50pm’s Sports Issue is the magazine for you.

The magazine has more than eleven(!) photo stories on sports topics, bonus materials and the work of three recent World Press Photo winners included. Clearly some of the best sports photography in the world!

Neat, huh? If any of those categories describe you … you know what to do!

>50pm - Sports Issue

Continue Reading →
0
Page 1 of 3 123