Skip to content

Instantly share code, notes, and snippets.

@mattberg
Created June 12, 2012 15:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattberg/2918133 to your computer and use it in GitHub Desktop.
Save mattberg/2918133 to your computer and use it in GitHub Desktop.
Adding scrollsToTop property for ScrollableView, allowing to disable it so a ScrollView can control the status bar event
-(void)manageRotation;
-(UIScrollView*)scrollview;
-(void)setCurrentPage_:(id)page;
-(void)setScrollingEnabled_:(id)enabled;
-(void)refreshScrollView:(CGRect)visibleBounds readd:(BOOL)readd;
-(void)setScrollsToTop_:(id)value; // New property added
@end
-(void)setDisableBounce_:(id)value
{
[[self scrollview] setBounces:![TiUtils boolValue:value]];
}
//Allows use of scrollsToTop property on a scrollable view.
//This is useful when you have multiple scrollable views in your parent view, you can then
//set which scrollable view will respond to tapping the status bar to scroll to top.
//http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html
-(void)setScrollsToTop_:(id)value
{
[[self scrollview] setScrollsToTop:[TiUtils boolValue:value]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment