Skip to content

Commit

Permalink
Fixed first scroll position.
Browse files Browse the repository at this point in the history
  • Loading branch information
naoto.suzuki committed Mar 30, 2023
1 parent 42c8176 commit e3dd54f
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 e3dd54f

Please sign in to comment.