Skip to content

Commit

Permalink
modify PhotosBrowerController
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyuexit committed Sep 26, 2017
1 parent 8bc25bf commit 8a6f58e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions LPAlbum.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
731A48261F623B3E00AC5513 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 731A48251F623B3E00AC5513 /* Assets.xcassets */; };
731A48291F623B3E00AC5513 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 731A48271F623B3E00AC5513 /* LaunchScreen.storyboard */; };
7337B6741F6850C800F1FE84 /* PhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7337B6731F6850C800F1FE84 /* PhotoCell.swift */; };
738C26041F67934D00040E4E /* PhotosPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738C26031F67934D00040E4E /* PhotosPreviewController.swift */; };
738C26041F67934D00040E4E /* PhotosBrowerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738C26031F67934D00040E4E /* PhotosBrowerController.swift */; };
738C26061F67C94500040E4E /* TakeCameraCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738C26051F67C94500040E4E /* TakeCameraCell.swift */; };
738C260B1F67E43200040E4E /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738C260A1F67E43200040E4E /* Extensions.swift */; };
739180FB1F6677BE001EACFF /* LPAlbum.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 731A47FE1F623AF000AC5513 /* LPAlbum.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -72,7 +72,7 @@
731A48281F623B3E00AC5513 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
731A482A1F623B3E00AC5513 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7337B6731F6850C800F1FE84 /* PhotoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoCell.swift; sourceTree = "<group>"; };
738C26031F67934D00040E4E /* PhotosPreviewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotosPreviewController.swift; sourceTree = "<group>"; };
738C26031F67934D00040E4E /* PhotosBrowerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotosBrowerController.swift; sourceTree = "<group>"; };
738C26051F67C94500040E4E /* TakeCameraCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TakeCameraCell.swift; sourceTree = "<group>"; };
738C260A1F67E43200040E4E /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
739181071F669FC9001EACFF /* LPAlbum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LPAlbum.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -175,7 +175,7 @@
children = (
739181071F669FC9001EACFF /* LPAlbum.swift */,
739181081F669FC9001EACFF /* LPNavigationController.swift */,
738C26031F67934D00040E4E /* PhotosPreviewController.swift */,
738C26031F67934D00040E4E /* PhotosBrowerController.swift */,
);
path = Controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -357,7 +357,7 @@
files = (
739181091F669FC9001EACFF /* LPAlbum.swift in Sources */,
7391811D1F66A33C001EACFF /* DropMenuView.swift in Sources */,
738C26041F67934D00040E4E /* PhotosPreviewController.swift in Sources */,
738C26041F67934D00040E4E /* PhotosBrowerController.swift in Sources */,
7391811A1F669FD2001EACFF /* AlbumCollectionCell.swift in Sources */,
738C26061F67C94500040E4E /* TakeCameraCell.swift in Sources */,
73BF7BF01F6A24E400A0BEC1 /* PhotoPreviewCell.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion LPAlbum/Controllers/LPAlbum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ extension LPAlbum {
}

func cellDidSelectForPreviewViewController(indexPath: IndexPath) -> UIViewController{
let previewVc = PhotosPreviewController()
let previewVc = PhotosBrowerController()
let assetModels = albumModels[currentAlbumIndex].assetModels
previewVc.assetModels = assetModels
previewVc.currentIndex = config.hasCamera ? indexPath.row - 1 : indexPath.row
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import UIKit

class PhotosPreviewController: UIViewController {
class PhotosBrowerController: UIViewController {

var assetModels: [AssetModel]!
var currentIndex: Int!

var chooseAction: ((Int, UIButton, PhotosPreviewController) -> Void)?
var chooseAction: ((Int, UIButton, PhotosBrowerController) -> Void)?

fileprivate var collectionView: UICollectionView!
fileprivate let itemPadding: CGFloat = 20.0
Expand All @@ -33,7 +33,7 @@ class PhotosPreviewController: UIViewController {
}
}

extension PhotosPreviewController {
extension PhotosBrowerController {

func setupUI(){
// 将collectionView多余的部分切到
Expand Down Expand Up @@ -89,7 +89,7 @@ extension PhotosPreviewController {
}
}

extension PhotosPreviewController: UICollectionViewDelegate, UICollectionViewDataSource {
extension PhotosBrowerController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return assetModels.count
}
Expand Down

0 comments on commit 8a6f58e

Please sign in to comment.