smallseo.info

three20

Three20 is an Objective-C library for iPhone developers

Are there libraries similar to the Three20 Project for Android?

The Three20 project is really nice for building iPhone apps quickly using common libraries:

https://github.com/facebook/three20

Is there anything like this for Android?


Source: (StackOverflow)

How to remove Three20 from the project

Adding Three20 in your project has been made simple by the ttmodule.py script file. I was initially planning on using it in my project but i'm not, so i want to clean my project by getting rid of it. How can i remove it from my project?


Source: (StackOverflow)

TTViewController and popupViewController method

I'm using a TTLauncherView and for that I declare a view controller as TTViewController, as is in TTCatalog tutorial app. Declare a TTLauncherView var inside that view, add items, and so on.

In my app's main view is a button calling the previous view with the following code:

-(void) switchToButtonOrderingView
{
    ButtonOrderingViewController *ButtonOrderingView=
    [[ButtonOrderingViewController alloc] initWithNibName:@"ButtonOrderingViewController" bundle:nil]; 
    self.ButtonOrderingViewController = ButtonOrderingView; 
    [self.view insertSubview:ButtonOrderingView.view atIndex:10];
}

When I press the button the app brakes up at this method which belongs to TTViewController.m:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  UIViewController* popup = [self popupViewController]; //brakes up here
  if (popup) {
    return [popup shouldAutorotateToInterfaceOrientation:interfaceOrientation];
  } else {
    return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
  }
}

and the error goes like that:

[ButtonOrderingViewController popupViewController]: unrecognized selector sent to instance

Checked to see Three20 Class Hierarchy and TTViewController is a UIViewController subclass.

popupViewController is a TTPopViewController (and its subclasses) method! Which I'm not using nor do TTCatalog tutorial app. I'm lost. Any help will be appreciated.

Thanks.


Source: (StackOverflow)

Extend TTPhotoViewController with custom TTPhotoView

I have successfully integrated the three20 framework in my project, and I have extended the TTPhotoViewController to add some further functionality.

Now I need to add some subviews to the TTPhotoView loaded by the TTPhotoViewController. In particular I would like to add that subviews after every TTPhotoView as been loaded. These subviews represents sensible area over the image so they should scale proportionally with the image. The user can tap a subview to get extra info about the image.

I don't know how to implement this behavior. Should I extend the TTPhotoView and make sure that the TTPhotoViewController use this extended version instead of its TTPhotoView?

Could someone point me to the right direction? Thank you


Source: (StackOverflow)

toSharedViewController not re-using existing controller

My URL map is as follows:

[map from:@"tt://webPage/(initWithPage:)" toSharedViewController:[WebPageController class]];

and in the WebPageController

