Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jot/JotTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
7 changes: 7 additions & 0 deletions jot/JotTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions jot/JotViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
4 changes: 4 additions & 0 deletions jot/JotViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ - (void)setDrawingConstantStrokeWidth:(BOOL)drawingConstantStrokeWidth

#pragma mark - Undo

- (void)resetText {
[self.textView resetText];
}

- (void)clearAll
{
[self clearDrawing];
Expand Down