tijo

Archive for the ‘Code’ Category

FaceType

In Apps, Code, Hobby on September 15, 2011 at 3:31 pm

I’ve started getting into typography lately, and while I am still a novice I decided to start building an App showcasing the beauty of fonts. The App is named FaceType, a play on words of both the FaceTime product and the word Typeface. It’s open source, available here on github.

It’s iPad- and portrait-only right now because that’s sort of the way I envisioned it, though I’ve added some hooks in the code to fix that (switching both off doesn’t completely kill the experience right now).

I’ve also started downloading a whole bunch of fonts, mostly from dafont.com, to put in the App. I may add the program I’m using to do that as well in time.

Check it out! It’s pretty. Don’t know if it’s App Store bound or not.

Advertisements

Double Tap to Zoom

In Code on March 13, 2011 at 9:29 am

Hello,

My recent work in UX design for the iOS has led me to frustration with many apps out there emulating the Photos.app-like feel for photo viewers. This zooming, panning, gallery view controller is often hard to recreate, and I’m not sure why Apple doesn’t simply provide one (c’mon, Apple), but I’ve noticed that one feature gets left out more than the rest in these third-party reproductions: double tap to zoom. With the introduction of UIGestureRecognizer (specifically UITapGestureRecognizer) in iOS 3.2, integration of this feature is very easy, however many apps still fail to include this feature. I’ve included a code snippet of this in hopes that maybe it will be integrated more often, I’d like to walk through it from a high level.

 

1. On loadView (or viewDidLoad), add a UITapGestureRecognizer to the scrollView on which you’re placing your image to zoom and pan around. Set the minimum number of taps to 2 (i.e. double tap), and point it at a method that takes a UIGestureRecognizer as a parameter (i.e. doubleTap:(UIGestureRecognizer *)recognizer).

2. Within the method created check that (1) the gesture recognizer is the one corresponding to the correct scroll view and (2) that the gesture recognizer is in the UIGestureRecognizerStateEnded state, otherwise you’ll get two zooms for every double tap.

3. After this check, examine the zoomScale of your scroll view. If it is not equal to 1, then set the zoom scale to 1. If it is equal to 1, use the locationInView: method on the gesture recognizer and call zoomToRect: on the scroll view from this location.

 

BOOM! Double tap to zoom in your own, home-made image viewer. Code outlining this is attached.

 

Double Tap To Zoom Code Snippet

Pining for the other App Stores out there

In Apps, Code, News on April 6, 2010 at 9:45 am

Hello everybody,

I know it’s been a while since my last update but things are getting pretty busy this year, just wanted to share a few recent updates and new projects I’m working on.

1. Updates to MIPS Reference and GENTLEMEN.

In a recent (1.1) update to MIPS Reference I added quite a few small features, including the ability to have the device perform both binary division and multiplication while showing all the steps in the new Binary Arithmetic tool, as well as an octal conversion feature in the Base Converter tool. These handly little things will hopefully make the App more appealing and boost the negative feedback I’ve been getting about it. I’m a little confused about said negative feedback because it’s a reference, people have been upset that it doesn’t do enough, but there it is in the title, “Reference.” Anyways, I’d like to start adding features that have to do with the MIPS Datapath and Pipelining, as well as that Hex <-> Instruction converter, but those of those will stretch my brain quite a bit and I haven’t got the time right now.

Also, because of GENTLEMEN’s huge sales, despite not being a very feature-rich app, I’ve decided to add another feature. The GENTLEMEN App, in it’s version 1.1 release, will feature a Meme Store just like the Advice Dogr Meme Store, just think of it as a donation to a starving college student.

2. Palm webOS App Catalog App

