作者:手机用户2502922083 | 来源:互联网 | 2023-09-25 13:25
ImlearningobjectivecalittlebittowriteaniPadapp.Ivemostlydonesomehtml5phpprojects
I'm learning objective c a little bit to write an iPad app. I've mostly done some html5/php projects and learned some python at university. But one thing that really blows my mind is how hard it is to just style some text in an objective C label.
我正在学习objective c,写一个iPad应用程序。我主要做了一些html5/php项目,在大学里学了一些python语言。但是有一件事让我很震惊,那就是在objective - C标签中对一些文本进行样式化是多么的困难。
Maybe I'm coming from a lazy markdown generation, but really, if I want to let an UILabel look like:
也许我来自一个懒惰的下等一代,但真的,如果我想让UILabel看起来像:
Objective: Construct an equilateral triangle from the line segment AB.
目的:从线段AB构造等边三角形。
In markdown this is as simple as:
在markdown中,这很简单:
**Objective:** Construct an *equilateral* triangle from the line segment AB.
**目的:** *从线段AB构造一个*等边*三角形。
Is there really no pain free objective C way to do this ? All the tutorials I read really wanted me to write like 15 lines of code. For something as simple as this.
真的没有无痛目标C方法来做这个吗?我读过的所有教程都希望我写15行代码。对于像这样简单的事情。
So my question is, what is the easiest way to do this, if you have a lot of styling to do in your app ? Will styling text become more natural with swift in iOS8 ?
我的问题是,如果你的应用中有很多样式,最简单的方法是什么?在iOS8中使用swift样式文本会更自然吗?
2 个解决方案