diff --git a/jot/JotTextView.h b/jot/JotTextView.h index d4f8e0a..02f48f9 100644 --- a/jot/JotTextView.h +++ b/jot/JotTextView.h @@ -91,6 +91,11 @@ */ - (void)clearText; +/** + * Resets the text position, allowing you to start manipulating from scratch. + */ +- (void)resetText; + /** * Overlays the text on the given background image. * diff --git a/jot/JotTextView.m b/jot/JotTextView.m index 760782d..b98982c 100644 --- a/jot/JotTextView.m +++ b/jot/JotTextView.m @@ -82,6 +82,13 @@ - (void)clearText self.textString = @""; } +-(void)resetText{ + [self setFontSize:60.f]; + [self setScale:1.f]; + [self sizeLabel]; + self.textLabel.center = CGPointMake(CGRectGetMidX(self.bounds),CGRectGetMidY(self.bounds)); +} + #pragma mark - Properties - (void)setTextString:(NSString *)textString diff --git a/jot/JotViewController.h b/jot/JotViewController.h index 0f29456..48847ab 100644 --- a/jot/JotViewController.h +++ b/jot/JotViewController.h @@ -160,6 +160,11 @@ typedef NS_ENUM(NSUInteger, JotViewState){ @property (nonatomic, strong, readonly) JotDrawingContainer *drawingContainer; +/** + * Resets the text position, allowing you to start manipulating from scratch. + */ +-(void)resetText; + /** * Clears all paths from the drawing in and sets the text to an empty string, giving a blank slate. */ diff --git a/jot/JotViewController.m b/jot/JotViewController.m index 30148dd..67d73a8 100644 --- a/jot/JotViewController.m +++ b/jot/JotViewController.m @@ -245,6 +245,10 @@ - (void)setDrawingConstantStrokeWidth:(BOOL)drawingConstantStrokeWidth #pragma mark - Undo +- (void)resetText { + [self.textView resetText]; +} + - (void)clearAll { [self clearDrawing];