- (id) initWithPage:(WebPage)page
{
    if (self = [super init])
    {
    ...

Then I called the url several times in my code

tt://webPage/1
tt://webPage/2
tt://webPage/1 (still called the initWithPage: everytime, not cached)

Why it is not cached as it is a SharedViewController?


Source: (StackOverflow)

Three20 competitors/alternatives

I see three20 a very powerful lib, spicily because Facebook and Twitter use it. I just want to know if there are any competitors/alternatives for Three20? or even simple.


Source: (StackOverflow)

Strange layout issue on 3GS device with iOS 4.2.1 - Compiled with iOS 5

We had a strange bug report from a user who has iOS 4.2.1 on an iPhone 3GS. A lot of the UITextLabels in the app are offset at strange locations. Has anyone else come across this issue.

The app is laid out correctly on all devices we have tested on and we have only heard of this issue from 2 users out of over 100,000.

This could be related to Three20 styles.

misaligned text

enter image description here


Source: (StackOverflow)

Using Localizable.strings in iPhone application

I downloaded the three20 library:

http://three20.info/

And I opened the TTCatalog sample project that comes with this library:

http://img16.imageshack.us/img16/3183/screenshot20100302at752.png

As you can see, there are lots of Localizable.strings files.

When I opened the iPhone simulator and changed its language to for example French in the settings, the text on the button still remains in English:

http://img69.imageshack.us/img69/9775/screenshot20100302at812.png

I already checked that there is definitely a corresponding entry for the text "See All" in the Localization.strings of French.

Why and what are the steps to make it use the Localizable.strings files?

(This sample project does not come with any nib/xib file)

EDIT:

After adding the following XML in Info.plist:

...
<dict>
...
    <key>CFBundleLocalizations</key>
    <array>
    <string>de</string>
    <string>en</string>
    <string>es</string>
    <string>fr</string>
    <string>it</string>
    <string>ja</string>
    <string>zh_cn</string>
    <string>zh_tw</string>  
    </array>
</dict>
...

It works now!


Source: (StackOverflow)

Just how to you use TTStyledTextLabel?

All I want is to display some simple text in my viewController and have the hyperlinks autoparsed. When the user clicks on the link I want the control to somehow do a callback where I can do something with the URL. How can I achieve this?

I've already looked through the TTCatalog for hours. I have also tried looking into the source code of three20 as well as looking at the stack trace. No help. I just can't figure out how my app can react to the click of the URL. Any hints please?


Source: (StackOverflow)

Three20 library - subclass of TTPhotoViewController has an opaque navigation bar

I am using a TTPhotoViewController subclass from the Three20 library for showing images from a web location. The images load up fine but the navigation bar and toolbar show up with the default tint. I am using a nav bar with a custom tint (set in the MainWindow.xib)

I tried these things to get it to show black translucent bars but none of these seem to work.

  1. setting the navigation bar style to black translucent in MainWindow.xib
  2. setting the navigation bar style to black opaque in MainWindow.xib
  3. Explicitly setting the navigationbar style to black translucent in the subclass's viewWillAppear:

Can someone please tell me why this would happen and how I can solve this? Thanks.


Source: (StackOverflow)

understanding TTNavigator

following situation:

in a TTTableViewController i added some Cells with URLs. they are opening a class with @"tt://photos" for example. this works quite fine.

the first thing is, i saw some urls in TT Examples like @"tt/photos/1". is it possible to fetch this "1" in my photos class and say, for example okay, please open picture one, ore is this only another URL that was declared in TTNavigatior to open a specific Class?

the other thing is: is it possible to forward an object to the linked class? clicking a cell opens @"tt://photos" (the linked class in my TTNavigator)

working with normal tableviews i can overwrite my init method and send an object with my initialize method, is this also possible by clicking my TTItems?

thanks!


Source: (StackOverflow)

Recreate recipient bubble behaviour in Mail.app / Three20

Krumelur asked this question about how create a recipient bubble similar to the mail.app. Please see screenshots below of what I mean:

Mail.app picker bubble picture

Selected contact

I can create the look of this element (including the look when it has been selected) but I am struggling with getting the behaviour when it's part of a UITextField. How do you get the bubble to act as part of the UITextField text? For example, when you press the backspace button enough, the bubble becomes highlighted and after one more press will be deleted as if it was part of the text. I've also had difficulties moving the cursor as well.

Preferably the answer would be great in Monotouch but Objective-C answers are more than appreciated too. I'm not asking for the exact code (though if you are willing to part with it, then I won't say no! :D) but rather how to achieve this.

I'm aware of the Three20 project which has a similar element but I can't find where abouts in the code this is actually performed. I'm sorry if this doesn't make much sense, I've kinda struggled to put this question elequantly, please feel free to ask me any questions clarifying the question!


Source: (StackOverflow)

iphone / ipad - Compile three20 under xcode 4?

anyone successfully compiled three20 under XCode 4?

I tried, and changed all Base SDK to latest 4.2, but there is alway a error:

error: There is no SDK with the name or path '..../three20/src/Three20Core/iphoneos4.0'

in Three20UICommon and its Unit tests.

Anyone has a clue about this?

Also, in Xcode 3, I know I can let all UnitTests not to be compiled by deselecting the bulleye for UnitTests. How can I do it in XCode 4?

thanks


Source: (StackOverflow)

TTPickerTextField example

I've been trying all day and just can't make the the TTPickerTextField work. It displays, I set its dataSource to the example code's MockDataSource and type in a name from the mock and it doesn't work. There doesn't seem to be any documentation or any examples anywhere on the internet, something that I find surprising.

So: does anyone have (or can anyone throw together) a really simple example of how the TTPickerTextField works? All I want to do is have someone type something in and put it in a bubble, like in the iPhone Mail app.


Source: (StackOverflow)

Xcode 4 & three20 & create IPA archive: No such file or directory

In Xcode 3.2.5 I use "Build And Archive" to create an IPA file without any problems. How can I do that in Xcode 4? I think I have to use "Product -> Archive", but I get over 100 error messages in the three20 framework. Most are "No such file or directory". ("Product -> Build For -> Build For Archiving" works. No errors.)

For example, this is the first error message:

../scripts/Protect.command: line 23: cd: /Users/[USERNAME]/Library/Developer/Xcode/DerivedData/[PROJECTNAME]-blabla/ArchiveIntermediates/[PROJECTNAME]/BuildProductsPath/Release-iphoneos/../three20/Three20Core: No such file or directory

The path "/[PROJECTNAME]/BuildProductsPath/three20/" really doesn't exists, but this path exists: "/[PROJECTNAME]/three20/"

What can I do?


Source: (StackOverflow)