Skip to content

Instantly share code, notes, and snippets.

@rborn
Forked from pec1985/TiUITextAreaProxy.m
Created June 28, 2012 07:44
Show Gist options
  • Save rborn/3009739 to your computer and use it in GitHub Desktop.
Save rborn/3009739 to your computer and use it in GitHub Desktop.
contentWidth and contentHeight in Ti.UI.TextArea
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#ifdef USE_TI_UITEXTAREA
#import "TiUITextAreaProxy.h"
#import "TiUITextArea.h"
@implementation TiUITextAreaProxy
#pragma mark Defaults
DEFINE_DEF_PROP(value,@"");
-(id)contentHeight
{
TiUITextArea *_view = (TiUITextArea*)[self view];
UITextView *textView = (UITextView*)[_view textWidgetView];
CGFloat height = textView.contentSize.height;
return NUMFLOAT(height);
}
-(id)contentWidth
{
TiUITextArea *_view = (TiUITextArea*)[self view];
UITextView *textView = (UITextView*)[_view textWidgetView];
CGFloat width = textView.contentSize.height;
return NUMFLOAT(width);
}
@end
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment