Skip to content

Commit 4fcb86e

Browse files
committed
Initial Commit
1 parent c652de3 commit 4fcb86e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+124
-100
lines changed

Diff for: Banner.png

21.7 KB

Diff for: ImageSlider.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
C1726FFB26C7058A000A65DD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1726FFA26C7058A000A65DD /* ContentView.swift */; };
1212
C1726FFD26C7058C000A65DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C1726FFC26C7058C000A65DD /* Assets.xcassets */; };
1313
C172700026C7058C000A65DD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C1726FFF26C7058C000A65DD /* Preview Assets.xcassets */; };
14+
C172700826C7059A000A65DD /* ImageSliderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C172700726C7059A000A65DD /* ImageSliderView.swift */; };
1415
/* End PBXBuildFile section */
1516

1617
/* Begin PBXFileReference section */
@@ -20,6 +21,7 @@
2021
C1726FFC26C7058C000A65DD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2122
C1726FFF26C7058C000A65DD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
2223
C172700126C7058C000A65DD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
24+
C172700726C7059A000A65DD /* ImageSliderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSliderView.swift; sourceTree = "<group>"; };
2325
/* End PBXFileReference section */
2426

2527
/* Begin PBXFrameworksBuildPhase section */
@@ -53,6 +55,7 @@
5355
isa = PBXGroup;
5456
children = (
5557
C1726FF826C7058A000A65DD /* ImageSliderApp.swift */,
58+
C172700726C7059A000A65DD /* ImageSliderView.swift */,
5659
C1726FFA26C7058A000A65DD /* ContentView.swift */,
5760
C1726FFC26C7058C000A65DD /* Assets.xcassets */,
5861
C172700126C7058C000A65DD /* Info.plist */,
@@ -138,6 +141,7 @@
138141
isa = PBXSourcesBuildPhase;
139142
buildActionMask = 2147483647;
140143
files = (
144+
C172700826C7059A000A65DD /* ImageSliderView.swift in Sources */,
141145
C1726FFB26C7058A000A65DD /* ContentView.swift in Sources */,
142146
C1726FF926C7058A000A65DD /* ImageSliderApp.swift in Sources */,
143147
);

Diff for: ImageSlider/Assets.xcassets/1.imageset/1.jpg

50 KB

Diff for: ImageSlider/Assets.xcassets/1.imageset/Contents.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "1.jpg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}

Diff for: ImageSlider/Assets.xcassets/2.imageset/2.jpg

42.8 KB

Diff for: ImageSlider/Assets.xcassets/2.imageset/Contents.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "2.jpg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}

Diff for: ImageSlider/Assets.xcassets/3.imageset/3.jpg

43.6 KB

Diff for: ImageSlider/Assets.xcassets/3.imageset/Contents.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "3.jpg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}

Diff for: ImageSlider/Assets.xcassets/4.imageset/4.jpg

77.4 KB

Diff for: ImageSlider/Assets.xcassets/4.imageset/Contents.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "4.jpg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
1.42 KB
49.8 KB
1.63 KB
1.81 KB
2.05 KB
2.38 KB
2.66 KB
274 Bytes
2.96 KB
3.02 KB
3.19 KB
3.8 KB
293 Bytes
4.31 KB
5.44 KB
371 Bytes
441 Bytes
447 Bytes
693 Bytes
750 Bytes
16.5 KB
724 Bytes
780 Bytes
798 Bytes
843 Bytes
888 Bytes
983 Bytes
1.02 KB
1003 Bytes
1.2 KB
1.24 KB
+1-98
Original file line numberDiff line numberDiff line change
@@ -1,98 +1 @@
1-
{
2-
"images" : [
3-
{
4-
"idiom" : "iphone",
5-
"scale" : "2x",
6-
"size" : "20x20"
7-
},
8-
{
9-
"idiom" : "iphone",
10-
"scale" : "3x",
11-
"size" : "20x20"
12-
},
13-
{
14-
"idiom" : "iphone",
15-
"scale" : "2x",
16-
"size" : "29x29"
17-
},
18-
{
19-
"idiom" : "iphone",
20-
"scale" : "3x",
21-
"size" : "29x29"
22-
},
23-
{
24-
"idiom" : "iphone",
25-
"scale" : "2x",
26-
"size" : "40x40"
27-
},
28-
{
29-
"idiom" : "iphone",
30-
"scale" : "3x",
31-
"size" : "40x40"
32-
},
33-
{
34-
"idiom" : "iphone",
35-
"scale" : "2x",
36-
"size" : "60x60"
37-
},
38-
{
39-
"idiom" : "iphone",
40-
"scale" : "3x",
41-
"size" : "60x60"
42-
},
43-
{
44-
"idiom" : "ipad",
45-
"scale" : "1x",
46-
"size" : "20x20"
47-
},
48-
{
49-
"idiom" : "ipad",
50-
"scale" : "2x",
51-
"size" : "20x20"
52-
},
53-
{
54-
"idiom" : "ipad",
55-
"scale" : "1x",
56-
"size" : "29x29"
57-
},
58-
{
59-
"idiom" : "ipad",
60-
"scale" : "2x",
61-
"size" : "29x29"
62-
},
63-
{
64-
"idiom" : "ipad",
65-
"scale" : "1x",
66-
"size" : "40x40"
67-
},
68-
{
69-
"idiom" : "ipad",
70-
"scale" : "2x",
71-
"size" : "40x40"
72-
},
73-
{
74-
"idiom" : "ipad",
75-
"scale" : "1x",
76-
"size" : "76x76"
77-
},
78-
{
79-
"idiom" : "ipad",
80-
"scale" : "2x",
81-
"size" : "76x76"
82-
},
83-
{
84-
"idiom" : "ipad",
85-
"scale" : "2x",
86-
"size" : "83.5x83.5"
87-
},
88-
{
89-
"idiom" : "ios-marketing",
90-
"scale" : "1x",
91-
"size" : "1024x1024"
92-
}
93-
],
94-
"info" : {
95-
"author" : "xcode",
96-
"version" : 1
97-
}
98-
}
1+
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"idiom":"watch","filename":"172.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"38mm","scale":"2x","size":"86x86","expected-size":"172","role":"quickLook"},{"idiom":"watch","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"38mm","scale":"2x","size":"40x40","expected-size":"80","role":"appLauncher"},{"idiom":"watch","filename":"88.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"40mm","scale":"2x","size":"44x44","expected-size":"88","role":"appLauncher"},{"idiom":"watch","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"44mm","scale":"2x","size":"50x50","expected-size":"100","role":"appLauncher"},{"idiom":"watch","filename":"196.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"42mm","scale":"2x","size":"98x98","expected-size":"196","role":"quickLook"},{"idiom":"watch","filename":"216.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"44mm","scale":"2x","size":"108x108","expected-size":"216","role":"quickLook"},{"idiom":"watch","filename":"48.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"38mm","scale":"2x","size":"24x24","expected-size":"48","role":"notificationCenter"},{"idiom":"watch","filename":"55.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"42mm","scale":"2x","size":"27.5x27.5","expected-size":"55","role":"notificationCenter"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"watch","role":"companionSettings","scale":"3x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"watch","role":"companionSettings","scale":"2x"},{"size":"1024x1024","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"watch-marketing","scale":"1x"},{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]}

