Commit 2b7a6881 authored by Elias Häußler's avatar Elias Häußler 🐛

[TASK] Fix Compiler errors

parent 968e487d
......@@ -404,7 +404,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.elias-haeussler.MultiConvert";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
......@@ -420,7 +420,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.elias-haeussler.MultiConvert";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="h0w-tB-SAA">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="h0w-tB-SAA">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
......@@ -30,7 +30,7 @@
<action selector="navRefreshPressed:" destination="IuA-z7-Pg0" id="lTO-WW-7c7"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" systemItem="add" id="mbq-PA-hau">
<barButtonItem key="rightBarButtonItem" largeContentSizeImage="Conversion" systemItem="add" id="mbq-PA-hau">
<connections>
<action selector="navAddPressed:" destination="IuA-z7-Pg0" id="wfO-T4-Fnx"/>
</connections>
......@@ -39,11 +39,11 @@
</items>
</navigationBar>
<searchBar contentMode="scaleToFill" placeholder="QuickConvert (e.g. 62.99 GBP USD)" translatesAutoresizingMaskIntoConstraints="NO" id="Pax-Pm-A2y">
<rect key="frame" x="0.0" y="64" width="375" height="44"/>
<rect key="frame" x="0.0" y="64" width="375" height="56"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" returnKeyType="done"/>
</searchBar>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="b9P-rQ-1kF">
<rect key="frame" x="0.0" y="108" width="375" height="510"/>
<rect key="frame" x="0.0" y="120" width="375" height="498"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<inset key="separatorInset" minX="15" minY="0.0" maxX="15" maxY="0.0"/>
<prototypes>
......@@ -79,10 +79,10 @@
<sections/>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JBi-O6-iq3">
<rect key="frame" x="0.0" y="108" width="375" height="510"/>
<rect key="frame" x="0.0" y="120" width="375" height="498"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DrH-9p-eqt">
<rect key="frame" x="0.0" y="0.0" width="375" height="510"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="498"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OQw-jF-vw8">
<rect key="frame" x="0.0" y="0.0" width="375" height="484"/>
......
......@@ -89,26 +89,28 @@ class MainViewController: UIViewController, UISearchBarDelegate, UITableViewDele
hideLoad(animated: false, completion:
{
// Instantiate activity indicator view
let indicator = UIActivityIndicatorView(activityIndicatorStyle: .gray)
indicator.isUserInteractionEnabled = false
indicator.startAnimating()
// Instantiate alert controller
self.alert = self.alert(title: "Updating exchange rates...", message: "Please wait a moment.", actions: nil, show: false)
// Instantiate view controller
let customVC = UIViewController()
customVC.view.addSubview(indicator)
// Set constraints
customVC.view.addConstraint(NSLayoutConstraint(item: indicator, attribute: .centerX, relatedBy: .equal, toItem: customVC.view, attribute: .centerX, multiplier: 1, constant: 0))
customVC.view.addConstraint(NSLayoutConstraint(item: indicator, attribute: .centerY, relatedBy: .equal, toItem: customVC.view, attribute: .centerY, multiplier: 1, constant: 0))
// Set view controller for alert controller
self.alert?.setValue(customVC, forKey: "contentViewController")
// Show alert controller
self.present(self.alert!, animated: true, completion: nil)
DispatchQueue.main.async {
let indicator = UIActivityIndicatorView(activityIndicatorStyle: .gray)
indicator.isUserInteractionEnabled = false
indicator.startAnimating()
// Instantiate alert controller
self.alert = self.alert(title: "Updating exchange rates...", message: "Please wait a moment.", actions: nil, show: false)
// Instantiate view controller
let customVC = UIViewController()
customVC.view.addSubview(indicator)
// Set constraints
customVC.view.addConstraint(NSLayoutConstraint(item: indicator, attribute: .centerX, relatedBy: .equal, toItem: customVC.view, attribute: .centerX, multiplier: 1, constant: 0))
customVC.view.addConstraint(NSLayoutConstraint(item: indicator, attribute: .centerY, relatedBy: .equal, toItem: customVC.view, attribute: .centerY, multiplier: 1, constant: 0))
// Set view controller for alert controller
self.alert?.setValue(customVC, forKey: "contentViewController")
// Show alert controller
self.present(self.alert!, animated: true, completion: nil)
}
})
}
......
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