Frequently Answered Questions
Request for member 'width' not a structure or union
Example code that might cause this error:
_pageControl = [[TTPageControl alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 20)];
The culprit in this code is self.view.width. The .width accessor is not a standard UIView
method. In fact, it's a utility method provided by Three20 in the form of an "addition" to the
UIView object. Three20 additions may only be used if you
#import <Three20/Three20+Additions.h> into your project.
Variations
Request for member 'height' not a structure or union Request for member 'left' not a structure or union
Added Three20 and set up URL mapping but getting a black screen
This will happen when you've set up a new project, removed the default nib, and only use Three20 in your app delegate to present the initial view controllers.
The problem is likely that you haven't declared to your app the name of your
app delegate. To resolve this problem, open main.m in your project.
It's usually in the "Other Sources" folder. Find the following line:
int retVal = UIApplicationMain(argc, argv, nil, nil);
You will need to change the last nil parameter to a string containing the name of your app delegate. For example, if your app delegate is declared as "@interface AppDelegate", you should write:
int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");