FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
API-Examples/macOS/APIExample/SettingsController.swift at master · quejue1213/API-Examples · GitHub
quejue1213
/
API-Examples
Public
forked from
AgoraIO/API-Examples
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
API-Examples
/
macOS
/
APIExample
/
SettingsController.swift
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (33 loc) · 1.52 KB
Breadcrumbs
API-Examples
/
macOS
/
APIExample
/
SettingsController.swift
Copy path
File metadata and controls
44 lines (33 loc) · 1.52 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// SettingsController.swift
// APIExample
//
// Created by XC on 2020/12/15.
// Copyright © 2020 Agora Corp. All rights reserved.
//
import
Cocoa
class
SettingsController
:
BaseViewController
{
@
IBOutlet
weak
var
resolutionLabel
:
NSTextField
!
@
IBOutlet
weak
var
resolutionPicker
:
NSPopUpButton
!
@
IBOutlet
weak
var
fpsLabel
:
NSTextField
!
@
IBOutlet
weak
var
fpsPicker
:
NSPopUpButton
!
@
IBOutlet
weak
var
sdkVersionLabel
:
NSTextField
!
@
IBOutlet
weak
var
sdkVersion
:
NSTextField
!
override
func
viewDidLoad
(
)
{
super
.
viewDidLoad
(
)
// Do view setup here.
self
.
resolutionLabel
.
cell
?
.
title
=
"
Resolution
"
.
localized
self
.
resolutionPicker
.
addItems
(
withTitles
:
GlobalSettings
.
shared
.
resolutionSetting
.
options
.
map
{
$0
.
label
}
)
self
.
resolutionPicker
.
selectItem
(
at
:
GlobalSettings
.
shared
.
resolutionSetting
.
selected
)
self
.
fpsLabel
.
cell
?
.
title
=
"
Frame Rate
"
.
localized
self
.
fpsPicker
.
addItems
(
withTitles
:
GlobalSettings
.
shared
.
fpsSetting
.
options
.
map
{
$0
.
label
}
)
self
.
fpsPicker
.
selectItem
(
at
:
GlobalSettings
.
shared
.
fpsSetting
.
selected
)
self
.
sdkVersion
.
cell
?
.
title
=
"
v
\(
AgoraRtcEngineKit
.
getSdkVersion
(
)
)
"
}
@
IBAction
func
onResolutionChanged
(
_ sender
:
NSPopUpButton
)
{
GlobalSettings
.
shared
.
resolutionSetting
.
selected
=
sender
.
indexOfSelectedItem
}
@
IBAction
func
onFpsChanged
(
_ sender
:
NSPopUpButton
)
{
GlobalSettings
.
shared
.
fpsSetting
.
selected
=
sender
.
indexOfSelectedItem
}
}
Back
|
FazBrowse Home
|
New Git URL