Skip to content

Commit

Permalink
Merge pull request #157 from nohana/feature/fix_first_scroll_positon
Browse files Browse the repository at this point in the history
Fixed first asset scroll view position.
  • Loading branch information
tyokujin authored Mar 30, 2023
2 parents 42c8176 + e3dd54f commit f7624cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions NohanaImagePicker/AssetListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class AssetListViewController: UICollectionViewController, UICollectionViewDeleg
view.backgroundColor = nohanaImagePickerController.config.color.background ?? .white
setUpToolbarItems()
addPickPhotoKitAssetNotificationObservers()

collectionView.translatesAutoresizingMaskIntoConstraints = false
collectionView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
collectionView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
collectionView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true
collectionView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true
}

var cellSize: CGSize {
Expand Down

0 comments on commit f7624cd

Please sign in to comment.