RSS Feed

Category Archives: I Learned Something Today

Google Maps API

Posted on

Found these great examples of putting multiple maps on the same page using the Google Maps Javascript API V.3. Thanks, Shreerang!


Also, looking for a quick and easy way to find Lat/Long? Check out this little app:


What I’m Thinking About

Posted on

and this super sweet explanation of what it can do for you.

LOL Catulator!

Posted on

Today, we are challenged by Nick Hill to use our mad skilz to make an iPhone calculator.

A view-based application is perfect for this, since we only need one screen.

We’ll use 2 text boxes (inputs), 2 variables, 4 functions, 2 (I used 3) static labels, and 1 dynamic label.

As in (my .h file):

and my .m file:

in my “divide” action, I used the values of the text fields in two ways; as integers and as floats. If I changed the initWithFormat to %f  ÷ %f = %f, I got:

UR ANSR = 4.00000 ÷ 1.00000 = 4.00000

Instead, I chose the %i  ÷ %i = %f format. Woot woot!

You know I had to add some imagery, so in class I used Adobe Illustrator (can I get a woot woot?) to mask out a LOL cat and stuck ‘im on in there:

Device-Specific Stylesheets, or the Magic of Media Queries

Posted on

I think my head just ‘sploded.


Edited to add: seriously, I’ll be able to talk about this more comprehensively in a few days. For now, though @media!


Posted on

Today we’re using the web app template (html | css | manifest for offline caching) to begin our Place Portrait. We’re challenged to design a single page web-app with images, text, video and google maps about a place (near or far) using HTML5 and CSS3.

We took a look at the HTML5 Generator, HTML5 Rocks (by Google) and CSS3 Generator, as well as the CSS3 Tool. Man, the web sure has changed since I first became smitten with its little markup tags.

We made an HTML5 page that would display on a mobile phone as a web app, as opposed to a native app, which runs on the iOS. I chose Legionowo, Poland, as my place (my cousins live there!), and created a web page. In order to get my bearings, I made all of my containers and images 320 pixels wide.

We downloaded video from YouTube using the Easy YouTube Downloader extension of Chrome; the reasons for this were that if we embedded a YouTube video, it would open in YouTube and take you away from the app. I then pasted a smattering of code, made load images and app icons, and lookie here!

One thing that is happening is that once I store it on my home screen, the map and video stop working. Doh!

Update: The Google Maps JavasScript API is very easy to use – it purportedly will work better on mobile devices. It works like a dream on my HTML5 page, I implemented it this morning instead of the <iframe> code that the “embed” function of Google Maps offers me. I haven’t decided if I should download the Xcode program or not… something to ponder today.

Getting Rid of that Pesky Keyboard

Posted on

Being new to iPhone goodness, I wasn’t entirely sure how my app should work. For instance:

I would assume that once I clicked the “Greet Me!” button, the keyboard should disappear. Wrong! Nick challenged us to find the answer on our own. I located this cocoapi entry that gave pretty straightforward instructions for a fair-to-middlin’ iOSer for doing exactly that.  However, since I am a complete n00b, I needed some help.

The function that sends the text field contents to the label field is called, appropriately, “doSomething.”  Initially we wrote it to send the string that was entered via the keyboard to the label field. All I think I did was append this function:

with this:

I attempted some other things but it made my app crash. That was bad.

Now I’m interested in dismissing the keyboard when pressing “return” on the iOS keyboard. Back to my iterative searching and learning experience!