Skip to content

Commit

Permalink
Pin MessagesCollectionView with constant of topLayoutGuide.length
Browse files Browse the repository at this point in the history
  • Loading branch information
SD10 committed Sep 19, 2017
1 parent dbdceb2 commit c9fdb2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/MessagesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ open class MessagesViewController: UIViewController {

messagesCollectionView.translatesAutoresizingMaskIntoConstraints = false

let top = messagesCollectionView.topAnchor.constraint(equalTo: topLayoutGuide.bottomAnchor)
let top = messagesCollectionView.topAnchor.constraint(equalTo: view.topAnchor, constant: topLayoutGuide.length)
let leading = messagesCollectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor)
let trailing = messagesCollectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor)
let bottom = messagesCollectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
Expand Down

0 comments on commit c9fdb2d

Please sign in to comment.