Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change imp attributes type to [String: Any] #317

Merged
merged 6 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions Example/Example-tvOS/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="22505" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="32700.99.1234" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="appleTV" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -20,25 +21,49 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dPC-6W-Dib">
<rect key="frame" x="877" y="503" width="166" height="75"/>
<rect key="frame" x="899" y="307" width="146" height="75"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Button">
<buttonConfiguration key="configuration" style="plain" title="track">
<color key="baseForegroundColor" name="AccentColor"/>
</buttonConfiguration>
<connections>
<action selector="buttonAction:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="Dkr-CW-Ps5"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a9h-O3-V3g">
<rect key="frame" x="867" y="433" width="210" height="75"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="showAlert">
<color key="baseForegroundColor" name="AccentColor"/>
</buttonConfiguration>
<connections>
<action selector="showAlert:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="8uC-Uo-kJO"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9el-uq-kTO">
<rect key="frame" x="819" y="577" width="307" height="75"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="showActionSheet">
<color key="baseForegroundColor" name="AccentColor"/>
</buttonConfiguration>
<connections>
<action selector="showActionSheet:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="1ut-zQ-mUz"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-46" y="-74"/>
<point key="canvasLocation" x="183" y="-94"/>
</scene>
</scenes>
<resources>
Expand Down
26 changes: 26 additions & 0 deletions Example/Example-tvOS/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,31 @@ class ViewController: UIViewController {
GrowingAutotracker.sharedInstance().trackCustomEvent("tvOS_custom_event", withAttributes: ["key2": "value"])
}

@IBAction func showAlert(_ sender: UIButton) {
let title = "title"
let message = "message"
let controller = UIAlertController(title: title, message: message, preferredStyle: .alert)
controller.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { action in

}))
controller.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in

}))
self.present(controller, animated: true)
}

@IBAction func showActionSheet(_ sender: UIButton) {
let title = "title"
let message = "message"
let controller = UIAlertController(title: title, message: message, preferredStyle: .actionSheet)
controller.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { action in

}))
controller.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in

}))
self.present(controller, animated: true)
}

}

Loading
Loading