在iPhone上实现GCMathParser [英] implementing GCMathParser on iphone
本文介绍了在iPhone上实现GCMathParser的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将GCMathParser用于iPhone应用程序,但我找不到实现此框架的任何支持.人们一直说它简单而有点困惑,任何帮助将非常感谢!
i am trying to use the GCMathParser for an iphone application and i cannot find any support on implementing this framework. people keep saying its easy and im kinda confused, any help would be great thanks!
推荐答案
使用此功能需要进行两项更改:
There are two changes you need to make in order to use this:
- 将
#import <Cocoa/Cocoa.h>
更改为#import <UIKit/UIKit.h>
(您也可能会使用<Foundation/Foundation.h>
逃脱) - 尝试再次编译.您会收到有关未知符号"pi"的错误.将其中三个出现的位置更改为
M_PI
(在<math.h>
中为π定义的常数).
- Change
#import <Cocoa/Cocoa.h>
to#import <UIKit/UIKit.h>
(You could probably get away with using<Foundation/Foundation.h>
, too) - Try to compile again. You'll get errors about an unknown symbol "pi". Change the three occurrences of those to
M_PI
(the constant defined in<math.h>
for π).
您仍然会收到警告(关于不赞成使用的方法),但是它将可以编译并正常工作.
You'll still get warnings (about deprecated methods), but it will compile and work.
这篇关于在iPhone上实现GCMathParser的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文