Created
June 12, 2012 15:17
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(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