Diff for: ImageSlider/ContentView.swift

+12-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ import SwiftUI
99

1010
struct ContentView: View {
1111
var body: some View {
12-
Text("Hello, world!")
13-
.padding()
12+
13+
// 1
14+
NavigationView {
15+
// 2
16+
List {
17+
ImageSlider()
18+
.frame(height: 300)
19+
.listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
20+
} //: List
21+
.navigationBarTitle("Image Slider", displayMode: .large)
22+
} //: Navigation View
1423
}
24+
1525
}
1626

1727
struct ContentView_Previews: PreviewProvider {

Diff for: ImageSlider/ImageSliderView.swift

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// ImageSliderView.swift
3+
// ImageSlider
4+
//
5+
// Created by Mahdi Mahjoobi on 8/14/21.
6+
//
7+
8+
import SwiftUI
9+
10+
struct ImageSlider: View {
11+
12+
private let images = ["1", "2", "3", "4"]
13+
14+
var body: some View {
15+
TabView {
16+
ForEach(images, id: \.self) { item in
17+
Image(item)
18+
.resizable()
19+
.scaledToFill()
20+
}
21+
}
22+
.tabViewStyle(PageTabViewStyle())
23+
}
24+
}
25+
26+
struct ImageSlider_Previews: PreviewProvider {
27+
static var previews: some View {
28+
ImageSlider()
29+
.previewLayout(.fixed(width: 400, height: 300))
30+
}
31+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Mahdi Mahjoobi
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+7

0 commit comments

Comments
 (0)