UIScrollView UIScrollViewIndicatorStyleDefault
The style of the scroll indicators. You use these constants to set the value of the indicatorStyle style.
typedef enum {
UIScrollViewIndicatorStyleDefault,
UIScrollViewIndicatorStyleBlack,
UIScrollViewIndicatorStyleWhite
} UIScrollViewIndicatorStyle;
Constants
UIScrollViewIndicatorStyleDefault
The default style of scroll indicator, which is black with a white border. This style is good against any content background.
UIScrollViewIndicatorStyleBlack
A style of indicator which is black and smaller than the default style. This style is good against a white content background.
UIScrollViewIndicatorStyleWhite
A style of indicator is white and smaller than the default style. This style is good against a black content background.
UIScrollView UIScrollViewIndicatorStyleDefault example.
UIScrollView* scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 35, self.frame.size.width, self.frame.size.height-35)];
[self.scrollView setScrollEnabled:YES];
[self.scrollView setDelegate:self];
self.scrollView.backgroundColor = [UIColor clearColor];
[self.scrollView setShowsHorizontalScrollIndicator:NO];
[self.scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault];
scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
scrollView.contentMode = UIViewContentModeScaleToFill;
[self.scrollView setContentSize:CGSizeMake("GIVE YOUR WIDTH",0)];
[self.view addSubview:scrollView];
[self.scrollView setScrollEnabled:YES];
[self.scrollView setDelegate:self];
self.scrollView.backgroundColor = [UIColor clearColor];
[self.scrollView setShowsHorizontalScrollIndicator:NO];
[self.scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault];
scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
scrollView.contentMode = UIViewContentModeScaleToFill;
[self.scrollView setContentSize:CGSizeMake("GIVE YOUR WIDTH",0)];
[self.view addSubview:scrollView];
Example of [UIScrollView UIScrollViewIndicatorStyleDefault].
scrollview=[[UIScrollView alloc]initWithFrame:CGRectMake(0,80,320,360)];
[scrollview setContentSize:CGSizeMake(2550,360)];
[scrollview setScrollEnabled:YES];
[scrollview setPagingEnabled:YES];
[scrollview setBackgroundColor:[UIColor clearColor]];
scrollview .indicatorStyle = UIScrollViewIndicatorStyleDefault;
scrollview.showsHorizontalScrollIndicator = NO;
scrollview.showsVerticalScrollIndicator = NO;
scrollview.scrollsToTop = NO;
scrollview.delegate = self;
scrollview.tag=500;
[self.view addSubview:scrollview];
[scrollview setContentSize:CGSizeMake(2550,360)];
[scrollview setScrollEnabled:YES];
[scrollview setPagingEnabled:YES];
[scrollview setBackgroundColor:[UIColor clearColor]];
scrollview .indicatorStyle = UIScrollViewIndicatorStyleDefault;
scrollview.showsHorizontalScrollIndicator = NO;
scrollview.showsVerticalScrollIndicator = NO;
scrollview.scrollsToTop = NO;
scrollview.delegate = self;
scrollview.tag=500;
[self.view addSubview:scrollview];
UIScrollView UIScrollViewIndicatorStyleDefault example.
[self->scrollView setScrollEnabled:YES];
[self->scrollView setDelegate:self];
self->scrollView.backgroundColor = [UIColor clearColor];
[self->scrollView setShowsHorizontalScrollIndicator:NO];
[self->scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault]; scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
scrollView.contentMode = UIViewContentModeScaleToFill;
[self->scrollView setContentSize:CGSizeMake(1300.0,0)];
[self.view addSubview:scrollView];
[self->scrollView setDelegate:self];
self->scrollView.backgroundColor = [UIColor clearColor];
[self->scrollView setShowsHorizontalScrollIndicator:NO];
[self->scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault]; scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
scrollView.contentMode = UIViewContentModeScaleToFill;
[self->scrollView setContentSize:CGSizeMake(1300.0,0)];
[self.view addSubview:scrollView];