Skip to content

Commit 287dbc3

Browse files
authored
Merge pull request #39 from Yalantis/feature/UICollectionView_example
Feature/ui collection view example
2 parents ce59e26 + a3b65a8 commit 287dbc3

File tree

18 files changed

+321
-71
lines changed

18 files changed

+321
-71
lines changed

Example/Example.xcodeproj/project.pbxproj

+24-50
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,19 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
1D6A307F51AA47C3C7131EA5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6A3113147E7211A38816B9 /* ViewController.swift */; };
1110
1D6A3A3B096EF8DCC086DD32 /* CGRect+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6A3CBE4088EC6CBC44FFD2 /* CGRect+Extension.swift */; };
1211
1D6A3EA611666C3A6FC56869 /* CircularRevealTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6A3ED334BF5B2840F84CD1 /* CircularRevealTransition.swift */; };
1312
1D6A3F0B8C4CF9E0E86F6132 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6A3409797E6A1CF29E9E2E /* AppDelegate.swift */; };
13+
44A778262450453B00E46D0B /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44A778232450453B00E46D0B /* CollectionViewCell.swift */; };
14+
44A778272450453B00E46D0B /* CollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44A778242450453B00E46D0B /* CollectionViewController.swift */; };
15+
44A778282450453B00E46D0B /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44A778252450453B00E46D0B /* TableViewController.swift */; };
16+
44A7782A2450456500E46D0B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44A778292450456500E46D0B /* Main.storyboard */; };
1417
AD1F5DCD1A7F94F900BDC0CE /* ContentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1F5DCC1A7F94F900BDC0CE /* ContentType.swift */; };
1518
AD472E321AA9B17F00250E50 /* TrendSansOne.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD472E311AA9B17F00250E50 /* TrendSansOne.otf */; };
16-
AD472E3B1AA9B59100250E50 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = AD472E371AA9B59100250E50 /* [email protected] */; };
17-
AD472E3C1AA9B59100250E50 /* content_films.png in Resources */ = {isa = PBXBuildFile; fileRef = AD472E381AA9B59100250E50 /* content_films.png */; };
18-
AD472E3D1AA9B59100250E50 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = AD472E391AA9B59100250E50 /* [email protected] */; };
19-
AD472E4A1AA9B99A00250E50 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = AD472E471AA9B99A00250E50 /* [email protected] */; };
20-
AD472E4B1AA9B99A00250E50 /* content_music.png in Resources */ = {isa = PBXBuildFile; fileRef = AD472E481AA9B99A00250E50 /* content_music.png */; };
21-
AD472E4C1AA9B99A00250E50 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = AD472E491AA9B99A00250E50 /* [email protected] */; };
22-
AD472E4E1AA9BB1500250E50 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = AD472E4D1AA9BB1500250E50 /* [email protected] */; };
23-
AD472E501AA9BB8900250E50 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = AD472E4F1AA9BB8900250E50 /* [email protected] */; };
2419
ADD8149A1BF625F3009F1FCA /* UIImage+Autoresize.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD814971BF625F3009F1FCA /* UIImage+Autoresize.m */; };
2520
ADE9742C1A78F8500040B7C1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADE9742B1A78F8500040B7C1 /* Images.xcassets */; };
2621
ADE9744F1A78F88C0040B7C1 /* Persei.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADE9744A1A78F8600040B7C1 /* Persei.framework */; };
2722
ADE974511A78F8D80040B7C1 /* Persei.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = ADE9744A1A78F8600040B7C1 /* Persei.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
28-
E831A9C31FA111BA00B28873 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E831A9C11FA111BA00B28873 /* Main.storyboard */; };
2923
E831A9C41FA111BA00B28873 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E831A9C21FA111BA00B28873 /* LaunchScreen.xib */; };
3024
/* End PBXBuildFile section */
3125

@@ -61,28 +55,22 @@
6155
/* End PBXCopyFilesBuildPhase section */
6256

