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

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
Hi,

I use IB.


First i create a view and add some controls in the top and bottom.

I change the view to scrollview.

I need to display some labels in the middle of the view.

so i add a new view.

I need to scroll the view.

Here my code


HTML:
IBOutlet UIScrollView *scroll;
IBOutlet UIView *view1;

@property(nonatomic,retain) UIScrollView *scroll;
@property(nonatomic,retain) UIView *view1;


[scroll addSubview:view1];
	[scroll setScrollEnabled:YES];
	[scroll setContentSize:CGSizeMake(200,200)];
	scroll.showsVerticalScrollIndicator=YES;
	scroll.showsHorizontalScrollIndicator=YES;

My problem is the view is not scrolled.
I could not see any scrollbar indicator.

What is the mistake i done?
Can anybody please tell me the solution?

Thanks
judy
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
From the documentation:

showsHorizontalScrollIndicator

[...]

The default value is YES. The indicator is visible while tracking is underway and fades out after tracking.

i.e. scrollbars will only be visible when you are scrolling.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.