I really need a name for this guy, but because of my near obsession with the Palm webOS I’ve started on a new App that showcases the Palm App Catalog from an iPhone, iPod Touch, or iPad now I suppose. I was watching a podcast with two of the lead Palm developers, you see, and I realized (bam!) that the whole webOS App Catalog is publicly available via a simple RSS feed. What I’m doing is taking that ~20MB RSS feed file, compressing it down to ~2MB as it’s downloaded, and wrapping it in an iPhone App Store-esque experience. So far it’s going very veeeeery well, this might be my UIKit masterpiece. It really does look like the App Store, and it’s efficient too. I’ve been testing and the memory warnings are few and far between because I’ve been keeping things really clean. It’s interesting because, apart from the RSS downloading happening in the background once daily, there’s no client-server interaction, I just cache it all on the device making it LIGHTNING fast. I might post some of the tools I’m working on for it, but they’re named TJPalmDatabase, TJAppTableCell, TJCatalogViewController, TJCategoriesViewController, and TJCatalogSearchViewController so far, and they each pretty much do what they’re titled. Here’s a screen cap:

I may even add the SMS-to-purchase feature that Palm has, although I don’t know how accessible that API is.

3. Red-Black Tree App

I recently implemented a Red-Black Tree in C for one of my data structures classes, and for an honors project I was asked to write a visualizer for it. Sooo… I added a whole bunch of #ifdef directives for ObjC and in those directives I added visualizer queues for a Cocoa visualizer. You can download this application here, just don’t press the button in the top left-hand corner cuz it will crash (it was for testing loading a file). Here’s what it looks like:

Now what I’m thinking of doing is changing these directives around for the mobile variant of Cocoa and making an iPhone App out of it. I’m also seeing a nice, landscape iPad version of this sometime in the future.

4. URL Shortener Project

Alright, there’s a lot of URL Shorteners out there, most of them embedded in other apps, but I want to try my hand at the game. I’ve got a name for this in mind already. I haven’t started coding for it yet, but I’ve got some ideas in mind that I think are going to optimize the whole URL-shortening experience and (hopefully) crush the competition. I’m going to take TJURLShortener and write a handy and efficient UI on top of it to create an even handier URL Shortener.

Also, still trying to expand to other platforms but it’s gonna take time. Targets in order of interest are webOS, Android, and Windows Phone 7 Series Phone Series 7 Series (now without the “Series”).

MIPS Ref, TJTableNav…

In Apps, Code on February 16, 2010 at 2:16 pm

Alrighty, got some updates on those last updates.

1. MIPS Reference App

It’s comin’ along! Here’s a screenshot of it running in all its main menu glory.

Should be done in a couple more weeks, just gotta make sure all the address converters are square.

2. TJTableNavigationController

The magical .plist/NSDictionary-to-UITableViewController tool from tijo is finally here! Not only is it here, but the MIPS App is almost completely based upon it. All you basically do is create a TJTableNavigationController, point it at a dictionary and give it a delegate, then push it into a UINavigationController and it does all the tough work for you! As soon as you need to regain control, the customActionKey flag in the dictionary alerts the delegate and you can do what you need again. It’s never been simpler to make a navigation/table based App. You can download it here.

New Ventures for tijo

In Apps, Code, News on February 5, 2010 at 8:47 pm

Hello all,

tijo has been laying dormant since the beginning of the semester, life is turbulent and iPhone coding had to take a lower priority. There are some recent, new, and interesting developments in tijo though!

1. Collaboration with Square Two Productions

Some of my old friends started a video production company some years back named Square Two Productions, and they’re getting quite popular. They’ve been doing really stellar work and are always looking to grow, first in video, then in photo, and now in Apps. The folks from Square Two contacted me just yesterday and asked about perhaps forming some sort of alliance between our two organizations to create video/photo enriched apps (or, rather, app enriched video and photo content.) I’m very excited about this partnership, and while there are no projects as of yet, I know there will be some exciting projects spawned from this in the future.

2. New App in Progress

I’ve begun work on a student utility App for Computer Science-type majors. The App is a full set of reference information on the MIPS assembly language. I was sitting in class thinking of how great something like this might be, and so I decided to start on it. Included (at least initially) will be information on the registers, each of the instructions, and overall syntax, as well as a WONDERFUL instruction-to-hex and vice-a-versa converter. Don’t know how long it’ll be, but it’s in the works.

3. New Addition to TJKit

