views:

29

answers:

0

Hi,

I am running into a very annoying problem: I am creating an UIScrollView that containes an UIView that contains some buttons. The UIView with buttons work fine. But the UIScrollView, no matter what I do with it, when touched, crashes. It doesn't make any difference it's empty or not. It keeps crashing.

I am very lost and don't know what else to try. Thanks very much.

In the viewController.h

@interface tagstestViewController : UIViewController <UIScrollViewDelegate> {
        UIScrollView            *scrollViewContainer;
}

@property (nonatomic, retain) UIScrollView *scrollViewContainer;

In the viewController.m:

    UIScrollView *scv       =   [[UIScrollView alloc] initWithFrame:CGRectMake(0,0, 320, 200)];
    scv.backgroundColor     =   [UIColor blackColor];
    scv.autoresizingMask    =   UIViewAutoresizingFlexibleHeight;   
    scv.bounces             =   YES;
    scv.scrollEnabled       =   YES;
    scv.clipsToBounds       =   YES;
    scv.delegate            =   self;

    [self setScrollViewContainer:scv];

    [scv release];

    [self.view addSubview:scrollViewContainer];