Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Converted by Storyboard to SwiftUI Converter - https://objectivec2swift.com/#/converter/storyboard2swiftui
- import SwiftUI
- // --------------------------------------------------------------------------------
- // MainMenuViewController
- // --------------------------------------------------------------------------------
- struct MainMenuView: View {
- var body: some View {
- GeometryReader { geometry in
- ZStack(alignment: .topLeading) {
- Button(action: {}) {
- Text("PLAY")
- .frame(width: 264, height: 54, alignment: .center)
- }
- .aspectRatio(contentMode: .fill)
- .clipped()
- .font(.custom("HelveticaNeue-Light", size: 35))
- .offset(x: 55, y: 276)
- GetAttributedString()
- .offset(x: 50, y: 103)
- .frame(width: 275, height: 54)
- }
- .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .topLeading)
- }
- }
- }
- struct GetAttributedString: View {
- var body: some View {
- Text("Tap")
- .foregroundColor(Color(red: 1.0, green: 0.2784314, blue: 0.101960786))
- .font(.custom("HelveticaNeue-Medium", size: 45))
- + Text(" ")
- .font(.custom("HelveticaNeue-Medium", size: 45))
- + Text("Tap")
- .foregroundColor(Color(red: 0.0, green: 0.8, blue: 0.4))
- .font(.custom("HelveticaNeue-Medium", size: 45))
- + Text(" ")
- .font(.custom("HelveticaNeue-Medium", size: 45))
- + Text("Too")
- .foregroundColor(Color(red: 0.0, green: 0.4, blue: 0.8))
- .font(.custom("HelveticaNeue-Medium", size: 45))
- }
- }
- struct MainMenuView_Previews: PreviewProvider {
- static var previews: some View {
- MainMenuView()
- }
- }
- // --------------------------------------------------------------------------------
- // InGameViewController
- // --------------------------------------------------------------------------------
- struct InGameView: View {
- var body: some View {
- GeometryReader { geometry in
- ZStack(alignment: .topLeading) {
- Button(action: {
- //tap()
- }) {
- Text("Button 1\nTest").frame(width: 375, height: 310, alignment: .topLeading)
- }
- .aspectRatio(contentMode: .fill)
- .foregroundColor(Color(red: 0.5738505, green: 1.0, blue: 0.19474524))
- .background(Color(red: 1.0, green: 0.2784314, blue: 0.101960786, opacity: 0.75))
- .accentColor(Color(red: 0.63529414, green: 0.5176471, blue: 0.36862746))
- Button(action: {
- //tap()
- }) {
- Text(" MARK: - 👉 ARSCNViewDelegate").frame(width: 375, height: 310)
- }
- .aspectRatio(contentMode: .fill)
- .background(Color(red: 0.0, green: 0.8, blue: 0.4, opacity: 0.75))
- .offset(x: 0, y: 357)
- Text("Label")
- .font(.custom("HelveticaNeue-Light", size: 17))
- .multilineTextAlignment(.trailing)
- .accentColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
- .offset(x: 16, y: 319)
- .frame(width: 83, height: 31)
- Text("Label")
- .font(.custom("HelveticaNeue-Light", size: 17))
- .multilineTextAlignment(.trailing)
- .offset(x: 276, y: 318)
- .frame(width: 83, height: 31)
- Text("0")
- .font(.custom("HelveticaNeue-Light", size: 17))
- .offset(x: 106, y: 319)
- .frame(width: 69, height: 31)
- Text(":")
- .font(.custom("HelveticaNeue-Light", size: 17))
- .offset(x: 184, y: 323)
- .frame(width: 7, height: 21)
- Text("0")
- .font(.custom("HelveticaNeue-Light", size: 17))
- .offset(x: 199, y: 318)
- .frame(width: 69, height: 31)
- Text("61")
- .font(.title)
- .multilineTextAlignment(.center)
- .foregroundColor(Color(white: 1.0))
- .offset(x: 0, y: 358)
- .frame(width: 375, height: 40)
- Text("60")
- .font(.custom("HelveticaNeue", size: 25))
- .multilineTextAlignment(.center)
- .foregroundColor(Color(white: 1.0))
- .offset(x: 0, y: 270)
- .frame(width: 375, height: 40)
- }
- .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .topLeading)
- }
- }
- }
- struct InGameView_Previews: PreviewProvider {
- static var previews: some View {
- InGameView()
- }
- }
Add Comment
Please, Sign In to add comment