Using three20 in an existing Tab Bar app...

11 views
Skip to first unread message

Biagio

unread,
Jun 3, 2010, 7:34:19 AM6/3/10
to Three20
Hi,

Have three20 installed, hooked up and ready to go...but as I really
started looking at it, I wondered if what I want to do is possible.
Basically, I have an existing tab bar app, and I would like to add
three20 to work out of the fourth tab...to build a photo gallery, etc.
However, I would like to know if this is possible, and how I'd
approach that...from the examples with the URL schemes, I'm confused
as to how to combine the two approaches in the same app.

Thanks for any advice.

Chris Lozac'h

unread,
Jun 3, 2010, 8:46:05 AM6/3/10
to thr...@googlegroups.com
Biagio, you can definitely do what you're planning.

The URL schemes you're concerned about are merely a convenient
shorthand for alloc+init. Youre free to write it out longhand if you
wish:

TTPhotoViewController *controller = [[TTPhotoViewController alloc]
init];
// add to your tab bar
[controller release];

-Chris

> --
> You received this message because you are subscribed to the Google
> Groups "Three20" group.
> To post to this group, send email to thr...@googlegroups.com.
> To unsubscribe from this group, send email to three20+u...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/three20?hl=en
> .
>

Biagio

unread,
Jun 3, 2010, 7:27:33 PM6/3/10
to Three20
Chris,
Thanks so much for your reply. Going to give this a try later
tonight.

Best,
Biagio

On Jun 3, 5:46 am, Chris Lozac'h <cloz...@gmail.com> wrote:
> Biagio, you can definitely do what you're planning.
>
> The URL schemes you're concerned about are merely a convenient  
> shorthand for alloc+init. Youre free to write it out longhand if you  
> wish:
>
> TTPhotoViewController *controller = [[TTPhotoViewController alloc]  
> init];
> // add to your tab bar
> [controller release];
>
> -Chris
>

Biagio

unread,
Jun 8, 2010, 3:33:34 PM6/8/10
to Three20
Thanks,
After some trial and error, I've got this working almost perfectly.
I'm working in a tab-bar app, and one of the tabs launches the photo
gallery. I'm essentially using the ALThumbs3 example from crigor
(found at http://github.com/crigor/three20_examples) to load my
gallery from Flickr. There's two issues I'm having, and I haven't
really been able to solve them.

1. I get two warning messages, and while I've tried googling it, I
haven't really been able to figure it out:
// Parse the JSON data that we retrieved from the server.
NSDictionary *json = [responseBody JSONValue];
[responseBody release];
///////////WARNING: NSString May Not Respond to '-
JSONValue'//////////

and

NSString *url = [@"http://api.flickr.com/services/rest/"
stringByAppendingFormat:@"?%@", [parameters gtm_httpArgumentsString]];
NSLog(@"url: %@", url);
////////WARNING: NSDictionary may not respond to '-
gtm_http_ArgumentsString'///////////

I'm wondering if this is related to my second issue, which is that:

2. Flickr has 61 pictures, but only 45 will display. It says "45 of
61" and when you click "Load More Pics" the activity indicator just
keeps spinning, as does navigating directly to the photo by
"flicking."

Other than that, everything's working great. Thanks for the advice and
putting me on the right path. Any further help much appreciated.

Chris Lozac'h

unread,
Jun 9, 2010, 12:32:13 AM6/9/10
to thr...@googlegroups.com
No idea if this will help, as I haven't worked with JSON, but after reading this, I recommend that you double-check to make sure you've got -ObjC set in your Linker Flags.

Modifying build settings can be confusing, so I'll also include a couple of useful links that Stephan Diederich posted to the list only yesterday:

Biagio

unread,
Jun 9, 2010, 4:48:44 PM6/9/10
to Three20
Chris,

Thanks so much for your reply. I do have the -ObjC set in linker
flags, but it looks like the problem is really coming down weird
results coming in from Flickr. I'm burying myself in it and going to
pop back when I have more specifics.

Thanks,
Biagio

EPM13

unread,
Jun 17, 2010, 12:00:27 AM6/17/10
to Three20
I had this running, just downloaded a newer version of three20 and it
doesn't work anymore, even after linking all the necessary libraries,
which wasn't necessary with my previous installation.

I haven't had time to investigate, but something must have changed.

Have you been successful in getting ALThumbs3 to work?

Emery

EPM13

unread,
Jun 17, 2010, 8:58:46 PM6/17/10
to Three20
Hmm. Never mind. Started up the mac to work on it today and it built
and ran without problems.
Reply all
Reply to author
Forward
0 new messages