Add TopBar and icons

Menu
Emre KARTAL 2 years ago
parent b1d2460298
commit ece9804034

Binary file not shown.

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92EC57B2ABADA2800CCD30E /* CoinCounterView.swift */; };
D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D632AB9D017007A6B4D /* AllInApp.swift */; };
D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D652AB9D017007A6B4D /* ContentView.swift */; };
D98C4D682AB9D018007A6B4D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D98C4D672AB9D018007A6B4D /* Assets.xcassets */; };
@ -35,6 +36,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
D92EC57B2ABADA2800CCD30E /* CoinCounterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CoinCounterView.swift; path = allin/Views/CoinCounterView.swift; sourceTree = SOURCE_ROOT; };
D98C4D602AB9D017007A6B4D /* AllIn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AllIn.app; sourceTree = BUILT_PRODUCTS_DIR; };
D98C4D632AB9D017007A6B4D /* AllInApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInApp.swift; sourceTree = "<group>"; };
D98C4D652AB9D017007A6B4D /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@ -73,6 +75,15 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D92EC5782ABAC6B900CCD30E /* Views */ = {
isa = PBXGroup;
children = (
D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */,
D92EC57B2ABADA2800CCD30E /* CoinCounterView.swift */,
);
path = Views;
sourceTree = "<group>";
};
D98C4D572AB9D017007A6B4D = {
isa = PBXGroup;
children = (
@ -96,9 +107,9 @@
D98C4D622AB9D017007A6B4D /* AllIn */ = {
isa = PBXGroup;
children = (
D92EC5782ABAC6B900CCD30E /* Views */,
D98C4D632AB9D017007A6B4D /* AllInApp.swift */,
D98C4D652AB9D017007A6B4D /* ContentView.swift */,
D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */,
D98C4D672AB9D018007A6B4D /* Assets.xcassets */,
D98C4D692AB9D018007A6B4D /* Preview Content */,
);
@ -209,7 +220,7 @@
};
};
};
buildConfigurationList = D98C4D5B2AB9D017007A6B4D /* Build configuration list for PBXProject "AllIn" */;
buildConfigurationList = D98C4D5B2AB9D017007A6B4D /* Build configuration list for PBXProject "allin" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
@ -261,6 +272,7 @@
buildActionMask = 2147483647;
files = (
D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */,
D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */,
D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */,
D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */,
);
@ -544,7 +556,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D98C4D5B2AB9D017007A6B4D /* Build configuration list for PBXProject "AllIn" */ = {
D98C4D5B2AB9D017007A6B4D /* Build configuration list for PBXProject "allin" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D98C4D822AB9D019007A6B4D /* Debug */,

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@ -1,6 +1,7 @@
{
"images" : [
{
"filename" : "Group 108.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Group 2-2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@ -10,16 +10,9 @@ import SwiftUI
struct ContentView: View {
var body: some View {
VStack(alignment: .leading) {
GradientRectangle()
TopBarView()
}
.edgesIgnoringSafeArea(.top)
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
}
.padding()
}
}

@ -1,19 +0,0 @@
//
// TopBarView.swift
// AllIn
//
// Created by Emre KARTAL on 19/09/2023.
//
import SwiftUI
struct GradientRectangle: View {
var body: some View {
GeometryReader { geometry in
Rectangle()
.fill(LinearGradient(gradient: Gradient(colors: [Color.blue, Color.red]), startPoint: .leading, endPoint: .trailing))
.frame(width: geometry.size.width, height: geometry.size.height * 0.1)
.clipped()
}
}
}

@ -0,0 +1,23 @@
//
// CoinCounter.swift
// AllIn
//
// Created by Emre KARTAL on 20/09/2023.
//
import SwiftUI
struct CoinCounterView: View {
var body: some View {
HStack() {
Image("AllCoinsIcon")
.resizable()
.frame(width: 25, height: 25, alignment: .leading)
Text("541")
}
.frame(width: 50, height: 120)
.background(Color.white)
}
}

@ -0,0 +1,27 @@
//
// TopBarView.swift
// AllIn
//
// Created by Emre KARTAL on 19/09/2023.
//
import SwiftUI
struct TopBarView: View {
var body: some View {
let TopBarColorPink = Color(red: 249/255, green: 81/255, blue: 168/255)
let TopBarColorBlue = Color(red: 25/255, green: 159/255, blue: 238/255)
let TopBarColorPurple = Color(red: 170/255, green: 126/255, blue: 243/255)
GeometryReader { geometry in
HStack() {
Image("Icon")
.resizable()
.frame(width: 45, height: 45, alignment: .bottom)
}
.frame(width: geometry.size.width, height: 120)
.background(LinearGradient(gradient:
Gradient(colors:[TopBarColorPink,TopBarColorPurple,TopBarColorBlue]),
startPoint: .bottomLeading, endPoint: .topTrailing))
}
}
}
Loading…
Cancel
Save