![]() ![]() Let headerView = queueReusableSupplementaryView( ViewForSupplementaryElementOfKind kind: String,Ĭase UICollectionView.elementKindSectionHeader: Open FlickrPhotosViewController+UICollectionViewDataSource.swift and add the following method: It will add the following code:Ĭlass FlickrPhotoHeaderView: UICollectionReusableView weak var titleLabel: UILabel!įinally, you need to implement a new data source method to wire everything together. Open FlickrPhotoHeaderView.swift in an additional editor pane and Control-drag from the label in the header view over to the file and name the outlet titleLabel. In the Attributes inspector of the label, update the font to System 32. Use the Auto Layout align button at the bottom of the storyboard window to pin it to the horizontal and vertical center of the view. Now open the Object library with the key combination Command-Shift-L and drag a Label onto the reusable view.
0 Comments
Leave a Reply. |