TTScrollView causes errors in project

36 views
Skip to first unread message

elpuerco

unread,
Dec 8, 2010, 5:19:40 PM12/8/10
to Three20
Hi, I am trying to get the TTScrollView working in a clean project so
as to learn how it works.

I have replicated the code in the TTCatalog application contained in
ScrollViewTestController.m/h but when I compile I get the errors:

_pageControl = [[TTPageControl alloc] initWithFrame:CGRectMake(0,0,
self.view.width, 20)];
Request for member 'width' in something not a structure or union

_scrollView = [[TTScrollView alloc]
initWithFrame:CGRectMake(0,_pageControl.bottom,
self.view.bounds.size.width, self.view.bounds.size.height -
_pageControl.height - 5.f)];
Request for member 'bottom' in something not a structure or union

_scrollView = [[TTScrollView alloc]
initWithFrame:CGRectMake(0,_pageControl.bottom,
self.view.bounds.size.width, self.view.bounds.size.height -
_pageControl.height - 5.f)];
Request for member 'height' in something not a structure or union


I have even dragged the original files into my project and get the
same result, but this code does not do this in TTCatalog?

I dont know where to look?

Help?

elpuerco

unread,
Dec 8, 2010, 5:32:11 PM12/8/10
to Three20
TYPICAL! You post a question, try one more search and find a kind of
answer....but the answer does not apply to the TT sample?

I have found that if I add these two lines the errors disappear and
the app compiles:

#import "Three20UI/TTView.h"
#import "Three20UI/UIViewAdditions.h"

But these are not in the TTCatalog code so I dont see why it works
without them there but not in my app?

che?

Jeff Verkoeyen

unread,
Dec 15, 2010, 12:29:52 AM12/15/10
to thr...@googlegroups.com
You need to import the Three20/Three20+Additions.h header in order to use UI* addition methods. -width and co. are additions to the UIView object provided by Three20.

Jeff Verkoeyen

unread,
Dec 15, 2010, 12:40:30 AM12/15/10
to thr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages