Commit 64fd0057 by Nicolas Gauna

first commit

parents
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
B1D28AB024443694007223B4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D28AAF24443694007223B4 /* AppDelegate.swift */; };
B1D28AB224443694007223B4 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D28AB124443694007223B4 /* SceneDelegate.swift */; };
B1D28AB424443694007223B4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D28AB324443694007223B4 /* ViewController.swift */; };
B1D28AB724443694007223B4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1D28AB524443694007223B4 /* Main.storyboard */; };
B1D28AB924443697007223B4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B1D28AB824443697007223B4 /* Assets.xcassets */; };
B1D28ABC24443697007223B4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1D28ABA24443697007223B4 /* LaunchScreen.storyboard */; };
B1D28AC4244436B3007223B4 /* Generala.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D28AC3244436B3007223B4 /* Generala.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
B1D28AAC24443694007223B4 /* Generala.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Generala.app; sourceTree = BUILT_PRODUCTS_DIR; };
B1D28AAF24443694007223B4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B1D28AB124443694007223B4 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
B1D28AB324443694007223B4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
B1D28AB624443694007223B4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
B1D28AB824443697007223B4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
B1D28ABB24443697007223B4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
B1D28ABD24443697007223B4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B1D28AC3244436B3007223B4 /* Generala.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Generala.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B1D28AA924443694007223B4 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B1D28AA324443694007223B4 = {
isa = PBXGroup;
children = (
B1D28AAE24443694007223B4 /* Generala */,
B1D28AAD24443694007223B4 /* Products */,
);
sourceTree = "<group>";
};
B1D28AAD24443694007223B4 /* Products */ = {
isa = PBXGroup;
children = (
B1D28AAC24443694007223B4 /* Generala.app */,
);
name = Products;
sourceTree = "<group>";
};
B1D28AAE24443694007223B4 /* Generala */ = {
isa = PBXGroup;
children = (
B1D28AAF24443694007223B4 /* AppDelegate.swift */,
B1D28AB124443694007223B4 /* SceneDelegate.swift */,
B1D28AB324443694007223B4 /* ViewController.swift */,
B1D28AB524443694007223B4 /* Main.storyboard */,
B1D28AB824443697007223B4 /* Assets.xcassets */,
B1D28ABA24443697007223B4 /* LaunchScreen.storyboard */,
B1D28ABD24443697007223B4 /* Info.plist */,
B1D28AC3244436B3007223B4 /* Generala.swift */,
);
path = Generala;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B1D28AAB24443694007223B4 /* Generala */ = {
isa = PBXNativeTarget;
buildConfigurationList = B1D28AC024443697007223B4 /* Build configuration list for PBXNativeTarget "Generala" */;
buildPhases = (
B1D28AA824443694007223B4 /* Sources */,
B1D28AA924443694007223B4 /* Frameworks */,
B1D28AAA24443694007223B4 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Generala;
productName = Generala;
productReference = B1D28AAC24443694007223B4 /* Generala.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B1D28AA424443694007223B4 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1110;
LastUpgradeCheck = 1110;
ORGANIZATIONNAME = "Nicolas Gauna";
TargetAttributes = {
B1D28AAB24443694007223B4 = {
CreatedOnToolsVersion = 11.1;
};
};
};
buildConfigurationList = B1D28AA724443694007223B4 /* Build configuration list for PBXProject "Generala" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B1D28AA324443694007223B4;
productRefGroup = B1D28AAD24443694007223B4 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B1D28AAB24443694007223B4 /* Generala */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B1D28AAA24443694007223B4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B1D28ABC24443697007223B4 /* LaunchScreen.storyboard in Resources */,
B1D28AB924443697007223B4 /* Assets.xcassets in Resources */,
B1D28AB724443694007223B4 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B1D28AA824443694007223B4 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B1D28AC4244436B3007223B4 /* Generala.swift in Sources */,
B1D28AB424443694007223B4 /* ViewController.swift in Sources */,
B1D28AB024443694007223B4 /* AppDelegate.swift in Sources */,
B1D28AB224443694007223B4 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
B1D28AB524443694007223B4 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
B1D28AB624443694007223B4 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
B1D28ABA24443697007223B4 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
B1D28ABB24443697007223B4 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
B1D28ABE24443697007223B4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
B1D28ABF24443697007223B4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
B1D28AC124443697007223B4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = Generala/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.gauna.Generala;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B1D28AC224443697007223B4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = Generala/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.gauna.Generala;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
B1D28AA724443694007223B4 /* Build configuration list for PBXProject "Generala" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B1D28ABE24443697007223B4 /* Debug */,
B1D28ABF24443697007223B4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B1D28AC024443697007223B4 /* Build configuration list for PBXNativeTarget "Generala" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B1D28AC124443697007223B4 /* Debug */,
B1D28AC224443697007223B4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B1D28AA424443694007223B4 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Generala.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Generala.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
//
// AppDelegate.swift
// Generala
//
// Created by Nicolas Gauna on 4/13/20.
// Copyright © 2020 Nicolas Gauna. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "4.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "5.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "6.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Generala" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wMq-CU-l2z">
<rect key="frame" x="220" y="318.5" width="70" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="70" id="RCG-5z-TUk"/>
<constraint firstAttribute="height" constant="30" id="TvT-nX-LGe"/>
</constraints>
<state key="normal" title="Generala"/>
<connections>
<action selector="generala:" destination="BYZ-38-t0r" eventType="touchUpInside" id="hiX-w2-0t9"/>
</connections>
</button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="1" translatesAutoresizingMaskIntoConstraints="NO" id="BpA-ig-cLT">
<rect key="frame" x="12" y="20" width="120" height="120"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="Gn4-bM-lk3"/>
<constraint firstAttribute="height" constant="120" id="x91-ao-fv8"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="2" translatesAutoresizingMaskIntoConstraints="NO" id="VSs-7l-N4u">
<rect key="frame" x="12" y="150" width="120" height="120"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="iRy-4F-Ere"/>
<constraint firstAttribute="width" constant="120" id="scK-3n-6o5"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="3" translatesAutoresizingMaskIntoConstraints="NO" id="8UD-Ya-GG0">
<rect key="frame" x="12" y="280" width="120" height="120"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="1t9-jq-Qd4"/>
<constraint firstAttribute="width" constant="120" id="MIn-Nu-qGo"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="4" translatesAutoresizingMaskIntoConstraints="NO" id="Knd-U3-co8">
<rect key="frame" x="12" y="410" width="120" height="120"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="0KQ-lV-NvA"/>
<constraint firstAttribute="width" constant="120" id="0Un-0N-y5p"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="5" translatesAutoresizingMaskIntoConstraints="NO" id="Kb6-Wj-iar">
<rect key="frame" x="12" y="540" width="120" height="120"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="EFA-ME-dOE"/>
<constraint firstAttribute="height" constant="120" id="dFK-mz-QLC"/>
</constraints>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Dados" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="sTX-uP-WDg">
<rect key="frame" x="220.5" y="283.5" width="69.5" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="eOB-Wa-DPR"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jul-6m-jM2">
<rect key="frame" x="220" y="353.5" width="70" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="9Cm-86-T8L"/>
<constraint firstAttribute="width" constant="70" id="zkz-Yc-VAC"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="8" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mNs-lP-XhF">
<rect key="frame" x="155" y="480" width="200" height="167"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="2aP-7g-eei"/>
<constraint firstAttribute="height" constant="167" id="RZ9-px-AWs"/>
</constraints>
<attributedString key="attributedText">
<fragment>
<string key="content">Ingresa el número de los en el TextFiel y presiona Generala. O de lo contrario presiona directamente Generala. Debes ingresar un número de 5 dígitos no se realizará ninguna acción.</string>
<attributes>
<font key="NSFont" metaFont="system" size="17"/>
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="Kb6-Wj-iar" firstAttribute="top" secondItem="Knd-U3-co8" secondAttribute="bottom" constant="10" id="3jJ-4b-UGv"/>
<constraint firstItem="BpA-ig-cLT" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="20" id="551-pg-dhz"/>
<constraint firstItem="wMq-CU-l2z" firstAttribute="top" secondItem="sTX-uP-WDg" secondAttribute="bottom" constant="5" id="AG2-fx-Yo4"/>
<constraint firstItem="sTX-uP-WDg" firstAttribute="centerX" secondItem="wMq-CU-l2z" secondAttribute="centerX" id="CoH-jO-Kt9"/>
<constraint firstItem="Knd-U3-co8" firstAttribute="top" secondItem="8UD-Ya-GG0" secondAttribute="bottom" constant="10" id="ECK-c6-XoP"/>
<constraint firstItem="Knd-U3-co8" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="12" id="HjA-KY-zF2"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="mNs-lP-XhF" secondAttribute="trailing" constant="20" id="N3x-IN-nTL"/>
<constraint firstItem="Jul-6m-jM2" firstAttribute="top" secondItem="wMq-CU-l2z" secondAttribute="bottom" constant="5" id="QPq-gs-hpP"/>
<constraint firstItem="Jul-6m-jM2" firstAttribute="centerX" secondItem="wMq-CU-l2z" secondAttribute="centerX" id="YQn-wm-2dN"/>
<constraint firstItem="8UD-Ya-GG0" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="12" id="hK0-wm-Sd5"/>
<constraint firstItem="8UD-Ya-GG0" firstAttribute="top" secondItem="VSs-7l-N4u" secondAttribute="bottom" constant="10" id="jt3-jR-SUd"/>
<constraint firstItem="VSs-7l-N4u" firstAttribute="top" secondItem="BpA-ig-cLT" secondAttribute="bottom" constant="10" id="lQz-cf-wyg"/>
<constraint firstItem="BpA-ig-cLT" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="12" id="pFT-o2-YDh"/>
<constraint firstItem="Kb6-Wj-iar" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="12" id="qEY-H3-eYy"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="mNs-lP-XhF" secondAttribute="bottom" constant="20" id="vJx-y3-7hQ"/>
<constraint firstItem="wMq-CU-l2z" firstAttribute="centerX" secondItem="mNs-lP-XhF" secondAttribute="centerX" id="vuh-Mn-ZWn"/>
<constraint firstItem="VSs-7l-N4u" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="12" id="y32-BL-QKm"/>
<constraint firstItem="wMq-CU-l2z" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="yMh-8w-Qwe"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="imgView1" destination="BpA-ig-cLT" id="Ft9-EE-N2Y"/>
<outlet property="imgView2" destination="VSs-7l-N4u" id="zsi-PA-i73"/>
<outlet property="imgView3" destination="8UD-Ya-GG0" id="ueB-aW-qxX"/>
<outlet property="imgView4" destination="Knd-U3-co8" id="OBu-iT-zZa"/>
<outlet property="imgView5" destination="Kb6-Wj-iar" id="d9M-vu-el5"/>
<outlet property="lblResultado" destination="Jul-6m-jM2" id="ewu-kV-M3J"/>
<outlet property="txtFieldDado" destination="sTX-uP-WDg" id="S7P-gu-6ra"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="130.40000000000001" y="138.0809595202399"/>
</scene>
</scenes>
<resources>
<image name="1" width="512" height="512"/>
<image name="2" width="512" height="512"/>
<image name="3" width="512" height="512"/>
<image name="4" width="512" height="512"/>
<image name="5" width="512" height="512"/>
</resources>
</document>
//
// Generala.swift
// Generala
//
// Created by Nicolas Gauna on 4/13/20.
// Copyright © 2020 Nicolas Gauna. All rights reserved.
//
import Foundation
class Generala { //Esta es mi clase Generala
var jugadaResultante : String = ""
func jugada(dados:String) -> String{
if(generala(dadosTirados: dados)){ jugadaResultante = "generala"}
if(poker(dadosTirados: dados)){ jugadaResultante = "poker"}
if(full(dadosTirados: dados)){ jugadaResultante = "full"}
if(escalera(dadosTirados: dados)){ jugadaResultante = "escalera" }
if(invalido(dadosTirados: dados)){ jugadaResultante = "invalido"}
if(jugadaResultante == ""){jugadaResultante = "Nada"}
return jugadaResultante
}
func generala (dadosTirados:String) -> Bool{
//1. GENERALA
//Todos los dados, con el mismo valor. Ejemplo: 55555
switch dadosTirados {
case "11111", "22222", "33333", "44444", "55555", "66666" : //Si es igual a uno de estos casos
return true //retornamos true
default:
return false //Si no es igual retornamos false
}
}
func poker(dadosTirados:String) -> Bool{
//2. PÓKER
//Cuatro dados con el mismo valor. Ejemplo: 55553
var bool : Bool = false
var vec : [Int] = [0,0,0,0,0,0,0]
for caracter in dadosTirados{
switch caracter {
case "1" : vec[1] += 1
case "2" : vec[2] += 1
case "3" : vec[3] += 1
case "4" : vec[4] += 1
case "5" : vec[5] += 1
case "6" : vec[6] += 1
default : vec[0] += 1
}
}
for i in 1...6{
if (vec[i] == 4) { bool = true }
}
return bool
}
func full(dadosTirados:String) -> Bool{
//3. FULL
//Tres dados con el mismo valor y los otros dos, de un mismo valor
//Ejemplo: 55533
var bool : Bool = false
var temp : Int
var vec : [Int] = [0,0,0,0,0,0,0]
for caracter in dadosTirados{
switch caracter {
case "1" : vec[1] += 1
case "2" : vec[2] += 1
case "3" : vec[3] += 1
case "4" : vec[4] += 1
case "5" : vec[5] += 1
case "6" : vec[6] += 1
default : vec[0] += 1
}
}
for i in 1...6{
if (vec[i] == 3) {
temp = i
for a in 1...6{
if (vec[a] == 2 && vec[a] != temp) { bool = true }
}
}
}
return bool
}
func escalera(dadosTirados:String) -> Bool{
//4. ESCALERA
//Los dados, en secuencia:
// a) 12345
// b) 23456
// c) 34561
let dado = String(dadosTirados.sorted())
switch dado {
case "12345", "23456", "34561", "45612","56123", "61234" :
return true
default:
return false
}
}
func invalido(dadosTirados:String) -> Bool{
//6. INVALIDO
//Hay algún valor inválido en los dados ingresados.
var bool : Bool = false
for caracter in dadosTirados{
if (caracter > "6") { bool = true } else {bool = false}
}
return bool
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// SceneDelegate.swift
// Generala
//
// Created by Nicolas Gauna on 4/13/20.
// Copyright © 2020 Nicolas Gauna. All rights reserved.
//
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}
//
// ViewController.swift
// Generala
//
// Created by Nicolas Gauna on 4/13/20.
// Copyright © 2020 Nicolas Gauna. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var imgView1: UIImageView!
@IBOutlet weak var imgView2: UIImageView!
@IBOutlet weak var imgView3: UIImageView!
@IBOutlet weak var imgView4: UIImageView!
@IBOutlet weak var imgView5: UIImageView!
@IBOutlet weak var lblResultado: UILabel!
@IBOutlet weak var txtFieldDado: UITextField!
var resultadoDado: String = ""
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
func aleatorio()->String{
var rand = 0
while (rand == 0) {
rand = Int(arc4random_uniform(6)) // numero random en base a 10
//let rand2 = Int(arc4random()) // numero random
}
return String(rand)
}
@IBAction func generala(_ sender: Any) {
var numerosParaLasImagenes = ["","","","",""]
if (txtFieldDado.text == "" || txtFieldDado.text == resultadoDado){
txtFieldDado.text = ""
for i in 0...4{
let numeroAleatorio = aleatorio()
txtFieldDado.text?.append(numeroAleatorio)
numerosParaLasImagenes[i] = numeroAleatorio
}
} else {
var cont = 0
var cont2 = ["","","","",""]
if(txtFieldDado.text!.count > 5 || txtFieldDado.text!.count < 5){
lblResultado.text = ""
return
}
for caracter in txtFieldDado.text!{
cont2[cont] = String(caracter)
cont += 1
}
for i in 0...4{ numerosParaLasImagenes[i] = cont2[i]}
}
imgView1.image = UIImage(named: "\(numerosParaLasImagenes[0]).jpg")
imgView2.image = UIImage(named: "\(numerosParaLasImagenes[1]).jpg")
imgView3.image = UIImage(named: "\(numerosParaLasImagenes[2]).jpg")
imgView4.image = UIImage(named: "\(numerosParaLasImagenes[3]).jpg")
imgView5.image = UIImage(named: "\(numerosParaLasImagenes[4]).jpg")
resultadoDado = String(txtFieldDado.text!)
let generala = Generala()
let tipoJugada = generala.jugada(dados: resultadoDado)
lblResultado.text = tipoJugada
print("\(resultadoDado) - \(tipoJugada)")
}
}
File added
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