Added Target-Action
This commit is contained in:
@@ -25,4 +25,7 @@
|
|||||||
@property (nonatomic, getter = isEditable) BOOL editable;
|
@property (nonatomic, getter = isEditable) BOOL editable;
|
||||||
@property (nonatomic, strong) MPRangePath *selection;
|
@property (nonatomic, strong) MPRangePath *selection;
|
||||||
|
|
||||||
|
@property (nonatomic, weak) id target;
|
||||||
|
@property (nonatomic) SEL action;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -275,6 +275,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)insertNewline:(id)sender
|
||||||
|
{
|
||||||
|
if (self.target && self.action) {
|
||||||
|
[self.target performSelector:self.action
|
||||||
|
withObject:self
|
||||||
|
afterDelay:0.0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)moveRight:(id)sender
|
- (void)moveRight:(id)sender
|
||||||
{
|
{
|
||||||
if (self.selection.length > 0) {
|
if (self.selection.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user