diff --git a/iOS-Assignment.xcodeproj/project.pbxproj b/iOS-Assignment.xcodeproj/project.pbxproj index 51d219e..11defaf 100644 --- a/iOS-Assignment.xcodeproj/project.pbxproj +++ b/iOS-Assignment.xcodeproj/project.pbxproj @@ -20,6 +20,14 @@ EC4E32862710300900690E46 /* Const.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4E32852710300900690E46 /* Const.swift */; }; EC4E32882710301900690E46 /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4E32872710301900690E46 /* Storyboard.swift */; }; EC4E328A2710308200690E46 /* ViewControllers.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4E32892710308200690E46 /* ViewControllers.swift */; }; + EC551A53272A7F8E0025F80A /* Home.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC551A52272A7F8E0025F80A /* Home.swift */; }; + EC7841C12729B092006E2EFB /* StoryCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7841BF2729B092006E2EFB /* StoryCollectionViewCell.swift */; }; + EC7841C22729B092006E2EFB /* StoryCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC7841C02729B092006E2EFB /* StoryCollectionViewCell.xib */; }; + EC7841C42729B2FA006E2EFB /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7841C32729B2FA006E2EFB /* Image.swift */; }; + EC7841C92729B6A0006E2EFB /* CategoryCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7841C72729B6A0006E2EFB /* CategoryCollectionViewCell.swift */; }; + EC7841CA2729B6A0006E2EFB /* CategoryCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC7841C82729B6A0006E2EFB /* CategoryCollectionViewCell.xib */; }; + EC7841CD2729B6B5006E2EFB /* MediaTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7841CB2729B6B5006E2EFB /* MediaTableViewCell.swift */; }; + EC7841CE2729B6B5006E2EFB /* MediaTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC7841CC2729B6B5006E2EFB /* MediaTableViewCell.xib */; }; ECF0699B2722D80200DCF21E /* Tabbar.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ECF0699A2722D80200DCF21E /* Tabbar.storyboard */; }; ECF0699E2722D85F00DCF21E /* Home.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ECF0699D2722D85F00DCF21E /* Home.storyboard */; }; ECF069A02722D86D00DCF21E /* Shorts.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ECF0699F2722D86D00DCF21E /* Shorts.storyboard */; }; @@ -50,6 +58,14 @@ EC4E32852710300900690E46 /* Const.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Const.swift; sourceTree = ""; }; EC4E32872710301900690E46 /* Storyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storyboard.swift; sourceTree = ""; }; EC4E32892710308200690E46 /* ViewControllers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewControllers.swift; sourceTree = ""; }; + EC551A52272A7F8E0025F80A /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = ""; }; + EC7841BF2729B092006E2EFB /* StoryCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryCollectionViewCell.swift; sourceTree = ""; }; + EC7841C02729B092006E2EFB /* StoryCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StoryCollectionViewCell.xib; sourceTree = ""; }; + EC7841C32729B2FA006E2EFB /* Image.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Image.swift; sourceTree = ""; }; + EC7841C72729B6A0006E2EFB /* CategoryCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryCollectionViewCell.swift; sourceTree = ""; }; + EC7841C82729B6A0006E2EFB /* CategoryCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CategoryCollectionViewCell.xib; sourceTree = ""; }; + EC7841CB2729B6B5006E2EFB /* MediaTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaTableViewCell.swift; sourceTree = ""; }; + EC7841CC2729B6B5006E2EFB /* MediaTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MediaTableViewCell.xib; sourceTree = ""; }; ECF0699A2722D80200DCF21E /* Tabbar.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Tabbar.storyboard; sourceTree = ""; }; ECF0699D2722D85F00DCF21E /* Home.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Home.storyboard; sourceTree = ""; }; ECF0699F2722D86D00DCF21E /* Shorts.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Shorts.storyboard; sourceTree = ""; }; @@ -118,6 +134,7 @@ EC4E32852710300900690E46 /* Const.swift */, EC4E32872710301900690E46 /* Storyboard.swift */, EC4E32892710308200690E46 /* ViewControllers.swift */, + EC7841C32729B2FA006E2EFB /* Image.swift */, ); path = Constants; sourceTree = ""; @@ -126,7 +143,6 @@ isa = PBXGroup; children = ( ECF0699C2722D83600DCF21E /* HomeStoryboards */, - EC4E3269270F2A5D00690E46 /* Main.storyboard */, EC4E3277270F32E600690E46 /* SignUp.storyboard */, EC4E327F27102C5100690E46 /* Enter.storyboard */, ECF0699A2722D80200DCF21E /* Tabbar.storyboard */, @@ -137,6 +153,8 @@ EC4E328C271052CE00690E46 /* Source */ = { isa = PBXGroup; children = ( + EC551A51272A49390025F80A /* Model */, + EC80FB912729AFCE0050E0F1 /* Cell */, EC4E3263270F2A5D00690E46 /* AppDelegate.swift */, EC4E3265270F2A5D00690E46 /* SceneDelegate.swift */, EC4E328D271052DC00690E46 /* ViewController */, @@ -155,6 +173,35 @@ path = ViewController; sourceTree = ""; }; + EC551A51272A49390025F80A /* Model */ = { + isa = PBXGroup; + children = ( + EC551A52272A7F8E0025F80A /* Home.swift */, + ); + path = Model; + sourceTree = ""; + }; + EC7841C52729B680006E2EFB /* Home */ = { + isa = PBXGroup; + children = ( + EC7841BF2729B092006E2EFB /* StoryCollectionViewCell.swift */, + EC7841C02729B092006E2EFB /* StoryCollectionViewCell.xib */, + EC7841C72729B6A0006E2EFB /* CategoryCollectionViewCell.swift */, + EC7841C82729B6A0006E2EFB /* CategoryCollectionViewCell.xib */, + EC7841CB2729B6B5006E2EFB /* MediaTableViewCell.swift */, + EC7841CC2729B6B5006E2EFB /* MediaTableViewCell.xib */, + ); + path = Home; + sourceTree = ""; + }; + EC80FB912729AFCE0050E0F1 /* Cell */ = { + isa = PBXGroup; + children = ( + EC7841C52729B680006E2EFB /* Home */, + ); + path = Cell; + sourceTree = ""; + }; ECF0699C2722D83600DCF21E /* HomeStoryboards */ = { isa = PBXGroup; children = ( @@ -163,6 +210,7 @@ ECF069A12722D87500DCF21E /* Add.storyboard */, ECF069A32722D88C00DCF21E /* Subscribe.storyboard */, ECF069A52722D89D00DCF21E /* Storage.storyboard */, + EC4E3269270F2A5D00690E46 /* Main.storyboard */, ); path = HomeStoryboards; sourceTree = ""; @@ -238,11 +286,14 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + EC7841CE2729B6B5006E2EFB /* MediaTableViewCell.xib in Resources */, ECF0699E2722D85F00DCF21E /* Home.storyboard in Resources */, ECF0699B2722D80200DCF21E /* Tabbar.storyboard in Resources */, EC4E3270270F2A5F00690E46 /* LaunchScreen.storyboard in Resources */, ECF069A62722D89D00DCF21E /* Storage.storyboard in Resources */, + EC7841C22729B092006E2EFB /* StoryCollectionViewCell.xib in Resources */, ECF069A42722D88C00DCF21E /* Subscribe.storyboard in Resources */, + EC7841CA2729B6A0006E2EFB /* CategoryCollectionViewCell.xib in Resources */, ECF069A02722D86D00DCF21E /* Shorts.storyboard in Resources */, ECF069A22722D87500DCF21E /* Add.storyboard in Resources */, EC4E326D270F2A5F00690E46 /* Assets.xcassets in Resources */, @@ -262,13 +313,18 @@ EC4E327E27102C4900690E46 /* EnterViewController.swift in Sources */, EC4E3268270F2A5D00690E46 /* ViewController.swift in Sources */, ECF069B32722DAA500DCF21E /* TabbarViewController.swift in Sources */, + EC7841C92729B6A0006E2EFB /* CategoryCollectionViewCell.swift in Sources */, + EC7841CD2729B6B5006E2EFB /* MediaTableViewCell.swift in Sources */, ECF069B12722D8D000DCF21E /* StorageViewController.swift in Sources */, EC4E3264270F2A5D00690E46 /* AppDelegate.swift in Sources */, ECF069AD2722D8C300DCF21E /* AddViewController.swift in Sources */, EC4E32882710301900690E46 /* Storyboard.swift in Sources */, + EC551A53272A7F8E0025F80A /* Home.swift in Sources */, EC4E327A270F32F400690E46 /* SignUpViewController.swift in Sources */, ECF069A92722D8B600DCF21E /* HomeViewController.swift in Sources */, + EC7841C42729B2FA006E2EFB /* Image.swift in Sources */, EC4E3266270F2A5D00690E46 /* SceneDelegate.swift in Sources */, + EC7841C12729B092006E2EFB /* StoryCollectionViewCell.swift in Sources */, ECF069AB2722D8BE00DCF21E /* ShortsViewController.swift in Sources */, ECF069AF2722D8CA00DCF21E /* SubscribeViewController.swift in Sources */, EC4E328A2710308200690E46 /* ViewControllers.swift in Sources */, diff --git a/iOS-Assignment.xcodeproj/project.xcworkspace/xcuserdata/seungchan.xcuserdatad/UserInterfaceState.xcuserstate b/iOS-Assignment.xcodeproj/project.xcworkspace/xcuserdata/seungchan.xcuserdatad/UserInterfaceState.xcuserstate index 69b60a8..4c4dceb 100644 Binary files a/iOS-Assignment.xcodeproj/project.xcworkspace/xcuserdata/seungchan.xcuserdatad/UserInterfaceState.xcuserstate and b/iOS-Assignment.xcodeproj/project.xcworkspace/xcuserdata/seungchan.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Contents.json new file mode 100644 index 0000000..018a018 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Frame 71.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame 71@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame 71@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71.png new file mode 100644 index 0000000..5cbf296 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71@2x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71@2x.png new file mode 100644 index 0000000..dbe903b Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71@3x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71@3x.png new file mode 100644 index 0000000..5f13d94 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 71.imageset/Frame 71@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Contents.json new file mode 100644 index 0000000..e336628 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Frame 72.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame 72@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame 72@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72.png new file mode 100644 index 0000000..539147c Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72@2x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72@2x.png new file mode 100644 index 0000000..fa99cee Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72@3x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72@3x.png new file mode 100644 index 0000000..89edc3f Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 72.imageset/Frame 72@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Contents.json new file mode 100644 index 0000000..16ce34e --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Frame 73.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame 73@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame 73@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73.png new file mode 100644 index 0000000..b69e479 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73@2x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73@2x.png new file mode 100644 index 0000000..2e21d4e Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73@3x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73@3x.png new file mode 100644 index 0000000..dc73381 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 73.imageset/Frame 73@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Contents.json new file mode 100644 index 0000000..53376c5 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Frame 78.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame 78@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame 78@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78.png new file mode 100644 index 0000000..399f5e8 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78@2x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78@2x.png new file mode 100644 index 0000000..d9a4523 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78@3x.png b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78@3x.png new file mode 100644 index 0000000..c60b6c1 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/Frame 78.imageset/Frame 78@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/Contents.json new file mode 100644 index 0000000..5ef9752 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ggamju1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ggamju1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ggamju1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1.png new file mode 100644 index 0000000..d08386c Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1@2x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1@2x.png new file mode 100644 index 0000000..af1c694 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1@3x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1@3x.png new file mode 100644 index 0000000..c27de79 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju1.imageset/ggamju1@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/Contents.json new file mode 100644 index 0000000..7ecc720 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ggamju2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ggamju2@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ggamju2@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2.png new file mode 100644 index 0000000..6f5ec89 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2@2x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2@2x.png new file mode 100644 index 0000000..3a5f7db Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2@3x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2@3x.png new file mode 100644 index 0000000..bd72e7f Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju2.imageset/ggamju2@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/Contents.json new file mode 100644 index 0000000..68ea549 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ggamju3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ggamju3@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ggamju3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3.png new file mode 100644 index 0000000..8fae4cb Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3@2x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3@2x.png new file mode 100644 index 0000000..f05dbed Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3@3x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3@3x.png new file mode 100644 index 0000000..87bdf27 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju3.imageset/ggamju3@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/Contents.json new file mode 100644 index 0000000..97564f5 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ggamju4.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ggamju4@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ggamju4@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4.png new file mode 100644 index 0000000..34ad7fa Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4@2x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4@2x.png new file mode 100644 index 0000000..11cbdd1 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4@3x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4@3x.png new file mode 100644 index 0000000..1bd952b Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju4.imageset/ggamju4@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/Contents.json new file mode 100644 index 0000000..bd6fd4a --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ggamju5.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ggamju5@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ggamju5@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5.png new file mode 100644 index 0000000..603ba89 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5@2x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5@2x.png new file mode 100644 index 0000000..32d855a Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5@3x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5@3x.png new file mode 100644 index 0000000..46079ed Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju5.imageset/ggamju5@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/Contents.json new file mode 100644 index 0000000..8e86788 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ggamju7.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ggamju7@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ggamju7@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7.png new file mode 100644 index 0000000..e8086f1 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7@2x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7@2x.png new file mode 100644 index 0000000..9b86f70 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7@3x.png b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7@3x.png new file mode 100644 index 0000000..bd216fc Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/ggamju7.imageset/ggamju7@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/Contents.json new file mode 100644 index 0000000..d5251dd --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "image 205.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "image 205@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "image 205@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205.png b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205.png new file mode 100644 index 0000000..03636b5 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205@2x.png b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205@2x.png new file mode 100644 index 0000000..015bdcf Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205@3x.png b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205@3x.png new file mode 100644 index 0000000..06674fa Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/image 205.imageset/image 205@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/Contents.json new file mode 100644 index 0000000..73ac72e --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "wesoptAndroidPart.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "wesoptAndroidPart@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "wesoptAndroidPart@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart.png b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart.png new file mode 100644 index 0000000..1f58ed6 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart@2x.png b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart@2x.png new file mode 100644 index 0000000..6bc819b Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart@3x.png b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart@3x.png new file mode 100644 index 0000000..99e7f85 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/wesoptAndroidPart.imageset/wesoptAndroidPart@3x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/Contents.json b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/Contents.json new file mode 100644 index 0000000..098d8d8 --- /dev/null +++ b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "wesoptiOSPart.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "wesoptiOSPart@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "wesoptiOSPart@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart.png b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart.png new file mode 100644 index 0000000..5ed520f Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@2x.png b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@2x.png new file mode 100644 index 0000000..9d8373c Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@2x.png differ diff --git a/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@3x.png b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@3x.png new file mode 100644 index 0000000..a5cc952 Binary files /dev/null and b/iOS-Assignment/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@3x.png differ diff --git a/iOS-Assignment/Resource/Constants/Image.swift b/iOS-Assignment/Resource/Constants/Image.swift new file mode 100644 index 0000000..51dfca3 --- /dev/null +++ b/iOS-Assignment/Resource/Constants/Image.swift @@ -0,0 +1,26 @@ +// +// Image.swift +// iOS-Assignment +// +// Created by 김승찬 on 2021/10/28. +// + +import UIKit + +extension Const { + + struct Image { + + static let ggamju1 = UIImage(named: "ggamju1") + static let ggamju2 = UIImage(named: "ggamju2") + static let ggamju3 = UIImage(named: "ggamju3") + static let ggamju4 = UIImage(named: "ggamju4") + static let ggamju5 = UIImage(named: "ggamju5") + static let ggamju6 = UIImage(named: "ggamju7") + + static let ggamjuImageArray = [Const.Image.ggamju1, Const.Image.ggamju2, Const.Image.ggamju3, Const.Image.ggamju4, Const.Image.ggamju5, Const.Image.ggamju6] + + static let ggamjuArray = ["iOSPart", "AndroidPart", "ServerPart", "WebPart", "DesignPart", "PlanPart"] + + } +} diff --git a/iOS-Assignment/Resource/Storyboard/Base.lproj/Main.storyboard b/iOS-Assignment/Resource/Storyboard/HomeStoryboards/Base.lproj/Main.storyboard similarity index 99% rename from iOS-Assignment/Resource/Storyboard/Base.lproj/Main.storyboard rename to iOS-Assignment/Resource/Storyboard/HomeStoryboards/Base.lproj/Main.storyboard index 30a69a4..cff12fe 100644 --- a/iOS-Assignment/Resource/Storyboard/Base.lproj/Main.storyboard +++ b/iOS-Assignment/Resource/Storyboard/HomeStoryboards/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/iOS-Assignment/Resource/Storyboard/HomeStoryboards/Home.storyboard b/iOS-Assignment/Resource/Storyboard/HomeStoryboards/Home.storyboard index 38ed329..2ae526d 100644 --- a/iOS-Assignment/Resource/Storyboard/HomeStoryboards/Home.storyboard +++ b/iOS-Assignment/Resource/Storyboard/HomeStoryboards/Home.storyboard @@ -1,11 +1,12 @@ - + - + + @@ -16,25 +17,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + diff --git a/iOS-Assignment/Resource/Storyboard/SignUp.storyboard b/iOS-Assignment/Resource/Storyboard/SignUp.storyboard index 7093b17..c3958ac 100644 --- a/iOS-Assignment/Resource/Storyboard/SignUp.storyboard +++ b/iOS-Assignment/Resource/Storyboard/SignUp.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/iOS-Assignment/Source/Cell/Home/CategoryCollectionViewCell.swift b/iOS-Assignment/Source/Cell/Home/CategoryCollectionViewCell.swift new file mode 100644 index 0000000..a68c2b5 --- /dev/null +++ b/iOS-Assignment/Source/Cell/Home/CategoryCollectionViewCell.swift @@ -0,0 +1,19 @@ +// +// CategoryCollectionViewCell.swift +// iOS-Assignment +// +// Created by 김승찬 on 2021/10/28. +// + +import UIKit + +class CategoryCollectionViewCell: UICollectionViewCell { + + @IBOutlet var categoryLabel: UILabel! + static let identifier = "CategoryCollectionViewCell" + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + +} diff --git a/iOS-Assignment/Source/Cell/Home/CategoryCollectionViewCell.xib b/iOS-Assignment/Source/Cell/Home/CategoryCollectionViewCell.xib new file mode 100644 index 0000000..a545fdc --- /dev/null +++ b/iOS-Assignment/Source/Cell/Home/CategoryCollectionViewCell.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS-Assignment/Source/Cell/Home/MediaTableViewCell.swift b/iOS-Assignment/Source/Cell/Home/MediaTableViewCell.swift new file mode 100644 index 0000000..865e1aa --- /dev/null +++ b/iOS-Assignment/Source/Cell/Home/MediaTableViewCell.swift @@ -0,0 +1,29 @@ +// +// MediaTableViewCell.swift +// iOS-Assignment +// +// Created by 김승찬 on 2021/10/28. +// + +import UIKit + +class MediaTableViewCell: UITableViewCell { + + @IBOutlet var mediaImageView: UIImageView! + @IBOutlet var userImageView: UIImageView! + @IBOutlet var titleLabel: UILabel! + @IBOutlet var informationLabel: UILabel! + + static let identifier = "MediaTableViewCell" + override func awakeFromNib() { + super.awakeFromNib() + + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + + } + +} diff --git a/iOS-Assignment/Source/Cell/Home/MediaTableViewCell.xib b/iOS-Assignment/Source/Cell/Home/MediaTableViewCell.xib new file mode 100644 index 0000000..1fcebda --- /dev/null +++ b/iOS-Assignment/Source/Cell/Home/MediaTableViewCell.xib @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS-Assignment/Source/Cell/Home/StoryCollectionViewCell.swift b/iOS-Assignment/Source/Cell/Home/StoryCollectionViewCell.swift new file mode 100644 index 0000000..a3069f7 --- /dev/null +++ b/iOS-Assignment/Source/Cell/Home/StoryCollectionViewCell.swift @@ -0,0 +1,21 @@ +// +// StoryCollectionViewCell.swift +// iOS-Assignment +// +// Created by 김승찬 on 2021/10/28. +// + +import UIKit + +class StoryCollectionViewCell: UICollectionViewCell { + + static let identifier = "StoryCollectionViewCell" + + @IBOutlet var storyNameLabel: UILabel! + @IBOutlet var storyImage: UIImageView! + override func awakeFromNib() { + super.awakeFromNib() + + } + +} diff --git a/iOS-Assignment/Source/Cell/Home/StoryCollectionViewCell.xib b/iOS-Assignment/Source/Cell/Home/StoryCollectionViewCell.xib new file mode 100644 index 0000000..02c2249 --- /dev/null +++ b/iOS-Assignment/Source/Cell/Home/StoryCollectionViewCell.xib @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS-Assignment/Source/Model/Home.swift b/iOS-Assignment/Source/Model/Home.swift new file mode 100644 index 0000000..3c037c3 --- /dev/null +++ b/iOS-Assignment/Source/Model/Home.swift @@ -0,0 +1,19 @@ +// +// Home.swift +// iOS-Assignment +// +// Created by 김승찬 on 2021/10/28. +// + +import Foundation +import UIKit + +struct Story { + var mainImage: UIImage? + var title: String +} + +struct Media { + var mainTitle: String + var subTitle: String +} diff --git a/iOS-Assignment/Source/ViewController/Homes/HomeViewController.swift b/iOS-Assignment/Source/ViewController/Homes/HomeViewController.swift index cd959a8..0dfc16c 100644 --- a/iOS-Assignment/Source/ViewController/Homes/HomeViewController.swift +++ b/iOS-Assignment/Source/ViewController/Homes/HomeViewController.swift @@ -8,22 +8,115 @@ import UIKit class HomeViewController: UIViewController { - + + var story : [Story] = [] + var media : [Media] = [] + + @IBOutlet var storyCollectionView: UICollectionView! + @IBOutlet var categoryCollectionView: UICollectionView! + @IBOutlet var mediaTableView: UITableView! + override func viewDidLoad() { super.viewDidLoad() + assignDelegate() + registerXib() + setArray() + } + + private func setArray() { + story.append(contentsOf: [ + Story(mainImage: Const.Image.ggamju1 , title: "iOSPart"), + Story(mainImage: Const.Image.ggamju2, title: "AndroidPart"), + Story(mainImage: Const.Image.ggamju3, title: "ServerPart"), + Story(mainImage: Const.Image.ggamju4, title: "WebPart"), + Story(mainImage: Const.Image.ggamju5, title: "DesignPart"), + Story(mainImage: Const.Image.ggamju6, title: "PlanPart"), + ]) + + media.append(contentsOf: [ + Media(mainTitle: "1차 iOS 세미나 : iOS 컴포넌트 이해, Xcode 기본 사용법, View 화면전환", subTitle: "WE SOPT ・조회수 100만회 ・ 3주 전"), + Media(mainTitle: "2차 iOS 세미나 : AutoLayout, StackView, TabBarController", subTitle: "WE SOPT ・조회수 100만회 ・ 3주 전"), + Media(mainTitle: "3차 iOS 세미나 : ScrollView, Delegate Pattern, TableView, CollectionView", subTitle: "WE SOPT ・조회수 100만회 ・ 3주 전"), + Media(mainTitle: "4차 iOS 세미나 : Cocoapods & Networking, REST API", subTitle: "WE SOPT ・조회수 100만회 ・ 3주 전"), + Media(mainTitle: "7차 iOS 세미나 : Animation과 제스쳐, 데이터 전달 심화", subTitle: "WE SOPT ・조회수 100만회 ・ 3주 전"), + ]) + } + + private func registerXib() { + let nibName = UINib(nibName: "StoryCollectionViewCell", bundle: nil) + storyCollectionView.register(nibName, forCellWithReuseIdentifier: "StoryCollectionViewCell") + + let xibName = UINib(nibName: "MediaTableViewCell", bundle: nil) + mediaTableView.register(xibName, forCellReuseIdentifier: "MediaTableViewCell") + + let xib1Name = UINib(nibName: CategoryCollectionViewCell.identifier, bundle: nil) + categoryCollectionView.register(xib1Name, forCellWithReuseIdentifier: CategoryCollectionViewCell.identifier) + } + + private func assignDelegate() { + storyCollectionView.delegate = self + storyCollectionView.dataSource = self + mediaTableView.delegate = self + mediaTableView.dataSource = self + categoryCollectionView.delegate = self + categoryCollectionView.dataSource = self + } +} + +extension HomeViewController: UITableViewDelegate { + +} - // Do any additional setup after loading the view. +extension HomeViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return media.count + } + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = mediaTableView.dequeueReusableCell(withIdentifier: MediaTableViewCell.identifier) as? MediaTableViewCell else { return UITableViewCell()} + let row = media[indexPath.row] + + cell.titleLabel.text = row.mainTitle + cell.informationLabel.text = row.subTitle + cell.titleLabel.numberOfLines = 2 + return cell + } + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 350 } +} - /* - // MARK: - Navigation - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - // Get the new view controller using segue.destination. - // Pass the selected object to the new view controller. +extension HomeViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + if section == 0 { + return story.count + } else { + return 5 + } } - */ + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + if collectionView.tag == 0{ + if let cell = storyCollectionView.dequeueReusableCell(withReuseIdentifier: StoryCollectionViewCell.identifier, for: indexPath) as? StoryCollectionViewCell { + + let row = story[indexPath.row] + cell.storyImage.image = row.mainImage + cell.storyNameLabel.text = row.title + return cell + } + return UICollectionViewCell() + } else { + if let cell = categoryCollectionView.dequeueReusableCell(withReuseIdentifier: CategoryCollectionViewCell.identifier, for: indexPath) as? CategoryCollectionViewCell { + + return cell + } + return UICollectionViewCell() + } + } + +} +extension HomeViewController: UICollectionViewDelegate { + }