Man, I hate working with UITableViewControllers over and over and over when all I’m really doing is encapsulating one or a set of plists that I’ve created. So much work for something that could be accomplished much more easily. While working on the new App mentioned above, I came up with the idea to create a full UIViewController that has both UITableViewController functionality within a UINavigationController by doing nothing more than instantiating it and pointing it to a plist or NSDictionary. I haven’t begun on this yet, but isn’t it a good idea? The end product would be the ability to create a simple navigation/table based App from little more than a simple XML property list. I’ll let y’all know when it’s done, but so far I think TJTableNavigationController has got a nice ring to it.

So that’s it! New stuff in the world of tijo.

AdviceDogr 1.7

In Apps, Code on December 29, 2009 at 11:16 pm

Hello gang,

It’s funny, but the App Store approval process has STILL not approved Advice Dogr 1.6 complete with its handy Meme Store. I’ve, however, been working hard on advancements (you recall me mentioning 1.6.1 a while back) in the App and have a pretty stable version 1.7 on hand. What I’ve added it the ability to choose the font that you want your meme’s text displayed in. This is show below.

I’ve also made the code I wrote for the Font Picker available here in the form of what I call the TJFontPickerViewController. Simple enough, make your class implement the TJFontPickerViewControllerDelegate methods and then present one as a modal view controller. As with all my handy view controllers, no delegate method is required (they automatically dismiss themselves in the event of success or cancellation) but it would be quite pointless if you didn’t implement any.

Enjoy!

Dusted Off DecodeRing

In Apps, Code on December 23, 2009 at 6:41 pm

Hey everybody, hope you’re all having a wonderful Winter.

I decided to bust out the ol’ DecodeRing App, tijo’s worst seller, and see what I could do to improve it with all this wonderful spare time I’ve been given. First thing’s first, I never told anybody this but the DecodeRing App was originally intended to come in two versions, the “simple” one is the one that’s currently out there for sale, and there was going to be a more complicated one where the user gets to pick an encryption key. Both of these versions were implemented but only one saw the light of day, however given all my new knowledge of StoreKit, I’m adding the ability to use an In-App purchase to buy the functionality of the more secure version in the one that’s already out there. In addition, I’ve added a better (shorter) splash in place of the dumb one I had before. I would really like to get this into landscape, but sadly I lack the skillz currently to get all the views to automatically line up correctly when this happens. Here’s a screen of what the new “tough” version will look like.

Additionally, the encoding that this App uses is an extension of the NSString class that I wrote myself. I’ve provided the code for it right here, feel free to take it and play around, or even write a DecodeRing-esque App of your own.

TJURLShortener

In Code on December 13, 2009 at 11:16 am

I’ve been wanting to post this for a while, but I just added some much-needed polish to it. This class, named TJURLShortener, is the one that I’m using in all tijo Apps to shorten and expand URLs using the j.mp (or any, theoretically) URL shortening service. The object is simple enough, instantiate it with a given login, API Key, and delegate, make that delegate implement the TJURLShortenerDelegate methods (all are optional), and invoke shortenURL: or expandURL:. That’s it, this is present in all tijo Apps that can currently upload to Twitter, as well as the upcoming @tijosudoku view for Sudoku Helper. Check it out, pretty user-friendly.

Additions to Motivational, Memer

In Apps, Code on December 12, 2009 at 8:52 pm

I don’t know if anybody’s looked recently, but the color pickers in Motivational and Memer are a little limited, only providing a handful of colors chosen by yours truly. I’ve really wanted to change this so, last night in a fit of procrastination creativity, I wrote what I call the TJColorPickerViewController and added it to these Apps in lieu of the more major features coming to Advice Dogr and Sudoku Helper.

Here’s a screenshot of what it looks like.

You can see you’re provided a whole (blocky) spectrum of colors including grayscale along the bottom. An nice popup rectangle is shown when you start dragging, indicating which color you’re selecting, similar to the reticle shown when selected text in a UITextField.

And here’s the code for it, the first of many code snippets I plan on posting. Sorry for limited documentation, but all you really need to do it make a view controller implement TJColorPickerViewControllerDelegate and present it as a modal view controller. Some resources (TJSpectrumView) are also provided, pick ’em apart if you feel like it.

I’m uploading updates to Motivational and Memer with this in them very soon.