Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nnavick

macrumors regular
Original poster
Oct 13, 2010
100
0
Hi,
Why when I am trying to put UIScrollView in another UIScrollView the second ScrollView isn't working?
I tries to change the attributes ,but it's hasn't succeed.

Thank you!!
 
Last edited:
are both scrollviews connected to their own IBOutlets? Is one scrollview inside the other or are they both on the UIView? What are you trying to achieve?
Nick
 
I am trying to locate UIScrollView in another one
I used the IBACTIONS

Code:
	IBOutlet UIScrollView *SCV;
	IBOutlet UIScrollView *SCV1;

Still don't working
 
Post some code and maybe we can find the problem but I suspect your error is in interface builder.

your .h should be something like
Code:
@interface Flipside : UIViewController {
	IBOutlet UIScrollView *scrollView;
	IBOutlet UIScrollView *scrollView2;
} 

@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
@property (nonatomic, retain) IBOutlet UIScrollView *scrollView2;

@end
your .m

Code:
@synthesize scrollView;
@synthesize scrollView2;

- (void)viewDidLoad { 
 [scrollView setScrollEnabled:YES];	
 [scrollView setContentSize:CGSizeMake(320.0,780.0)];
 [scrollView setPagingEnabled:YES];
 [scrollView2 setScrollEnabled:YES];
 [scrollView2 setContentSize:CGSizeMake(9984.0,460.0)];
 [scrollView2 setPagingEnabled:YES];
 [super viewDidLoad];
 }

- (void)dealloc {
    [scrollView release];
    [scrollView2 release];
    [super dealloc];
}

at the interface drag over a scrollview and connect it to scrollView. Drag another scrollview inside the first one and connect it to scrollView2.

Nick
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.