小编Ale*_*eda的帖子

如何清除Carthage缓存?

我在iOS项目中使用Carthage依赖项管理器,我想知道在更新发生一些问题时清理缓存的最佳方法是什么

iphone xcode ios carthage

32
推荐指数
1
解决办法
2万
查看次数

在Swift中使用函数参数名称

在Swift中,在调用方法时使用参数名称,第一个参数除外.为什么不使用名字?

使用Swift手册的变体;

var count2: Int = 0
func incrementBy2(amount: Int, numberOfTimes times: Int) {
count2 += amount * times}
Run Code Online (Sandbox Code Playgroud)

这将有效;

incrementBy2(2, numberOfTimes: 7)
Run Code Online (Sandbox Code Playgroud)

然而,这给了我"呼叫中的外来参数标签'金额'"

incrementBy2(amount: 2, numberOfTimes: 7)
Run Code Online (Sandbox Code Playgroud)

这有什么理由,还是其中一种"只是它的方式"?

swift

12
推荐指数
2
解决办法
4846
查看次数

将NSAttributedString与不同大小的字符垂直对齐

我一直在谷歌上搜索一段时间,我仍然对iOS6感到惊讶,没有办法垂直对齐NSAttributedString不同大小的字符?特别是我试图将它作为UIButton标题属性垂直对齐,这是可行的吗?

nsattributedstring ios

5
推荐指数
0
解决办法
1073
查看次数

标签 统计

ios ×2

carthage ×1

iphone ×1

nsattributedstring ×1

swift ×1

xcode ×1