Model Redesign: Added Reference Frames
Added Inverse Functions UI Redesign Cleaned Code
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#import "MPSumFunction.h"
|
||||
#import "MPParenthesisFunction.h"
|
||||
#import "MPPowerFunction.h"
|
||||
|
||||
|
||||
@class MPFunctionTemplateItem;
|
||||
@@ -197,11 +198,24 @@ static void *MPFunctionTemplateViewMouseOverContext = @"MPFunctionTemplateViewMo
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
MPFunction *sumFunction = [[MPSumFunction alloc] init];
|
||||
MPFunction *parenthesisFunction = [[MPParenthesisFunction alloc] init];
|
||||
MPFunction *powerFunction = [[MPPowerFunction alloc] init];
|
||||
MPPowerFunction *squareFunction = [[MPPowerFunction alloc] init];
|
||||
squareFunction.exponentExpression = [[MPExpression alloc] initWithElement:@"2"];
|
||||
MPPowerFunction *cubicFunction = [[MPPowerFunction alloc] init];
|
||||
cubicFunction.exponentExpression = [[MPExpression alloc] initWithElement:@"3"];
|
||||
self.functionPrototypes = @[
|
||||
@{@"function": [[MPSumFunction alloc] init],
|
||||
@{@"function": sumFunction,
|
||||
@"name": NSLocalizedString(@"Sum", @"Sum Function Name")},
|
||||
@{@"function": [[MPParenthesisFunction alloc] init],
|
||||
@"name": NSLocalizedString(@"Parenthesis", @"Parenthesis Function Name")}
|
||||
@{@"function": parenthesisFunction,
|
||||
@"name": NSLocalizedString(@"Parenthesis", @"Parenthesis Function Name")},
|
||||
@{@"function": squareFunction,
|
||||
@"name": NSLocalizedString(@"Square", @"Square Function Name")},
|
||||
@{@"function": cubicFunction,
|
||||
@"name": NSLocalizedString(@"Cubic", @"Cubic Function Name")},
|
||||
@{@"function": powerFunction,
|
||||
@"name": NSLocalizedString(@"Power", @"Power Function Name")}
|
||||
];
|
||||
[self.collectionView addObserver:self
|
||||
forKeyPath:@"hoverItem"
|
||||
|
||||
Reference in New Issue
Block a user