Skip to content
Snippets Groups Projects
Commit 8de8ded7 authored by Ufuk Tugay's avatar Ufuk Tugay
Browse files

Added Navition Controller

parent 50331b6d
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
291C32C0267B6A3600A7A0D3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 291C32BF267B6A3600A7A0D3 /* Assets.xcassets */; };
291C32C3267B6A3600A7A0D3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 291C32C1267B6A3600A7A0D3 /* LaunchScreen.storyboard */; };
291C32CB267B6DD800A7A0D3 /* StartScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291C32CA267B6DD800A7A0D3 /* StartScreen.swift */; };
2998FFAE267CD58600ABD190 /* ObjectDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2998FFAD267CD58600ABD190 /* ObjectDetector.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
......@@ -26,6 +27,7 @@
291C32C2267B6A3600A7A0D3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
291C32C4267B6A3600A7A0D3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
291C32CA267B6DD800A7A0D3 /* StartScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartScreen.swift; sourceTree = "<group>"; };
2998FFAD267CD58600ABD190 /* ObjectDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObjectDetector.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -63,6 +65,7 @@
291C32BA267B6A3400A7A0D3 /* ViewController.swift */,
291C32CA267B6DD800A7A0D3 /* StartScreen.swift */,
291C32BC267B6A3400A7A0D3 /* Main.storyboard */,
2998FFAD267CD58600ABD190 /* ObjectDetector.swift */,
291C32BF267B6A3600A7A0D3 /* Assets.xcassets */,
291C32C1267B6A3600A7A0D3 /* LaunchScreen.storyboard */,
291C32C4267B6A3600A7A0D3 /* Info.plist */,
......@@ -141,6 +144,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2998FFAE267CD58600ABD190 /* ObjectDetector.swift in Sources */,
291C32BB267B6A3400A7A0D3 /* ViewController.swift in Sources */,
291C32B7267B6A3400A7A0D3 /* AppDelegate.swift in Sources */,
291C32CB267B6DD800A7A0D3 /* StartScreen.swift in Sources */,
......
......@@ -14,8 +14,8 @@
filePath = "Objekterkennung in AR mit ARKit und CoreML/ViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "11"
endingLineNumber = "11"
startingLineNumber = "19"
endingLineNumber = "19"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="JYM-oL-gHR">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="tzj-kJ-pWl">
<device id="ipad10_5" orientation="portrait" layout="fullscreen" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
......@@ -17,26 +17,32 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gZn-ez-RhR">
<rect key="frame" x="0.0" y="0.0" width="834" height="1112"/>
<rect key="frame" x="0.0" y="50" width="834" height="1062"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DKE-En-LAf">
<rect key="frame" x="372" y="262" width="253" height="81"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" id="DKE-En-LAf">
<rect key="frame" x="0.0" y="482" width="834" height="98"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="TransitionToARView1"/>
<state key="normal" title="TransitionToARView1">
<color key="titleColor" systemColor="linkColor"/>
</state>
<connections>
<segue destination="BV1-FR-VrT" kind="presentation" modalPresentationStyle="fullScreen" id="iY2-FR-de1"/>
<segue destination="BV1-FR-VrT" kind="show" id="iY2-FR-de1"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="834" id="hNV-D8-tFo"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="sSH-U5-j3N"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="gZn-ez-RhR" firstAttribute="top" secondItem="sSH-U5-j3N" secondAttribute="top" id="LJh-7f-3fH"/>
<constraint firstItem="gZn-ez-RhR" firstAttribute="trailing" secondItem="sSH-U5-j3N" secondAttribute="trailing" id="P47-mh-cmK"/>
<constraint firstItem="gZn-ez-RhR" firstAttribute="bottom" secondItem="sSH-U5-j3N" secondAttribute="bottom" id="RGA-69-VVT"/>
<constraint firstItem="gZn-ez-RhR" firstAttribute="trailing" secondItem="sSH-U5-j3N" secondAttribute="trailing" id="Ujw-Zs-bmI"/>
<constraint firstItem="gZn-ez-RhR" firstAttribute="bottom" secondItem="sSH-U5-j3N" secondAttribute="bottom" id="khg-6d-3wG"/>
<constraint firstItem="gZn-ez-RhR" firstAttribute="top" secondItem="sSH-U5-j3N" secondAttribute="top" id="jlP-tO-owA"/>
<constraint firstItem="gZn-ez-RhR" firstAttribute="leading" secondItem="sSH-U5-j3N" secondAttribute="leading" id="kxj-NO-8eW"/>
</constraints>
</view>
......@@ -44,7 +50,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yC0-Lw-OcD" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="78.417266187050359" y="17.805755395683455"/>
<point key="canvasLocation" x="774.8201438848921" y="17.805755395683455"/>
</scene>
<!--View Controller-->
<scene sceneID="tXr-a1-R10">
......@@ -55,14 +61,14 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<arscnView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BrB-h1-WRS">
<rect key="frame" x="0.0" y="0.0" width="834" height="1112"/>
<rect key="frame" x="0.0" y="50" width="834" height="1062"/>
</arscnView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c0q-pK-UW8">
<rect key="frame" x="180" y="622" width="88" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="BackToMenu"/>
<connections>
<segue destination="JYM-oL-gHR" kind="presentation" modalPresentationStyle="fullScreen" id="cDN-nb-bA1"/>
<segue destination="tzj-kJ-pWl" kind="presentation" modalPresentationStyle="fullScreen" id="cDN-nb-bA1"/>
</connections>
</button>
</subviews>
......@@ -91,10 +97,31 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SZV-WD-TEh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="709" y="18"/>
<point key="canvasLocation" x="1461.1510791366907" y="17.805755395683455"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="VZm-xT-bd3">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="tzj-kJ-pWl" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="ygi-Hp-IVY">
<rect key="frame" x="0.0" y="0.0" width="834" height="50"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="JYM-oL-gHR" kind="relationship" relationship="rootViewController" id="J6g-2N-d9H"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fMH-NS-7Vk" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="78.417266187050359" y="17.805755395683455"/>
</scene>
</scenes>
<resources>
<systemColor name="linkColor">
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......
//
// ObjectDetector.swift
// Objekterkennung in AR mit ARKit und CoreML
//
// Created by Ufuk Kaan on 18.06.21.
//
import Foundation
func ObjectDetector(){
print("test")
}
......@@ -8,31 +8,36 @@
import UIKit
import SceneKit
import ARKit
import SwiftUI
class ViewController: UIViewController, ARSCNViewDelegate {
class MenuController: UIViewController{
@IBOutlet var MenuView: UIView!
@IBOutlet var BackToMenu: UIButton!
@IBOutlet var ButtonToFirstARScene: UIButton!
}
class ViewController: UIViewController, ARSCNViewDelegate {
@IBOutlet var sceneView: ARSCNView!
@IBOutlet var BackToMenu: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Set the view's delegate
sceneView.delegate = self
// Show statistics such as fps and timing information
sceneView.showsStatistics = true
// Create a new scene
let scene = SCNScene(named: "art.scnassets/ship.scn")!
// Set the scene to the view
sceneView.scene = scene
}
override func viewWillAppear(_ animated: Bool) {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// Create a session configuration
......@@ -45,6 +50,7 @@ class ViewController: UIViewController, ARSCNViewDelegate {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
ObjectDetector()
// Pause the view's session
sceneView.session.pause()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment