Commit 8c562fe7 authored by 12579710's avatar 12579710
Browse files

Add new file

parent 9026b80b
//
// ContentView.swift
// app stuff
//
// Created by Tanya Xaybounheuang on 13/10/20.
// Copyright © 2020 Tanya Xaybounheuang. All rights reserved.
//
import SwiftUI
struct ImageOverlay: View {
@State var username: String = ""
var body: some View {
VStack() {
Text("365 Story")
.font(.title)
.fontWeight(.heavy)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:500, maxHeight:10)
.padding(.vertical, 10)
Text("@TX1998 posted a picture!")
.font(.title)
.fontWeight(.heavy)
.foregroundColor(Color.white)
.multilineTextAlignment(.leading)
.frame(maxWidth:500,maxHeight:100)
.padding(.top, 10.0)
Image("giraffe")
.resizable()
.frame(maxWidth:300, maxHeight:350)
Button(action: /*@START_MENU_TOKEN@*/{}/*@END_MENU_TOKEN@*/) {
Text("Upvote")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:150,maxHeight:50)
.lineLimit(2)}
Text("325 people upvoted")
.font(.body)
.fontWeight(.heavy)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:200,maxHeight:60)
.lineLimit(2)
Text("@TX1998: This photo was taken a couple of days ago in the safari. #wildlife #wildlifephototgraphy #safari #giraffe #wildlifephotographers ... ")
.font(.body)
.fontWeight(.regular)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.lineLimit(10)
.frame(width: 315.0)
TextField("Write comment...", text: $username, onEditingChanged: { (changed) in
print("Username onEditingChanged - \(changed)")
})
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],10)
.foregroundColor(Color.white)
.brightness(1.5)
}
}
}
struct ContentView: View {
@State private var selection = 0
var body: some View {
TabView(selection: $selection){
Image("firstpage")
.resizable()
.frame(width: 500, height: 900)
.scaledToFill()
.overlay(ImageOverlay(), alignment: .center)
.aspectRatio(contentMode: .fill)
.tabItem {
VStack {
Image("first")
Text("Home")
}
}
.tag(0)
Text("Tanya")
.font(.title)
.fontWeight(.heavy)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.padding(.bottom, 700.0)
.frame(maxWidth:900, maxHeight:1000)
.background(Color(red: 1.3, green: 0.8, blue: 0.6, opacity: 0.4))
.tabItem {
VStack {
Image("first")
Text("My Profile")
}
}
.tag(1)
VStack {
Text("Activity")
.font(.title)
.fontWeight(.heavy)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.padding(.bottom, 700.0)
.frame(maxWidth:900, maxHeight:1100)
.background(Color(red: 1.3, green: 0.8, blue: 0.6, opacity: 0.4))
}
.tabItem {
VStack {
Image("first")
Text("Notifications")
}
}
.tag(1)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment