Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MobileScreenReadersApi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
public_accessibility_software
MobileScreenReadersApi
Commits
cc2657ef
Commit
cc2657ef
authored
Apr 19, 2020
by
Mattia541993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios custom action on VC
parent
a99220f3
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
754 additions
and
0 deletions
+754
-0
project.pbxproj
...iOSCustomAction/iOSCustomAction.xcodeproj/project.pbxproj
+345
-0
contents.xcworkspacedata
...on.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+7
-0
IDEWorkspaceChecks.plist
...project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
UserInterfaceState.xcuserstate
...ta/mattiaducci.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
xcschememanagement.plist
...attiaducci.xcuserdatad/xcschemes/xcschememanagement.plist
+14
-0
AppDelegate.swift
...mAction/iOSCustomAction/iOSCustomAction/AppDelegate.swift
+37
-0
Contents.json
...omAction/Assets.xcassets/AppIcon.appiconset/Contents.json
+98
-0
Contents.json
...ustomAction/iOSCustomAction/Assets.xcassets/Contents.json
+6
-0
LaunchScreen.storyboard
...Action/iOSCustomAction/Base.lproj/LaunchScreen.storyboard
+25
-0
Main.storyboard
...OSCustomAction/iOSCustomAction/Base.lproj/Main.storyboard
+49
-0
Info.plist
...tyCustomAction/iOSCustomAction/iOSCustomAction/Info.plist
+64
-0
SceneDelegate.swift
...ction/iOSCustomAction/iOSCustomAction/SceneDelegate.swift
+53
-0
ViewController.swift
...tion/iOSCustomAction/iOSCustomAction/ViewController.swift
+48
-0
No files found.
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction.xcodeproj/project.pbxproj
0 → 100644
View file @
cc2657ef
This diff is collapsed.
Click to expand it.
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
cc2657ef
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:iOSCustomAction.xcodeproj"
>
</FileRef>
</Workspace>
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
cc2657ef
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction.xcodeproj/project.xcworkspace/xcuserdata/mattiaducci.xcuserdatad/UserInterfaceState.xcuserstate
0 → 100644
View file @
cc2657ef
File added
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction.xcodeproj/xcuserdata/mattiaducci.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
View file @
cc2657ef
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
SchemeUserState
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
iOSCustomAction.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
0
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/plist
>
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/AppDelegate.swift
0 → 100644
View file @
cc2657ef
//
// AppDelegate.swift
// iOSCustomAction
//
// Created by Mattia Ducci on 19/04/2020.
// Copyright © 2020 Mattia Ducci. All rights reserved.
//
import
UIKit
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
// Override point for customization after application launch.
return
true
}
// MARK: UISceneSession Lifecycle
func
application
(
_
application
:
UIApplication
,
configurationForConnecting
connectingSceneSession
:
UISceneSession
,
options
:
UIScene
.
ConnectionOptions
)
->
UISceneConfiguration
{
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return
UISceneConfiguration
(
name
:
"Default Configuration"
,
sessionRole
:
connectingSceneSession
.
role
)
}
func
application
(
_
application
:
UIApplication
,
didDiscardSceneSessions
sceneSessions
:
Set
<
UISceneSession
>
)
{
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/Assets.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
View file @
cc2657ef
{
"images"
:
[
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"60x60"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"60x60"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"76x76"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"76x76"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"83.5x83.5"
},
{
"idiom"
:
"ios-marketing"
,
"scale"
:
"1x"
,
"size"
:
"1024x1024"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/Assets.xcassets/Contents.json
0 → 100644
View file @
cc2657ef
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/Base.lproj/LaunchScreen.storyboard
0 → 100644
View file @
cc2657ef
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13122.16"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"01J-lp-oVM"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13104.12"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"EHf-IW-A2E"
>
<objects>
<viewController
id=
"01J-lp-oVM"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"Ze5-6b-2t3"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
xcode11CocoaTouchSystemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"6Tk-OE-BBY"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"iYj-Kq-Ea1"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"53"
y=
"375"
/>
</scene>
</scenes>
</document>
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/Base.lproj/Main.storyboard
0 → 100644
View file @
cc2657ef
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"16096"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"BYZ-38-t0r"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16086"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<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=
"iOSCustomAction"
customModuleProvider=
"target"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"8bC-Xf-vdC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Counter"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AUH-lb-pam"
>
<rect
key=
"frame"
x=
"176"
y=
"437.5"
width=
"62"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"0"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vp6-7F-NFO"
>
<rect
key=
"frame"
x=
"201.5"
y=
"474.5"
width=
"11"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"vp6-7F-NFO"
firstAttribute=
"centerX"
secondItem=
"8bC-Xf-vdC"
secondAttribute=
"centerX"
id=
"BZZ-Nn-S7j"
/>
<constraint
firstItem=
"AUH-lb-pam"
firstAttribute=
"centerY"
secondItem=
"8bC-Xf-vdC"
secondAttribute=
"centerY"
id=
"NHT-9U-rMh"
/>
<constraint
firstItem=
"AUH-lb-pam"
firstAttribute=
"centerX"
secondItem=
"8bC-Xf-vdC"
secondAttribute=
"centerX"
id=
"U44-me-mAP"
/>
<constraint
firstItem=
"vp6-7F-NFO"
firstAttribute=
"top"
secondItem=
"AUH-lb-pam"
secondAttribute=
"bottom"
constant=
"16"
id=
"XM2-SU-thn"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"6Tk-OE-BBY"
/>
</view>
<connections>
<outlet
property=
"counterLbl"
destination=
"vp6-7F-NFO"
id=
"I0Q-4L-pof"
/>
</connections>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"139"
y=
"138"
/>
</scene>
</scenes>
</document>
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/Info.plist
0 → 100644
View file @
cc2657ef
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_PACKAGE_TYPE
)<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIApplicationSceneManifest
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
UIApplicationSupportsMultipleScenes
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
UISceneConfigurations
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
UIWindowSceneSessionRoleApplication
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
UISceneConfigurationName
<
/k
e
y
>
<
string
>
Default
Configuration
<
/string
>
<
k
e
y
>
UISceneDelegateClassName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_MODULE_NAME
)
.SceneDelegate
<
/string
>
<
k
e
y
>
UISceneStoryboardFile
<
/k
e
y
>
<
string
>
Main
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
<
string
>
Main
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
~
ipad
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationPortraitUpsideDown
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/SceneDelegate.swift
0 → 100644
View file @
cc2657ef
//
// SceneDelegate.swift
// iOSCustomAction
//
// Created by Mattia Ducci on 19/04/2020.
// Copyright © 2020 Mattia Ducci. All rights reserved.
//
import
UIKit
class
SceneDelegate
:
UIResponder
,
UIWindowSceneDelegate
{
var
window
:
UIWindow
?
func
scene
(
_
scene
:
UIScene
,
willConnectTo
session
:
UISceneSession
,
options
connectionOptions
:
UIScene
.
ConnectionOptions
)
{
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard
let
_
=
(
scene
as?
UIWindowScene
)
else
{
return
}
}
func
sceneDidDisconnect
(
_
scene
:
UIScene
)
{
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func
sceneDidBecomeActive
(
_
scene
:
UIScene
)
{
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func
sceneWillResignActive
(
_
scene
:
UIScene
)
{
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func
sceneWillEnterForeground
(
_
scene
:
UIScene
)
{
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func
sceneDidEnterBackground
(
_
scene
:
UIScene
)
{
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}
CustomAction/iOSAccessibilityCustomAction/iOSCustomAction/iOSCustomAction/ViewController.swift
0 → 100644
View file @
cc2657ef
//
// ViewController.swift
// iOSCustomAction
//
// Created by Mattia Ducci on 19/04/2020.
// Copyright © 2020 Mattia Ducci. All rights reserved.
//
import
UIKit
class
ViewController
:
UIViewController
{
var
curCnt
:
Int
!
=
0
{
willSet
{
DispatchQueue
.
main
.
async
{
self
.
counterLbl
.
text
=
"
\(
newValue
!
)
"
}
}
}
@IBOutlet
weak
var
counterLbl
:
UILabel
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
initAccessibility
()
}
private
func
initAccessibility
(){
let
up
=
UIAccessibilityCustomAction
(
name
:
"Increment"
,
target
:
self
,
selector
:
#selector(
increment
)
)
let
down
=
UIAccessibilityCustomAction
(
name
:
"Decrement"
,
target
:
self
,
selector
:
#selector(
decrement
)
)
self
.
accessibilityCustomActions
=
[
up
,
down
]
}
@objc
private
func
increment
()
->
Bool
{
curCnt
+=
1
return
true
}
@objc
private
func
decrement
()
->
Bool
{
guard
curCnt
>
0
else
{
return
false
}
curCnt
-=
1
return
true
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment