ios - 如何在 UITextFields 中允许方程式?
<p><p>我的应用中有一个 UITextField,我希望用户能够在其中输入方程式。这些方程式可以从简单的 <code>2+2</code> 到疯狂的 <code>(((4^2) + (6^3))/2) * (100 - 14) </code> 但无论其格式如何,它都应该始终有效。</p>
<p>方程需要遵循运算顺序,并返回正确答案。有什么想法吗?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>您应该查看数学解析器,例如 <a href="https://github.com/davedelong/DDMathParser" rel="noreferrer noopener nofollow">DDMathParser</a> .</p>
<p>有关更多信息,请参阅 <a href="https://stackoverflow.com/questions/4892152/what-is-a-fast-c-or-objective-c-math-parser" rel="noreferrer noopener nofollow">question</a> .</p></p>
<p style="font-size: 20px;">关于ios - 如何在 UITextFields 中允许方程式?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/28269064/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/28269064/
</a>
</p>
页:
[1]