Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 106 additions & 21 deletions iPhone Photos app.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,44 @@
/* Begin PBXBuildFile section */
604A14EB29C041100093E2C0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A14EA29C041100093E2C0 /* AppDelegate.swift */; };
604A14ED29C041100093E2C0 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A14EC29C041100093E2C0 /* SceneDelegate.swift */; };
604A14EF29C041100093E2C0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A14EE29C041100093E2C0 /* ViewController.swift */; };
604A14F229C041100093E2C0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 604A14F029C041100093E2C0 /* Main.storyboard */; };
604A14F429C041120093E2C0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 604A14F329C041120093E2C0 /* Assets.xcassets */; };
604A14F729C041120093E2C0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 604A14F529C041120093E2C0 /* LaunchScreen.storyboard */; };
604A14FF29C04F560093E2C0 /* LibraryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A14FE29C04F560093E2C0 /* LibraryViewController.swift */; };
604A150129C04F640093E2C0 /* ForYouViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A150029C04F640093E2C0 /* ForYouViewController.swift */; };
604A150329C04F7B0093E2C0 /* AlbumsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A150229C04F7B0093E2C0 /* AlbumsViewController.swift */; };
604A150529C04F8A0093E2C0 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A150429C04F8A0093E2C0 /* SearchViewController.swift */; };
604A150729C0B7DA0093E2C0 /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A150629C0B7DA0093E2C0 /* TabBarController.swift */; };
604A150A29C0F2D70093E2C0 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 604A150929C0F2D70093E2C0 /* SnapKit */; };
604A150C29C0F4DB0093E2C0 /* AlbumCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A150B29C0F4DB0093E2C0 /* AlbumCollectionViewCell.swift */; };
604A151429C100170093E2C0 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A151329C100170093E2C0 /* Models.swift */; };
604A151629C19EF40093E2C0 /* AlbumCellHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A151529C19EF40093E2C0 /* AlbumCellHeader.swift */; };
604A151829C24E430093E2C0 /* MediaCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604A151729C24E430093E2C0 /* MediaCollectionViewCell.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
604A14E729C041100093E2C0 /* iPhone Photos app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iPhone Photos app.app"; sourceTree = BUILT_PRODUCTS_DIR; };
604A14EA29C041100093E2C0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
604A14EC29C041100093E2C0 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
604A14EE29C041100093E2C0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
604A14F129C041100093E2C0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
604A14F329C041120093E2C0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
604A14F629C041120093E2C0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
604A14F829C041120093E2C0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
604A14FE29C04F560093E2C0 /* LibraryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryViewController.swift; sourceTree = "<group>"; };
604A150029C04F640093E2C0 /* ForYouViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForYouViewController.swift; sourceTree = "<group>"; };
604A150229C04F7B0093E2C0 /* AlbumsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumsViewController.swift; sourceTree = "<group>"; };
604A150429C04F8A0093E2C0 /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = "<group>"; };
604A150629C0B7DA0093E2C0 /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; };
604A150B29C0F4DB0093E2C0 /* AlbumCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumCollectionViewCell.swift; sourceTree = "<group>"; };
604A151329C100170093E2C0 /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
604A151529C19EF40093E2C0 /* AlbumCellHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumCellHeader.swift; sourceTree = "<group>"; };
604A151729C24E430093E2C0 /* MediaCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaCollectionViewCell.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
604A14E429C041100093E2C0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
604A150A29C0F2D70093E2C0 /* SnapKit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -54,17 +70,64 @@
sourceTree = "<group>";
};
604A14E929C041100093E2C0 /* iPhone Photos app */ = {
isa = PBXGroup;
children = (
604A150629C0B7DA0093E2C0 /* TabBarController.swift */,
604A151329C100170093E2C0 /* Models.swift */,
604A151229C0F6F40093E2C0 /* SearchVC */,
604A151029C0F6DC0093E2C0 /* AlbumVC */,
604A150F29C0F6C80093E2C0 /* ForYouVC */,
604A150E29C0F6BE0093E2C0 /* LibraryVC */,
604A150D29C0F5B90093E2C0 /* App */,
);
path = "iPhone Photos app";
sourceTree = "<group>";
};
604A150D29C0F5B90093E2C0 /* App */ = {
isa = PBXGroup;
children = (
604A14EA29C041100093E2C0 /* AppDelegate.swift */,
604A14EC29C041100093E2C0 /* SceneDelegate.swift */,
604A14EE29C041100093E2C0 /* ViewController.swift */,
604A14F029C041100093E2C0 /* Main.storyboard */,
604A14F329C041120093E2C0 /* Assets.xcassets */,
604A14F529C041120093E2C0 /* LaunchScreen.storyboard */,
604A14F829C041120093E2C0 /* Info.plist */,
);
path = "iPhone Photos app";
path = App;
sourceTree = "<group>";
};
604A150E29C0F6BE0093E2C0 /* LibraryVC */ = {
isa = PBXGroup;
children = (
604A14FE29C04F560093E2C0 /* LibraryViewController.swift */,
);
path = LibraryVC;
sourceTree = "<group>";
};
604A150F29C0F6C80093E2C0 /* ForYouVC */ = {
isa = PBXGroup;
children = (
604A150029C04F640093E2C0 /* ForYouViewController.swift */,
);
path = ForYouVC;
sourceTree = "<group>";
};
604A151029C0F6DC0093E2C0 /* AlbumVC */ = {
isa = PBXGroup;
children = (
604A150229C04F7B0093E2C0 /* AlbumsViewController.swift */,
604A150B29C0F4DB0093E2C0 /* AlbumCollectionViewCell.swift */,
604A151529C19EF40093E2C0 /* AlbumCellHeader.swift */,
604A151729C24E430093E2C0 /* MediaCollectionViewCell.swift */,
);
path = AlbumVC;
sourceTree = "<group>";
};
604A151229C0F6F40093E2C0 /* SearchVC */ = {
isa = PBXGroup;
children = (
604A150429C04F8A0093E2C0 /* SearchViewController.swift */,
);
path = SearchVC;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand All @@ -83,6 +146,9 @@
dependencies = (
);
name = "iPhone Photos app";
packageProductDependencies = (
604A150929C0F2D70093E2C0 /* SnapKit */,
);
productName = "iPhone Photos app";
productReference = 604A14E729C041100093E2C0 /* iPhone Photos app.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -111,6 +177,9 @@
Base,
);
mainGroup = 604A14DE29C041100093E2C0;
packageReferences = (
604A150829C0F2D70093E2C0 /* XCRemoteSwiftPackageReference "SnapKit" */,
);
productRefGroup = 604A14E829C041100093E2C0 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand All @@ -127,7 +196,6 @@
files = (
604A14F729C041120093E2C0 /* LaunchScreen.storyboard in Resources */,
604A14F429C041120093E2C0 /* Assets.xcassets in Resources */,
604A14F229C041100093E2C0 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -138,23 +206,23 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
604A14EF29C041100093E2C0 /* ViewController.swift in Sources */,
604A151629C19EF40093E2C0 /* AlbumCellHeader.swift in Sources */,
604A151429C100170093E2C0 /* Models.swift in Sources */,
604A150C29C0F4DB0093E2C0 /* AlbumCollectionViewCell.swift in Sources */,
604A150529C04F8A0093E2C0 /* SearchViewController.swift in Sources */,
604A14EB29C041100093E2C0 /* AppDelegate.swift in Sources */,
604A150329C04F7B0093E2C0 /* AlbumsViewController.swift in Sources */,
604A14FF29C04F560093E2C0 /* LibraryViewController.swift in Sources */,
604A150729C0B7DA0093E2C0 /* TabBarController.swift in Sources */,
604A150129C04F640093E2C0 /* ForYouViewController.swift in Sources */,
604A151829C24E430093E2C0 /* MediaCollectionViewCell.swift in Sources */,
604A14ED29C041100093E2C0 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
604A14F029C041100093E2C0 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
604A14F129C041100093E2C0 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
604A14F529C041120093E2C0 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
Expand Down Expand Up @@ -289,10 +357,9 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 6YX8RWQNTP;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "iPhone Photos app/Info.plist";
INFOPLIST_FILE = "iPhone Photos app/App/Info.plist";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -317,10 +384,9 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 6YX8RWQNTP;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "iPhone Photos app/Info.plist";
INFOPLIST_FILE = "iPhone Photos app/App/Info.plist";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -358,6 +424,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
604A150829C0F2D70093E2C0 /* XCRemoteSwiftPackageReference "SnapKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SnapKit/SnapKit.git";
requirement = {
branch = develop;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
604A150929C0F2D70093E2C0 /* SnapKit */ = {
isa = XCSwiftPackageProductDependency;
package = 604A150829C0F2D70093E2C0 /* XCRemoteSwiftPackageReference "SnapKit" */;
productName = SnapKit;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 604A14DF29C041100093E2C0 /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>SnapKitPlayground (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>SnapKitPlayground (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>SnapKitPlayground (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>iPhone Photos app.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
Expand Down
75 changes: 75 additions & 0 deletions iPhone Photos app/AlbumVC/AlbumCellHeader.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//
// AlbumCellHeader.swift
// iPhone Photos app
//
// Created by Adlet Zhantassov on 15.03.2023.
//

import UIKit
import SnapKit

class AlbumCellHeader: UICollectionReusableView {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final class


static let identifier = "AlbumCellHeader"

lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .systemGray5
return view
}()

lazy var title: UILabel = {
let label = UILabel()
label.font = UIFont.systemFont(ofSize: 25, weight: .bold)
return label
}()

lazy var button: UIButton = {
let button = UIButton(type: .system)
button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 17)
button.setTitleColor(.black, for: .normal)
return button
}()

override init(frame: CGRect) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно добавить // MARK

super.init(frame: frame)
clipsToBounds = true
setupViews()
setupConstraints()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

private func setupViews() {
addSubview(lineView)
addSubview(title)
addSubview(button)
}

private func setupConstraints() {
lineView.snp.makeConstraints {
$0.top.equalTo(self)
$0.width.equalTo(self.snp.width)
$0.height.equalTo(1)
}

title.snp.makeConstraints {
$0.bottom.equalTo(self)
$0.left.equalTo(self)
}

button.snp.makeConstraints {
$0.bottom.equalTo(self)
$0.right.equalTo(self)
}
}

override func prepareForReuse() {
super.prepareForReuse()
title.text = nil
button.titleLabel?.text = nil
}

}
Loading