-
-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
193 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
import AVFAudio | ||
import HaishinKit | ||
import Logboard | ||
import UIKit | ||
|
||
let logger = LBLogger.with("com.haishinkit.Exsample.iOS") | ||
|
||
@UIApplicationMain | ||
class AppDelegate: UIResponder, UIApplicationDelegate { | ||
var window: UIWindow? | ||
|
||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
true | ||
// LBLogger.with(HaishinKitIdentifier).level = .trace | ||
let session = AVAudioSession.sharedInstance() | ||
do { | ||
// If you set the "mode" parameter, stereo capture is not possible, so it is left unspecified. | ||
try session.setCategory(.playAndRecord) | ||
try session.setActive(true) | ||
} catch { | ||
logger.error(error) | ||
} | ||
return true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="22154" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> | ||
<device id="appleTV" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="tvOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/> | ||
<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="Example_tvOS" customModuleProvider="target" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | ||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<glkView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" enableSetNeedsDisplay="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nrq-v4-hto" customClass="MTHKView" customModule="HaishinKit"> | ||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/> | ||
<subviews> | ||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nJN-5s-dow"> | ||
<rect key="frame" x="1781" y="16" width="123" height="75"/> | ||
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/> | ||
<state key="normal" title="Button"/> | ||
<buttonConfiguration key="configuration" style="filled" title="GO"/> | ||
<connections> | ||
<action selector="go:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="HV0-Gk-0Ba"/> | ||
</connections> | ||
</button> | ||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="a9E-qK-rmc"> | ||
<rect key="frame" x="1375" y="16" width="398" height="70"/> | ||
<color key="backgroundColor" white="0.0" alpha="0.10000000000000001" colorSpace="calibratedWhite"/> | ||
<segments> | ||
<segment title="Playback"/> | ||
<segment title="Publish"/> | ||
</segments> | ||
<connections> | ||
<action selector="segmentedControl:" destination="BYZ-38-t0r" eventType="valueChanged" id="h3x-le-O5p"/> | ||
</connections> | ||
</segmentedControl> | ||
</subviews> | ||
<constraints> | ||
<constraint firstAttribute="trailing" secondItem="nJN-5s-dow" secondAttribute="trailing" constant="16" id="CNW-q4-rdA"/> | ||
<constraint firstItem="nJN-5s-dow" firstAttribute="leading" secondItem="a9E-qK-rmc" secondAttribute="trailing" constant="8" id="O3d-xV-4yt"/> | ||
<constraint firstItem="nJN-5s-dow" firstAttribute="leading" secondItem="a9E-qK-rmc" secondAttribute="trailing" constant="8" id="dLH-Cj-PMB"/> | ||
<constraint firstItem="nJN-5s-dow" firstAttribute="top" secondItem="nrq-v4-hto" secondAttribute="top" constant="16" id="nIc-5r-Bf8"/> | ||
<constraint firstItem="a9E-qK-rmc" firstAttribute="top" secondItem="nrq-v4-hto" secondAttribute="top" constant="16" id="sgY-2o-hQc"/> | ||
</constraints> | ||
</glkView> | ||
</subviews> | ||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
<constraints> | ||
<constraint firstItem="nrq-v4-hto" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="Bhi-7w-Rn8"/> | ||
<constraint firstAttribute="bottom" secondItem="nrq-v4-hto" secondAttribute="bottom" id="hf0-Ch-bY1"/> | ||
<constraint firstAttribute="trailing" secondItem="nrq-v4-hto" secondAttribute="trailing" id="rer-u3-a6H"/> | ||
<constraint firstItem="nrq-v4-hto" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="s2H-j5-wkW"/> | ||
</constraints> | ||
</view> | ||
<connections> | ||
<outlet property="lfView" destination="nrq-v4-hto" id="CQd-Eu-2C3"/> | ||
<outlet property="playbackOrPublishSegment" destination="a9E-qK-rmc" id="aHG-Pe-YP8"/> | ||
</connections> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="-32" y="-4"/> | ||
</scene> | ||
</scenes> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.