6357
/* Begin PBXFileReference section */
64-
1D6A3113147E7211A38816B9 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
6558
1D6A3409797E6A1CF29E9E2E /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
6659
1D6A3CBE4088EC6CBC44FFD2 /* CGRect+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CGRect+Extension.swift"; sourceTree = "<group>"; };
6760
1D6A3ED334BF5B2840F84CD1 /* CircularRevealTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularRevealTransition.swift; sourceTree = "<group>"; };
61+
44A778232450453B00E46D0B /* CollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = "<group>"; };
62+
44A778242450453B00E46D0B /* CollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewController.swift; sourceTree = "<group>"; };
63+
44A778252450453B00E46D0B /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; };
64+
44A778292450456500E46D0B /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
6865
AD1F5DCC1A7F94F900BDC0CE /* ContentType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentType.swift; sourceTree = "<group>"; };
6966
AD472E311AA9B17F00250E50 /* TrendSansOne.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = TrendSansOne.otf; sourceTree = "<group>"; };
70-
AD472E371AA9B59100250E50 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
71-
AD472E381AA9B59100250E50 /* content_films.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = content_films.png; sourceTree = "<group>"; };
72-
AD472E391AA9B59100250E50 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
7367
AD472E421AA9B71200250E50 /* Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-Bridging-Header.h"; sourceTree = "<group>"; };
74-
AD472E471AA9B99A00250E50 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "[email protected]"; path = "../[email protected]"; sourceTree = "<group>"; };
75-
AD472E481AA9B99A00250E50 /* content_music.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = content_music.png; path = ../content_music.png; sourceTree = "<group>"; };
76-
AD472E491AA9B99A00250E50 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "[email protected]"; path = "../[email protected]"; sourceTree = "<group>"; };
77-
AD472E4D1AA9BB1500250E50 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
78-
AD472E4F1AA9BB8900250E50 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
7968
ADD814961BF625F3009F1FCA /* UIImage+Autoresize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Autoresize.h"; sourceTree = "<group>"; };
8069
ADD814971BF625F3009F1FCA /* UIImage+Autoresize.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Autoresize.m"; sourceTree = "<group>"; };
8170
ADE9741F1A78F8500040B7C1 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
8271
ADE974231A78F8500040B7C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8372
ADE9742B1A78F8500040B7C1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ../Images.xcassets; sourceTree = "<group>"; };
8473
ADE974441A78F8600040B7C1 /* Persei.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Persei.xcodeproj; path = ../Persei.xcodeproj; sourceTree = "<group>"; };
85-
E831A9C11FA111BA00B28873 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
8674
E831A9C21FA111BA00B28873 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = "<group>"; };
8775
/* End PBXFileReference section */
8876

