Created
May 5, 2013 02:25
-
-
Save pec1985/5519438 to your computer and use it in GitHub Desktop.
Extension to TiUIScrollView to get content size
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
// | |
// TiUIScrollViewProxy+Extended.h | |
// TiGoodies | |
// | |
// Created by Pedro Enrique on 4/8/13. | |
// | |
// | |
#define USE_TI_UISCROLLVIEW | |
#import "TiUIScrollViewProxy.h" | |
@interface TiUIScrollViewProxy(Extended) | |
-(id)contentSize; | |
@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
// | |
// TiUIScrollViewProxy+Extended.m | |
// TiGoodies | |
// | |
// Created by Pedro Enrique on 4/8/13. | |
// | |
// | |
#import "TiUIScrollViewProxy+Extended.h" | |
#import "TiUIScrollView.h" | |
#import "TiRect.h" | |
@implementation TiUIScrollViewProxy(Extended) | |
-(id)contentSize | |
{ | |
TiUIScrollView *selfView = (TiUIScrollView *)[self view]; | |
TiUIScrollViewImpl *scrollView = [selfView scrollView]; | |
TiRect *rect = [[TiRect alloc] init]; | |
[rect setHeight:[NSNumber numberWithFloat: scrollView.contentSize.height]]; | |
[rect setWidth:[NSNumber numberWithFloat: scrollView.contentSize.height]]; | |
return rect; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment