我想创建一个UILabel
文本就像这样的文本
我怎样才能做到这一点?当文本很小时,该行也应该很小.
我正在关注这个(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)
那么这个错误意味着什么?
任何帮助,将不胜感激.