Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fixed styling issues for iOS Generic app

Michael Rademaker16e1672ebc17
diff --git a/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj b/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj
index 7bb47d8c6..e9ca907ea 100644
--- a/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj
+++ b/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj
@@ -614,7 +614,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GenericApp/OpenRemote.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 20;
+ CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 4AC88KZHJZ;
ENABLE_PREVIEWS = YES;
@@ -639,7 +639,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GenericApp/OpenRemote.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 20;
+ CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 4AC88KZHJZ;
ENABLE_PREVIEWS = YES;
@@ -662,7 +662,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 20;
+ CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_TEAM = 4AC88KZHJZ;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -685,7 +685,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 20;
+ CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_TEAM = 4AC88KZHJZ;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/Contents.json
index 3663ba557..de8dddef8 100644
--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/Contents.json
+++ b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/Contents.json
@@ -9,7 +9,7 @@
"scale" : "2x"
},
{
- "filename" : "menu_ic.png",
+ "filename" : "menu.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/menu.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/menu.png
new file mode 100644
index 000000000..401015ea7
Binary files /dev/null and b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/menu.png differ
diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/menu_ic.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/menu_ic.png
deleted file mode 100644
index 32d1c1245..000000000
Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_menu.imageset/menu_ic.png and /dev/null differ
diff --git a/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboard b/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboard
index e52820446..93fa46f89 100644
--- a/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboard
+++ b/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboard
@@ -3,7 +3,7 @@
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -16,21 +16,8 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="or_splash" translatesAutoresizingMaskIntoConstraints="NO" id="fI1-QA-sUs">
- <rect key="frame" x="87" y="328" width="240" height="240"/>
- <constraints>
- <constraint firstAttribute="height" constant="240" id="J3b-kj-bPA"/>
- <constraint firstAttribute="width" constant="240" id="K03-31-hxl"/>
- </constraints>
- </imageView>
- </subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
- <constraints>
- <constraint firstItem="fI1-QA-sUs" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="35d-6S-AZA"/>
- <constraint firstItem="fI1-QA-sUs" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="jpP-ab-84p"/>
- </constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -39,7 +26,6 @@
</scene>
</scenes>
<resources>
- <image name="or_splash" width="1422.6666259765625" height="1422.6666259765625"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
diff --git a/console/iOS/GenericApp/GenericApp/Storyboard.storyboard b/console/iOS/GenericApp/GenericApp/Storyboard.storyboard
index d983bb0c5..d731578c4 100644
--- a/console/iOS/GenericApp/GenericApp/Storyboard.storyboard
+++ b/console/iOS/GenericApp/GenericApp/Storyboard.storyboard
@@ -16,21 +16,8 @@
<view key="view" contentMode="scaleToFill" id="bwX-tc-a4T">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="or_splash" translatesAutoresizingMaskIntoConstraints="NO" id="vrO-P7-2kF">
- <rect key="frame" x="87" y="328" width="240" height="240"/>
- <constraints>
- <constraint firstAttribute="height" constant="240" id="pYh-GS-ffl"/>
- <constraint firstAttribute="width" constant="240" id="uwp-Jw-jfU"/>
- </constraints>
- </imageView>
- </subviews>
<viewLayoutGuide key="safeArea" id="y8x-w5-OSh"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
- <constraints>
- <constraint firstItem="vrO-P7-2kF" firstAttribute="centerX" secondItem="bwX-tc-a4T" secondAttribute="centerX" id="3wG-g6-lNC"/>
- <constraint firstItem="vrO-P7-2kF" firstAttribute="centerY" secondItem="bwX-tc-a4T" secondAttribute="centerY" id="hI3-hf-7JJ"/>
- </constraints>
</view>
<connections>
<segue destination="i2l-kx-xKH" kind="presentation" identifier="goToProjectView" modalPresentationStyle="fullScreen" id="PNL-Mf-RkC"/>
@@ -56,13 +43,13 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Connect to your application" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kbv-Tf-5fK">
- <rect key="frame" x="30" y="383" width="354" height="21"/>
+ <rect key="frame" x="30" y="373" width="354" height="21"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BlP-aM-prv" customClass="ORTextInput" customModule="OpenRemote" customModuleProvider="target">
- <rect key="frame" x="30" y="423" width="354" height="40"/>
+ <rect key="frame" x="30" y="413" width="354" height="40"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="nJi-N3-4Su"/>
@@ -72,7 +59,7 @@
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2fd-Z9-umb" customClass="ORTextInput" customModule="OpenRemote" customModuleProvider="target">
- <rect key="frame" x="30" y="503" width="354" height="40"/>
+ <rect key="frame" x="30" y="483" width="354" height="40"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Ddc-Hy-G6Q"/>
@@ -82,7 +69,7 @@
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tdG-Qt-Lhh" customClass="MDCRaisedButton">
- <rect key="frame" x="325" y="623" width="59" height="30"/>
+ <rect key="frame" x="325" y="603" width="59" height="30"/>
<state key="normal" title="Connect"/>
<connections>
<action selector="connectButtonpressed:" destination="i2l-kx-xKH" eventType="touchUpInside" id="x7E-CE-Jfr"/>
@@ -95,7 +82,7 @@
<constraint firstItem="tdG-Qt-Lhh" firstAttribute="trailing" secondItem="2fd-Z9-umb" secondAttribute="trailing" id="2el-oM-gye"/>
<constraint firstItem="D5Z-HK-RNC" firstAttribute="trailing" secondItem="Kbv-Tf-5fK" secondAttribute="trailing" constant="30" id="2jL-yL-nzr"/>
<constraint firstItem="91w-Qy-cB6" firstAttribute="trailing" secondItem="Kbv-Tf-5fK" secondAttribute="trailing" id="4JQ-ny-GpV"/>
- <constraint firstItem="Kbv-Tf-5fK" firstAttribute="top" secondItem="91w-Qy-cB6" secondAttribute="bottom" constant="60" id="6Xz-rs-f9s"/>
+ <constraint firstItem="Kbv-Tf-5fK" firstAttribute="top" secondItem="91w-Qy-cB6" secondAttribute="bottom" constant="50" id="6Xz-rs-f9s"/>
<constraint firstItem="tdG-Qt-Lhh" firstAttribute="top" secondItem="2fd-Z9-umb" secondAttribute="bottom" constant="80" id="8YO-LN-Y6a"/>
<constraint firstItem="BlP-aM-prv" firstAttribute="leading" secondItem="Kbv-Tf-5fK" secondAttribute="leading" id="EHO-FA-FcK"/>
<constraint firstItem="91w-Qy-cB6" firstAttribute="leading" secondItem="Kbv-Tf-5fK" secondAttribute="leading" id="LwD-ts-QIa"/>
@@ -103,7 +90,7 @@
<constraint firstItem="Kbv-Tf-5fK" firstAttribute="leading" secondItem="D5Z-HK-RNC" secondAttribute="leading" constant="30" id="kBY-W2-5la"/>
<constraint firstItem="2fd-Z9-umb" firstAttribute="leading" secondItem="BlP-aM-prv" secondAttribute="leading" id="khz-Ar-gHc"/>
<constraint firstItem="91w-Qy-cB6" firstAttribute="top" secondItem="D5Z-HK-RNC" secondAttribute="top" constant="80" id="mPB-1f-dRx"/>
- <constraint firstItem="2fd-Z9-umb" firstAttribute="top" secondItem="BlP-aM-prv" secondAttribute="bottom" constant="40" id="ptV-cK-szI"/>
+ <constraint firstItem="2fd-Z9-umb" firstAttribute="top" secondItem="BlP-aM-prv" secondAttribute="bottom" constant="30" id="ptV-cK-szI"/>
<constraint firstItem="BlP-aM-prv" firstAttribute="trailing" secondItem="Kbv-Tf-5fK" secondAttribute="trailing" id="rBu-cB-S9o"/>
<constraint firstItem="2fd-Z9-umb" firstAttribute="trailing" secondItem="BlP-aM-prv" secondAttribute="trailing" id="zdw-wG-TuZ"/>
</constraints>
@@ -141,7 +128,6 @@
</inferredMetricsTieBreakers>
<resources>
<image name="or_logo" width="1422.6666259765625" height="806.33331298828125"/>
- <image name="or_splash" width="1422.6666259765625" height="1422.6666259765625"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
diff --git a/console/iOS/GenericApp/GenericApp/UI/ORTextInput.swift b/console/iOS/GenericApp/GenericApp/UI/ORTextInput.swift
index cd78799a6..2fe4aa1e2 100644
--- a/console/iOS/GenericApp/GenericApp/UI/ORTextInput.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/ORTextInput.swift
@@ -45,7 +45,7 @@ class ORTextInput: UIView {
textInput.tag = 1
textInput.translatesAutoresizingMaskIntoConstraints = false
textInput.placeholder = placeholderText
- textInput.textColor = textColor
+ textInput.clearButtonMode = .never
self.addSubview(textInput)
@@ -55,15 +55,13 @@ class ORTextInput: UIView {
(textInput.leadingAnchor.constraint(equalTo: self.leadingAnchor)),
(textInput.trailingAnchor.constraint(equalTo: self.trailingAnchor))
])
-
-
}
private func setupContoller(){
controller = MDCTextInputControllerFilled(textInput: textInput)
controller.activeColor = textColor
- controller.textInput?.textColor = textColor
controller.floatingPlaceholderActiveColor = textColor
+
}
}
diff --git a/console/iOS/GenericApp/GenericApp/UI/ORViewController.swift b/console/iOS/GenericApp/GenericApp/UI/ORViewController.swift
index 50284490c..c9f6b02e0 100644
--- a/console/iOS/GenericApp/GenericApp/UI/ORViewController.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/ORViewController.swift
@@ -131,7 +131,7 @@ class ORViewcontroller : UIViewController {
]
return [
menuButton!.rightAnchor.constraint(equalTo: self.view.rightAnchor, constant: 20),
- menuButton!.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -40)
+ menuButton!.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -20)
]
} else if appConfig!.menuPosition == "TOP_RIGHT" {
self.popoverOptions = [
@@ -140,7 +140,7 @@ class ORViewcontroller : UIViewController {
]
return [
menuButton!.rightAnchor.constraint(equalTo: self.view.rightAnchor, constant: 20),
- menuButton!.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 40)
+ menuButton!.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 20)
]
} else if appConfig!.menuPosition == "TOP_LEFT" {
self.popoverOptions = [
@@ -149,16 +149,17 @@ class ORViewcontroller : UIViewController {
]
return [
menuButton!.leftAnchor.constraint(equalTo: self.view.leftAnchor, constant: 20),
- menuButton!.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 40)
+ menuButton!.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 20)
]
}
self.popoverOptions = [
.type(.up),
.arrowSize(.zero),
+
]
return [
menuButton!.leftAnchor.constraint(equalTo: self.view.leftAnchor, constant: 20),
- menuButton!.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -40)
+ menuButton!.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -20)
]
}()
@@ -168,7 +169,7 @@ class ORViewcontroller : UIViewController {
@objc func pressed(sender: UIButton!) {
let linkCount = appConfig?.links?.count ?? 0
- let tableView = UITableView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width / 2, height: CGFloat(linkCount * 40)))
+ let tableView = UITableView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width / 2, height: CGFloat(linkCount * 60)))
tableView.delegate = self
tableView.dataSource = self
tableView.isScrollEnabled = false
@@ -223,6 +224,10 @@ extension ORViewcontroller: UITableViewDelegate {
self.popover?.dismiss()
loadURL(url: URL(string: appConfig!.links![indexPath.row].pageLink.stringByURLEncoding()!)!)
}
+
+ func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+ return 60
+ }
}
extension ORViewcontroller: UITableViewDataSource {