小编Muh*_*raf的帖子

UILabel文字突破

我想创建一个UILabel文本就像这样的文本

在此输入图像描述

我怎样才能做到这一点?当文本很小时,该行也应该很小.

cocoa-touch uilabel strikethrough ios swift

110
推荐指数
10
解决办法
6万
查看次数

**'FlickrPhotosViewController'与协议'UICollectionViewDataSource'的冗余一致性**

我正在关注这个(http://www.raywenderlich.com/78550/beginning-ios-collection-views-swift-part-1)教程,现在我

收到此错误:

'FlickrPhotosViewController'与协议'UICollectionViewDataSource'的冗余一致性

所以我在这里有这个代码:

extension FlickrPhotosViewController : UICollectionViewDataSource {

//1
override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
    return searches.count
}

//2
override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
    return searches[section].searchResults.count
}

//3
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
    let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath)
    cell.backgroundColor = UIColor.blackColor()
    // Configure the cell
    return cell
Run Code Online (Sandbox Code Playgroud)

那么这个错误意味着什么?

任何帮助,将不胜感激.

xcode swift

3
推荐指数
1
解决办法
3661
查看次数

标签 统计

swift ×2

cocoa-touch ×1

ios ×1

strikethrough ×1

uilabel ×1

xcode ×1