Skip to main content

Posts

Showing posts with the label three20

TTStyleSheet with span class

I am making an app with Three20. I have a TTTableViewController that is the main catalog for other screens and a secont TTViewController connected with a tturl scheme. In my TTViewController there is a TTStyledTextLabel connected to a UIScrollView, that displays a chunk of text from a database that has span, p with classes. I have defined those classes in an TTStyleSheet subclass that is instantiated just like in TTCatalog example. The problem is, that even though in my TTTableViewController the stylesheet works, in the TTViewController it doesn't. I have defined my TTViewController loadView as the following: - (void)loadView { [super loadView]; FMDBDataAccess *dba = [[[FMDBDataAccess alloc] init] autorelease]; Definition *def = [dba getDefinition:termId]; NSLog(@"%@ ",def.term); self.title = def.term; NSString *s = def.definition; TTStyledTextLabel* label1 = [[[TTStyledTextLabel alloc] initWithFrame:CGRectMake(10, 10, self.view.bounds.size.width-20, self.view.b

Memory Leak & App Crash when going back to Album List

I'm using three20 to create image viewer. First i'm creating list of albums from the sql db and when user selects any album, its url string is passed to the this code that creates thums of available pics on network using XML Parser. everything works fine but when user goes back to the album list and selects another album. app crashes with 'Thread 1: Program received singal: "EXC+BAD_ACCESS" in main.m . plus XCode Product Analyze gives potential memory leak where i'm creating photoSource in the viewDidLoad. Here is the code #import "AlbumController.h" #import "PhotoSource.h" #import "Photo.h" #import "AlbumInfo.h" #import "AlbumDatabase.h" @implementation AlbumController @synthesize albumName; @synthesize urlAddress; @synthesize images; - (void)viewDidLoad { [super viewDidLoad]; // NSLog(@"%@", self.urlAddress); [self createPhotos]; // method to set up the photos array self.photoSour

How to properly update Three20?

I've just update my version of Xcode to 4.2 - Xcode has given me a load of warnings from the Three20 source. - So I guess the version of Three20 I have must not be compatible with iOS 5? I'm using the recommended shared directory layout but have manually downloaded the files from the zip, not using git. Once I have re-downloaded the files into the shared directory, should I do anything else to update my project - run the Three20 python script?