@@ -108,7 +96,9 @@
10896
1D6A36F0E53AF23E93A6FF5F /* Controllers */ = {
10997
isa = PBXGroup;
11098
children = (
111-
1D6A3113147E7211A38816B9 /* ViewController.swift */,
99+
44A778232450453B00E46D0B /* CollectionViewCell.swift */,
100+
44A778242450453B00E46D0B /* CollectionViewController.swift */,
101+
44A778252450453B00E46D0B /* TableViewController.swift */,
112102
);
113103
path = Controllers;
114104
sourceTree = "<group>";
@@ -117,7 +107,6 @@
117107
isa = PBXGroup;
118108
children = (
119109
E831A9C01FA1118100B28873 /* UI */,
120-
AD472E351AA9B59100250E50 /* Content Images */,
121110
AD472E301AA9B17F00250E50 /* Fonts */,
122111
ADE9742B1A78F8500040B7C1 /* Images.xcassets */,
123112
);
@@ -165,21 +154,6 @@
165154
path = Fonts;
166155
sourceTree = "<group>";
167156
};
168-
AD472E351AA9B59100250E50 /* Content Images */ = {
169-
isa = PBXGroup;
170-
children = (
171-
AD472E4D1AA9BB1500250E50 /* [email protected] */,
172-
AD472E471AA9B99A00250E50 /* [email protected] */,
173-
AD472E481AA9B99A00250E50 /* content_music.png */,
174-
AD472E491AA9B99A00250E50 /* [email protected] */,
175-
AD472E371AA9B59100250E50 /* [email protected] */,
176-
AD472E381AA9B59100250E50 /* content_films.png */,
177-
AD472E391AA9B59100250E50 /* [email protected] */,
178-
AD472E4F1AA9BB8900250E50 /* [email protected] */,
179-
);
180-
path = "Content Images";
181-
sourceTree = "<group>";
182-
};
183157
ADD814931BF625F3009F1FCA /* External */ = {
184158
isa = PBXGroup;
185159
children = (
@@ -257,8 +231,8 @@
257231
E831A9C01FA1118100B28873 /* UI */ = {
258232
isa = PBXGroup;
259233
children = (
234+
44A778292450456500E46D0B /* Main.storyboard */,
260235
E831A9C21FA111BA00B28873 /* LaunchScreen.xib */,
261-
E831A9C11FA111BA00B28873 /* Main.storyboard */,
262236
);
263237
path = UI;
264238
sourceTree = "<group>";
@@ -292,7 +266,7 @@
292266
isa = PBXProject;
293267
attributes = {
294268
LastSwiftUpdateCheck = 0710;
295-
LastUpgradeCheck = 0910;
269+
LastUpgradeCheck = 1140;
296270
ORGANIZATIONNAME = Yalantis;
297271
TargetAttributes = {
298272
ADE9741E1A78F8500040B7C1 = {
@@ -303,7 +277,7 @@
303277
};
304278
buildConfigurationList = ADE9741A1A78F8500040B7C1 /* Build configuration list for PBXProject "Example" */;
305279
compatibilityVersion = "Xcode 3.2";
306-
developmentRegion = English;
280+
developmentRegion = en;
307281
hasScannedForEncodings = 0;
308282
knownRegions = (
309283
English,
@@ -341,18 +315,10 @@
341315
isa = PBXResourcesBuildPhase;
342316
buildActionMask = 2147483647;
343317
files = (
344-
AD472E4C1AA9B99A00250E50 /* [email protected] in Resources */,
345318
ADE9742C1A78F8500040B7C1 /* Images.xcassets in Resources */,
346-
AD472E4A1AA9B99A00250E50 /* [email protected] in Resources */,
347-
AD472E3C1AA9B59100250E50 /* content_films.png in Resources */,
319+
44A7782A2450456500E46D0B /* Main.storyboard in Resources */,
348320
E831A9C41FA111BA00B28873 /* LaunchScreen.xib in Resources */,
349-
AD472E4E1AA9BB1500250E50 /* [email protected] in Resources */,
350-
E831A9C31FA111BA00B28873 /* Main.storyboard in Resources */,
351-
AD472E501AA9BB8900250E50 /* [email protected] in Resources */,
352321
AD472E321AA9B17F00250E50 /* TrendSansOne.otf in Resources */,
353-
AD472E3D1AA9B59100250E50 /* [email protected] in Resources */,
354-
AD472E3B1AA9B59100250E50 /* [email protected] in Resources */,
355-
AD472E4B1AA9B99A00250E50 /* content_music.png in Resources */,
356322
);
357323
runOnlyForDeploymentPostprocessing = 0;
358324
};
@@ -366,9 +332,11 @@
366332
AD1F5DCD1A7F94F900BDC0CE /* ContentType.swift in Sources */,
367333
1D6A3EA611666C3A6FC56869 /* CircularRevealTransition.swift in Sources */,
368334
1D6A3A3B096EF8DCC086DD32 /* CGRect+Extension.swift in Sources */,
335+
44A778262450453B00E46D0B /* CollectionViewCell.swift in Sources */,
336+
44A778272450453B00E46D0B /* CollectionViewController.swift in Sources */,
369337
1D6A3F0B8C4CF9E0E86F6132 /* AppDelegate.swift in Sources */,
370338
ADD8149A1BF625F3009F1FCA /* UIImage+Autoresize.m in Sources */,
371-
1D6A307F51AA47C3C7131EA5 /* ViewController.swift in Sources */,
339+
44A778282450453B00E46D0B /* TableViewController.swift in Sources */,
372340
);
373341
runOnlyForDeploymentPostprocessing = 0;
374342
};
@@ -387,6 +355,7 @@
387355
isa = XCBuildConfiguration;
388356
buildSettings = {
389357
ALWAYS_SEARCH_USER_PATHS = NO;
358+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
390359
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
391360
CLANG_CXX_LIBRARY = "libc++";
392361
CLANG_ENABLE_MODULES = YES;
@@ -395,12 +364,14 @@
395364
CLANG_WARN_BOOL_CONVERSION = YES;
396365
CLANG_WARN_COMMA = YES;
397366
CLANG_WARN_CONSTANT_CONVERSION = YES;
367+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
398368
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
399369
CLANG_WARN_EMPTY_BODY = YES;
400370
CLANG_WARN_ENUM_CONVERSION = YES;
401371
CLANG_WARN_INFINITE_RECURSION = YES;
402372
CLANG_WARN_INT_CONVERSION = YES;
403373
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
374+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
404375
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
405376
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
406377
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -440,6 +411,7 @@
440411
isa = XCBuildConfiguration;
441412
buildSettings = {
442413
ALWAYS_SEARCH_USER_PATHS = NO;
414+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
443415
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
444416
CLANG_CXX_LIBRARY = "libc++";
445417
CLANG_ENABLE_MODULES = YES;
@@ -448,12 +420,14 @@
448420
CLANG_WARN_BOOL_CONVERSION = YES;
449421
CLANG_WARN_COMMA = YES;
450422
CLANG_WARN_CONSTANT_CONVERSION = YES;
423+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
451424
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
452425
CLANG_WARN_EMPTY_BODY = YES;
453426
CLANG_WARN_ENUM_CONVERSION = YES;
454427
CLANG_WARN_INFINITE_RECURSION = YES;
455428
CLANG_WARN_INT_CONVERSION = YES;
456429
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
430+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
457431
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
458432
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
459433
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1140"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "ADE9741E1A78F8500040B7C1"
18+
BuildableName = "Example.app"
19+
BlueprintName = "Example"
20+
ReferencedContainer = "container:Example.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "ADE9741E1A78F8500040B7C1"
48+
BuildableName = "Example.app"
49+
BlueprintName = "Example"
50+
ReferencedContainer = "container:Example.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "ADE9741E1A78F8500040B7C1"
65+
BuildableName = "Example.app"
66+
BlueprintName = "Example"
67+
ReferencedContainer = "container:Example.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// CollectionViewCell.swift
3+
// Example
4+
//
5+
// Created by Eugene on 22.04.2020.
6+
// Copyright © 2020 Yalantis. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
final class CollectionViewCell: UICollectionViewCell {
12+
13+
@IBOutlet weak var imageView: UIImageView!
14+
15+
}

0 commit comments

Comments
 (0)