//
// UITextViewController.m
// GoToBus
//
// Created by paul on 8/4/14.
//
//

#import "TextViewController.h"

@interface TextViewController ()<UITextViewDelegate>
@end

@implementation TextViewController

- (instancetype)init {
	self = [super init];
	if (self) {
		// Custom initialization
	}
	return self;
}

- (void)viewDidLoad {
	[super viewDidLoad];
	// Do any additional setup after loading the view from its nib.
	self.textView.textContainerInset = UIEdgeInsetsMake(15, 15, 15, 15);
	self.textView.delegate = self;
}

#pragma mark - Property

- (UITextView *)textView {
	return self.view;
}

#pragma mark - UITextViewDelegate

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
	if (self.isSingleLine && [text isEqualToString:@"\n"]) {
		return NO;
	}
	return YES;
}


@end
