APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Adventures in Xcode and the iPhone SDK II

I've been working on developing an iPad/iPhone app for my Linux and Unix Skills tests. The general idea is that the basic test harness can be used for any sort of test.

I've gotten by my early learning pains through the help of a stack of books and a bigger stack of Google searches combined with plenty of experimentation and more than a few bombed programs. Although I am still a long way from being even decently proficient, I have managed to hack out working code.

I have a bit of cosmetic work to do on the apps, and a lot of work to do updating the questions and explanations shown after an answer. That should take another 2-3 months, mostly because of the test questions/answers.

picture of app in iPhone simulator

And then I have to submit to Apple and hope they approve it. My intent is to either make these free or low priced (99 cents). I don't see any real hurdles there except for cosmetics, which is absolutely my greatest weakness. The Interface Builder app helps a bit by lining things up, but if my Apple reviewer dislikes spartan simplicity, I could be in trouble.

People interested in being beta testers should let me know now, although I'm easily a month away from that point.

As I have finally dipped my toes into the waters of GUI programming, I may as well also do a Mac OS X version and an X11 version. Those could be six months out. A Windows version? I don't know - I suppose that's possible, but it's way down on my priorities.

The screenshot at left shows what the iPhone version looks like right now and a shot of the iPad app is below. The "Prev" and "Next" buttons are unnecessary; you can move forward and back with just finger swipes. However, I find the buttons much easier in the simulator - you can do a swipe in the simulator, but it's easier to just click a button.

I'm having a lot of fun with this. Yes, it has been frustrating at times. Apple's documentation can be a steep climb - everything you need to know is probably in there somewhere, but finding it can be hard. Web searches are often more productive, but they can lead you to outdated information - a method you find may have been appropriate or necessary at some point in time, but advances in the SDK may have changed things completely. I've ripped out code more than once as I have discovered better ways to do what I need, and I'll almost certainly rip out more as I go along.

For example, selecting answers is now done by overlying a mostly transparent button on top of a UIWebView. I could do that without the buttons, but it seems easier this way. On the other hand, the button interferes with UIWebView interaction in those fields. I'm not sure of the best way to handle that.

Here is the iPad version after selecting an answer:

picture of app in iPhone simulator

Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> My first attempts at iPhone and Ipad apps

3 comments



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence







Fri Apr 23 17:12:36 2010: 8465   TonyLawrence

gravatar


Speaking of cosmetics: I can get the iPhone question box to have nice rounded corners by setting body like this:

<body style=\"padding:5px;border-style:solid;-webkit-border-radius: 15px;border-color:lightblue;background-color:#e6f4ff\"><div style=\"font-size:smaller;\">"

On the iPad, I get a square shadow around the UIWebView. It's possible that the same thing is there on the iPhone, but if it is, it's too narrow to notice.

Pretty is not my thing :-)



Fri Apr 23 17:14:50 2010: 8466   TonyLawrence

gravatar


Naw, it's there on the iPhone too - I just didn't notice it at first.



Sat Apr 24 10:15:05 2010: 8472   TonyLawrence

gravatar


Removing "background-color" fixes it. I guess I could replace that by making an image of appropriate size and sticking it behind the webview. Or I can just leave it as it is.

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us