mirror of
https://github.com/rive-app/rive-ios.git
synced 2026-01-18 17:11:28 +01:00
Resolve various iOS warnings
Initially the work for https://github.com/rive-app/rive-ios/issues/352 Additionally resolves all warnings except for updating the project to recommended settings, I'll want to take a deeper look into what those changes are / will be. Diffs= f257ec36eb Resolve various iOS warnings (#8827) Co-authored-by: David Skuza <david@rive.app>
This commit is contained in:
@@ -1 +1 @@
|
||||
6f306199cad05604ab7c0293b5268e00ca1abc84
|
||||
f257ec36eb100a51a0aa3f9c2f363c49473697ef
|
||||
|
||||
@@ -33,7 +33,8 @@ class StressTestViewController: UIViewController {
|
||||
#if os(visionOS)
|
||||
let h: CGFloat = 0
|
||||
#else
|
||||
let h = UIApplication.shared.statusBarFrame.height + 40
|
||||
let statusBarHeight = view.window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0
|
||||
let h = statusBarHeight + 40
|
||||
#endif
|
||||
rView!.frame = CGRect(x:f.minX, y:f.minY + h, width:f.width, height:f.height - h)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="0Wt-ue-AAA">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="0Wt-ue-AAA">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<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"/>
|
||||
@@ -17,7 +17,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="0PG-f3-SIb">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="0PG-f3-SIb">
|
||||
<rect key="frame" x="20" y="55.5" width="374" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="0PG-f3-SIb" id="srj-Fp-thS">
|
||||
@@ -935,7 +935,7 @@
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemGreenColor">
|
||||
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemYellowColor">
|
||||
<color red="1" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
||||
@@ -40,8 +40,8 @@ struct SwiftVMPlayer: View {
|
||||
Color.gray
|
||||
|
||||
VStack {
|
||||
ForEach(0 ..< viewModels.count) { i in
|
||||
viewModels[i].view()
|
||||
ForEach(viewModels, id: \.self) { viewModel in
|
||||
viewModel.view()
|
||||
}
|
||||
|
||||
HStack {
|
||||
|
||||
@@ -494,7 +494,6 @@
|
||||
E5964A962A965A9300140479 /* RiveEvent.h in Headers */,
|
||||
F2C003E82C933D2300339E67 /* RiveMetalDrawableView.h in Headers */,
|
||||
043026022AFB9FCD00320F2E /* RiveFactory.h in Headers */,
|
||||
C9C741F424FC510200EF9516 /* Rive.h in Headers */,
|
||||
F2FD94052CC9492B00C1FC85 /* RiveFont.h in Headers */,
|
||||
04BE5436264D2A7500427B39 /* RivePrivateHeaders.h in Headers */,
|
||||
C9C73EE224FC478900EF9516 /* RiveRuntime.h in Headers */,
|
||||
@@ -642,8 +641,6 @@
|
||||
04BE5434264D267900427B39 /* LayerState.mm in Sources */,
|
||||
F2610DDA2CA5B84B0090D50B /* RiveLogger+File.swift in Sources */,
|
||||
C9601F2B250C25930032AA07 /* CoreGraphicsRenderer.mm in Sources */,
|
||||
C9601F2B250C25930032AA07 /* CoreGraphicsRenderer.mm in Sources */,
|
||||
C9601F2B250C25930032AA07 /* CoreGraphicsRenderer.mm in Sources */,
|
||||
043025F42AF90EAC00320F2E /* RiveFileAssetLoader.mm in Sources */,
|
||||
F2D285492C6D469900728340 /* RiveFallbackFontProvider.swift in Sources */,
|
||||
043025FC2AFA862E00320F2E /* FileAssetLoaderAdapter.mm in Sources */,
|
||||
|
||||
@@ -78,7 +78,7 @@ import SwiftUI
|
||||
/// - Parameters:
|
||||
/// - design: The design of the font.
|
||||
/// - weight: The weight of the font.
|
||||
/// - weight: The width of the font. This value is not guaranteed to be available for all fonts.
|
||||
/// - width: The width of the font. This value is not guaranteed to be available for all fonts.
|
||||
@objc public init(
|
||||
design: RiveFallbackFontDescriptorDesign = .default,
|
||||
weight: RiveFallbackFontDescriptorWeight = .regular,
|
||||
|
||||
@@ -358,7 +358,7 @@ import Combine
|
||||
}
|
||||
|
||||
/// Returns the current boolean input by name. Get its value by calling `.value` on the returned object.
|
||||
/// - Parameter input: The name of the input
|
||||
/// - Parameter name: The name of the input
|
||||
/// - Returns: The boolean input if it exists. Returns `nil` if the input cannot be found.
|
||||
@objc open func boolInput(named name: String) -> RiveSMIBool?
|
||||
{
|
||||
@@ -389,7 +389,7 @@ import Combine
|
||||
}
|
||||
|
||||
/// Returns the current number input by name. Get its value by calling `.value` on the returned object.
|
||||
/// - Parameter input: The name of the input
|
||||
/// - Parameter name: The name of the input
|
||||
/// - Returns: The number input if it exists. Returns `nil` if the input cannot be found.
|
||||
@objc open func numberInput(named name: String) -> RiveSMINumber?
|
||||
{
|
||||
@@ -468,7 +468,7 @@ import Combine
|
||||
/// Set a text value for a specified text run
|
||||
/// - Parameters:
|
||||
/// - textRunName: The name of a `Text Run` on the active Artboard
|
||||
/// - value: A String value for the text run
|
||||
/// - textValue: A String value for the text run
|
||||
@objc open func setTextRunValue(_ textRunName: String, textValue: String) throws {
|
||||
if let textRun = riveModel?.artboard?.textRun(textRunName) {
|
||||
RiveLogger.log(viewModel: self, event: .textRun(textRunName, nil, textValue))
|
||||
@@ -488,8 +488,8 @@ import Combine
|
||||
/// - Parameters:
|
||||
/// - textRunName: The name of a `Text Run` on the active Artboard
|
||||
/// - path: The path to the nested text run.
|
||||
/// - value: A String value for the text run
|
||||
/// - Note: If the specified path is empty, the parent artboard will be used to find the text run.
|
||||
/// - textValue: A String value for the text run
|
||||
/// - Note: If the specified path is empty, the parent artboard will be used to find the text run.
|
||||
@objc open func setTextRunValue(_ textRunName: String, path: String, textValue: String) throws {
|
||||
if let textRun = riveModel?.artboard?.textRun(textRunName, path: path) {
|
||||
RiveLogger.log(viewModel: self, event: .textRun(textRunName, path, textValue))
|
||||
|
||||
Reference in New Issue
Block a user