//
// CalculatorViewController.h
// Calculator
//
// Created by Yingyu on 11-5-31.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <math.h>
#define clearBtn 1 // C
#define backBtn 2 // ←
#define plusBtn 3 // +
#define subBtn 4 // -
#define mulBtn 5 // x
#define divBtn 6 // ÷
#define sqrXBtn 7 // xⁿ
#define radsigXBtn 8 // ⁿ√x
#define equalBtn 9 // =
#define dotBtn 10 // .
#define signBtn 11 // +/-
#define sqr2Btn 12 // x²
#define radsig2Btn 13 // √x
#define logeBtn 14 // ln
#define log10Btn 15 // log
#define expBtn 16 // eⁿ
#define tensqrBtn 17 // 10ⁿ
#define percBtn 18 // %
#define fracBtn 19 // 1/x
#define cptBtn 20 // CPT
#define nBtn 21 // N
#define iyBtn 22 // I/Y
#define pvBtn 23 // PV
#define pmtBtn 24 // PMT
#define fvBtn 25 // FV
#define cfBtn 26 // CF
#define npvBtn 27 // NPV
#define irrBtn 28 // IRR
#define amortBtn 29 // AMORT
#define enterBtn 30 // ENTER
#define upBtn 31 // ↑
#define downBtn 32 // ↓
#define mrBtn 33 // mr
#define mplusBtn 34 // m+
#define msubBtn 35 // m-
#define secBtn 36 // 2nd
#define clrtvmBtn 37 // CLR TVM
#define clrcfBtn 38 // CLR CF
@interface CalculatorViewController : UIViewController {
UITextField *display;
UILabel *showFoperator;
UILabel *showSpecial;
UIButton *sqrXButton;
UIButton *radsigXButton;
UIButton *expButton;
UIButton *tensqrButton;
UIButton *fracButton;
UIButton *msubButton;
UIButton *clrtvmButton;
UIButton *clrcfButton;
BOOL bBegin;
BOOL backOpen;
BOOL cptOpen;
BOOL secOpen;
double fstOperand;
double sumOperand;
double tvmOperand;
double mrOperand;
double tvN,tvIy,tvPv,tvPmt,tvFv;
NSString *operator;
}
@property (nonatomic, retain) IBOutlet UITextField *display;
@property (nonatomic, retain) IBOutlet UILabel *showFoperator;
@property (nonatomic, retain) IBOutlet UILabel *showSpecial;
@property (nonatomic, retain) IBOutlet UIButton *sqrXButton;
@property (nonatomic, retain) IBOutlet UIButton *radsigXButton;
@property (nonatomic, retain) IBOutlet UIButton *expButton;
@property (nonatomic, retain) IBOutlet UIButton *tensqrButton;
@property (nonatomic, retain) IBOutlet UIButton *fracButton;
@property (nonatomic, retain) IBOutlet UIButton *msubButton;
@property (nonatomic, retain) IBOutlet UIButton *clrtvmButton;
@property (nonatomic, retain) IBOutlet UIButton *clrcfButton;
- (void)clearDisplay; // 初始化清屏方法声明
- (void)backSpace; // 退格方法声明
- (void)inputDoubleOperator: (NSString *)dbopt; // 双操作数运算方法声明
- (void)addDot; // 增加.方法声明
- (void)addSign; // 增加+/-方法声明
- (void)inputSingleOperator: (NSString *)sgopt; // 单操作数运算方法声明
- (void)cptOperator; // CPT求值方法声明
- (void)inputTimeValueOperator: (NSString *)tvopt; // tv金融运算方法声明
- (void)numberMemory: (NSString *)nmopt; // 操作数保留方法声明
- (void)secKey; // 2nd切换按键方法声明
- (void)clearTvm; // 清空tvm变量方法声明
- (void)clearCf; // 清空cf变量方法声明
- (void)inputNumber: (NSString *)nbstr; // 数字输入方法声明
- (IBAction)buttonClicked:(id)sender; // 按键管理事件声明
@end
没有合适的资源?快使用搜索试试~ 我知道了~
iphone下的功能金融计算器【源代码】
共49个文件
pbxbtree:8个
hmap:5个
o:3个
4星 · 超过85%的资源 需积分: 9 71 下载量 127 浏览量
2013-05-07
09:00:04
上传
评论 1
收藏 868KB ZIP 举报
温馨提示
iphone下的功能较强大的金融计算器源代码,分享给广大爱好ios技术的朋友学习
资源推荐
资源详情
资源评论
收起资源包目录
iphone下的金融计算器【源代码】.zip (49个子文件)
Calculator
main.m 358B
build
Debug-iphonesimulator
Calculator.app.dSYM
Contents
Resources
DWARF
Calculator 85KB
Info.plist 594B
Calculator.app
PkgInfo 8B
MainWindow.nib 1KB
Info.plist 637B
Calculator 41KB
CalculatorViewController.nib 12KB
icon.png 24KB
.DS_Store 6KB
Calculator.build
Debug-iphonesimulator
Calculator.build
Calculator-all-target-headers.hmap 793B
Calculator-generated-files.hmap 121B
Objects-normal
i386
CalculatorViewController.o 88KB
Calculator.LinkFileList 454B
main.o 7KB
CalculatorAppDelegate.o 52KB
build-state.dat 30KB
build-state~.dat 28KB
Calculator~.dep 5KB
Calculator.hmap 2KB
Calculator-project-headers.hmap 976B
Calculator.dep 5KB
Calculator-own-target-headers.hmap 793B
Calculator.pbxindex
imports.pbxbtree 9KB
decls.pbxbtree 150KB
files.pbxbtree 3KB
protocols.pbxbtree 2KB
subclasses.pbxbtree 2KB
pbxindex.header 24B
symbols0.pbxsymbols 648KB
categories.pbxbtree 1KB
refs.pbxbtree 116KB
strings.pbxstrings
control 256KB
strings 322KB
cdecls.pbxbtree 151KB
.DS_Store 12KB
Classes
CalculatorViewController.h 3KB
CalculatorViewController.m 11KB
CalculatorAppDelegate.h 491B
CalculatorAppDelegate.m 3KB
Calculator.xcodeproj
yorkxie.mode1v3 39KB
yorkxie.pbxuser 5KB
.DS_Store 6KB
project.pbxproj 11KB
Calculator_Prefix.pch 189B
Calculator-Info.plist 917B
MainWindow.xib 20KB
icon.png 24KB
CalculatorViewController.xib 470KB
共 49 条
- 1
资源评论
- 那年1112014-04-30可以的啊,值得
- shihliangou2013-08-10有参考价值
- LainII2014-06-20有启发作用
- jkkwhite2013-10-19有一些价值,没有实现括号运算
sqz316
- 粉丝: 4
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功