Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
c3ff9361
Commit
c3ff9361
authored
Sep 14, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial phase to Swift 4 complete
parent
3130a55c
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
125 additions
and
53 deletions
+125
-53
Material.xcodeproj/project.pbxproj
+20
-4
Material.xcodeproj/xcshareddata/xcschemes/Material.xcscheme
+3
-1
Sources/Frameworks/Motion/Sources/Motion.swift
+18
-11
Sources/Frameworks/Motion/Sources/MotionAnimation.swift
+20
-0
Sources/Frameworks/Motion/Sources/MotionController.swift
+4
-0
Sources/Frameworks/Motion/Sources/MotionTransition.swift
+20
-0
Sources/iOS/CharacterAttribute.swift
+23
-23
Sources/iOS/Font.swift
+1
-1
Sources/iOS/Material+UIFont.swift
+1
-1
Sources/iOS/Material+UIView.swift
+2
-0
Sources/iOS/SearchBar.swift
+2
-2
Sources/iOS/SnackbarController.swift
+1
-1
Sources/iOS/TabBar.swift
+4
-4
Sources/iOS/TabsController.swift
+1
-1
Sources/iOS/TextStorage.swift
+4
-4
Sources/iOS/TransitionController.swift
+1
-0
No files found.
Material.xcodeproj/project.pbxproj
View file @
c3ff9361
...
...
@@ -1036,14 +1036,14 @@
attributes
=
{
LastSwiftMigration
=
0710
;
LastSwiftUpdateCheck
=
0730
;
LastUpgradeCheck
=
0
8
00
;
LastUpgradeCheck
=
0
9
00
;
ORGANIZATIONNAME
=
"CosmicMind, Inc."
;
TargetAttributes
=
{
963832351B88DFD80015F710
=
{
CreatedOnToolsVersion
=
6.4
;
DevelopmentTeam
=
9Z76XCNLGL
;
DevelopmentTeamName
=
"CosmicMind Inc."
;
LastSwiftMigration
=
0
8
00
;
LastSwiftMigration
=
0
9
00
;
ProvisioningStyle
=
Manual
;
};
};
...
...
@@ -1215,14 +1215,20 @@
CLANG_CXX_LIBRARY
=
"libc++"
;
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_OBJC_ARC
=
YES
;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
=
YES
;
CLANG_WARN_BOOL_CONVERSION
=
YES
;
CLANG_WARN_COMMA
=
YES
;
CLANG_WARN_CONSTANT_CONVERSION
=
YES
;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE
=
YES_ERROR
;
CLANG_WARN_EMPTY_BODY
=
YES
;
CLANG_WARN_ENUM_CONVERSION
=
YES
;
CLANG_WARN_INFINITE_RECURSION
=
YES
;
CLANG_WARN_INT_CONVERSION
=
YES
;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION
=
YES
;
CLANG_WARN_OBJC_LITERAL_CONVERSION
=
YES
;
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_RANGE_LOOP_ANALYSIS
=
YES
;
CLANG_WARN_STRICT_PROTOTYPES
=
YES
;
CLANG_WARN_SUSPICIOUS_MOVE
=
YES
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
...
...
@@ -1254,6 +1260,7 @@
PRODUCT_NAME
=
Material
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Default
;
SWIFT_VERSION
=
3.0
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
...
...
@@ -1269,14 +1276,20 @@
CLANG_CXX_LIBRARY
=
"libc++"
;
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_OBJC_ARC
=
YES
;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
=
YES
;
CLANG_WARN_BOOL_CONVERSION
=
YES
;
CLANG_WARN_COMMA
=
YES
;
CLANG_WARN_CONSTANT_CONVERSION
=
YES
;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE
=
YES_ERROR
;
CLANG_WARN_EMPTY_BODY
=
YES
;
CLANG_WARN_ENUM_CONVERSION
=
YES
;
CLANG_WARN_INFINITE_RECURSION
=
YES
;
CLANG_WARN_INT_CONVERSION
=
YES
;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION
=
YES
;
CLANG_WARN_OBJC_LITERAL_CONVERSION
=
YES
;
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_RANGE_LOOP_ANALYSIS
=
YES
;
CLANG_WARN_STRICT_PROTOTYPES
=
YES
;
CLANG_WARN_SUSPICIOUS_MOVE
=
YES
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
...
...
@@ -1300,6 +1313,7 @@
PRODUCT_NAME
=
Material
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Default
;
SWIFT_VERSION
=
3.0
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VALIDATE_PRODUCT
=
YES
;
...
...
@@ -1329,7 +1343,8 @@
PROVISIONING_PROFILE
=
""
;
SKIP_INSTALL
=
YES
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_VERSION
=
3.0
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Off
;
SWIFT_VERSION
=
4.0
;
};
name
=
Debug
;
};
...
...
@@ -1354,7 +1369,8 @@
PROVISIONING_PROFILE
=
""
;
SKIP_INSTALL
=
YES
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
SWIFT_VERSION
=
3.0
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Off
;
SWIFT_VERSION
=
4.0
;
};
name
=
Release
;
};
...
...
Material.xcodeproj/xcshareddata/xcschemes/Material.xcscheme
View file @
c3ff9361
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"0
83
0"
LastUpgradeVersion =
"0
90
0"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
...
...
@@ -26,6 +26,7 @@
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
<TestableReference
...
...
@@ -55,6 +56,7 @@
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
...
...
Sources/Frameworks/Motion/Sources/Motion.swift
View file @
c3ff9361
...
...
@@ -770,21 +770,28 @@ extension Motion: UITabBarControllerDelegate {
}
}
public
typealias
Motion
Delay
CancelBlock
=
(
Bool
)
->
Void
public
typealias
MotionCancelBlock
=
(
Bool
)
->
Void
extension
Motion
{
/**
Executes a block of code asynchronously on the main thread.
- Parameter execute: A block that is executed asynchronously on the main thread.
*/
public
class
func
async
(
_
execute
:
@escaping
()
->
Void
)
{
Motion
.
delay
(
0
,
execute
:
execute
)
}
/**
Executes a block of code after a time delay.
- Parameter duration: An animation duration time.
- Parameter animations: An animation block.
- Parameter execute block: A completion block that is executed once
the animations have completed.
- Parameter _ time: A delay time.
- Parameter execute: A block that is executed once delay has passed.
- Returns: An optional MotionCancelBlock.
*/
@discardableResult
public
class
func
delay
(
_
time
:
TimeInterval
,
execute
:
@escaping
()
->
Void
)
->
Motion
Delay
CancelBlock
?
{
var
cancelable
:
Motion
Delay
CancelBlock
?
public
class
func
delay
(
_
time
:
TimeInterval
,
execute
:
@escaping
()
->
Void
)
->
MotionCancelBlock
?
{
var
cancelable
:
MotionCancelBlock
?
let
delayed
:
Motion
Delay
CancelBlock
=
{
let
delayed
:
MotionCancelBlock
=
{
if
!
$0
{
DispatchQueue
.
main
.
async
(
execute
:
execute
)
}
...
...
@@ -802,10 +809,10 @@ extension Motion {
}
/**
Cancels the delayed Motion
Delay
CancelBlock.
- Parameter delayed completion: An Motion
Delay
CancelBlock.
Cancels the delayed MotionCancelBlock.
- Parameter delayed completion: An MotionCancelBlock.
*/
public
class
func
cancel
(
delayed
completion
:
Motion
Delay
CancelBlock
)
{
public
class
func
cancel
(
delayed
completion
:
MotionCancelBlock
)
{
completion
(
true
)
}
...
...
Sources/Frameworks/Motion/Sources/MotionAnimation.swift
View file @
c3ff9361
...
...
@@ -227,6 +227,16 @@ public extension MotionAnimation {
}
}
/**
Animates a view's current position to the given x and y values.
- Parameter x: A CGloat.
- Parameter y: A CGloat.
- Returns: A MotionAnimation.
*/
static
func
position
(
x
:
CGFloat
,
y
:
CGFloat
)
->
MotionAnimation
{
return
.
position
(
CGPoint
(
x
:
x
,
y
:
y
))
}
/// Fades the view in during an animation.
static
var
fadeIn
=
MotionAnimation
.
fade
(
1
)
...
...
@@ -267,6 +277,16 @@ public extension MotionAnimation {
}
/**
Animates the view's current size to the given width and height.
- Parameter width: A CGFloat.
- Parameter height: A CGFloat.
- Returns: A MotionAnimation.
*/
static
func
size
(
width
:
CGFloat
,
height
:
CGFloat
)
->
MotionAnimation
{
return
.
size
(
CGSize
(
width
:
width
,
height
:
height
))
}
/**
Animates a view's current shadow path to the given one.
- Parameter path: A CGPath.
- Returns: A MotionAnimation.
...
...
Sources/Frameworks/Motion/Sources/MotionController.swift
View file @
c3ff9361
...
...
@@ -310,6 +310,7 @@ internal extension MotionController {
Subclasses should call context.set(fromViews: toViews) after
inserting fromViews & toViews into the container
*/
@objc
func
prepareTransition
()
{
guard
isTransitioning
else
{
return
...
...
@@ -323,6 +324,7 @@ internal extension MotionController {
}
/// Prepares the transition fromView & toView pairs.
@objc
func
prepareTransitionPairs
()
{
guard
isTransitioning
else
{
return
...
...
@@ -358,6 +360,7 @@ internal extension MotionController {
Animates the views. Subclasses should call `prepareTransition` &
`prepareTransitionPairs` before calling `animate`.
*/
@objc
func
animate
()
{
guard
isTransitioning
else
{
return
...
...
@@ -424,6 +427,7 @@ internal extension MotionController {
- Parameter isFinished: A Boolean indicating if the transition
has completed.
*/
@objc
func
complete
(
isFinished
:
Bool
)
{
guard
isTransitioning
else
{
return
...
...
Sources/Frameworks/Motion/Sources/MotionTransition.swift
View file @
c3ff9361
...
...
@@ -234,6 +234,16 @@ public extension MotionTransition {
}
}
/**
Animates a view's current position to the given x and y values.
- Parameter x: A CGloat.
- Parameter y: A CGloat.
- Returns: A MotionTransition.
*/
static
func
position
(
x
:
CGFloat
,
y
:
CGFloat
)
->
MotionTransition
{
return
.
position
(
CGPoint
(
x
:
x
,
y
:
y
))
}
/// Forces the view to not fade during a transition.
static
var
forceNonFade
=
MotionTransition
{
$0
.
nonFade
=
true
...
...
@@ -279,6 +289,16 @@ public extension MotionTransition {
}
/**
Animates the view's current size to the given width and height.
- Parameter width: A CGFloat.
- Parameter height: A CGFloat.
- Returns: A MotionTransition.
*/
static
func
size
(
width
:
CGFloat
,
height
:
CGFloat
)
->
MotionTransition
{
return
.
size
(
CGSize
(
width
:
width
,
height
:
height
))
}
/**
Animates the view's current shadow path to the given one.
- Parameter path: A CGPath.
- Returns: A MotionTransition.
...
...
Sources/iOS/CharacterAttribute.swift
View file @
c3ff9361
...
...
@@ -57,47 +57,47 @@ public enum CharacterAttribute: String {
public
func
CharacterAttributeToValue
(
attribute
:
CharacterAttribute
)
->
String
{
switch
attribute
{
case
.
font
:
return
NS
FontAttributeNam
e
return
NS
AttributedStringKey
.
font
.
rawValu
e
case
.
paragraphStyle
:
return
NS
ParagraphStyleAttributeNam
e
return
NS
AttributedStringKey
.
paragraphStyle
.
rawValu
e
case
.
forgroundColor
:
return
NS
ForegroundColorAttributeNam
e
return
NS
AttributedStringKey
.
foregroundColor
.
rawValu
e
case
.
backgroundColor
:
return
NS
BackgroundColorAttributeNam
e
return
NS
AttributedStringKey
.
backgroundColor
.
rawValu
e
case
.
ligature
:
return
NS
LigatureAttributeNam
e
return
NS
AttributedStringKey
.
ligature
.
rawValu
e
case
.
kern
:
return
NS
KernAttributeNam
e
return
NS
AttributedStringKey
.
kern
.
rawValu
e
case
.
strikethroughStyle
:
return
NS
StrikethroughStyleAttributeNam
e
return
NS
AttributedStringKey
.
strikethroughStyle
.
rawValu
e
case
.
underlineStyle
:
return
NS
UnderlineStyleAttributeNam
e
return
NS
AttributedStringKey
.
underlineStyle
.
rawValu
e
case
.
strokeColor
:
return
NS
StrokeColorAttributeNam
e
return
NS
AttributedStringKey
.
strokeColor
.
rawValu
e
case
.
strokeWidth
:
return
NS
StrokeWidthAttributeNam
e
return
NS
AttributedStringKey
.
strokeWidth
.
rawValu
e
case
.
shadow
:
return
NS
ShadowAttributeNam
e
return
NS
AttributedStringKey
.
shadow
.
rawValu
e
case
.
textEffect
:
return
NS
TextEffectAttributeNam
e
return
NS
AttributedStringKey
.
textEffect
.
rawValu
e
case
.
attachment
:
return
NSAtt
achmentAttributeNam
e
return
NSAtt
ributedStringKey
.
attachment
.
rawValu
e
case
.
link
:
return
NS
LinkAttributeNam
e
return
NS
AttributedStringKey
.
link
.
rawValu
e
case
.
baselineOffset
:
return
NS
BaselineOffsetAttributeNam
e
return
NS
AttributedStringKey
.
baselineOffset
.
rawValu
e
case
.
underlineColor
:
return
NS
UnderlineColorAttributeNam
e
return
NS
AttributedStringKey
.
underlineColor
.
rawValu
e
case
.
strikethroughColor
:
return
NS
StrikethroughColorAttributeNam
e
return
NS
AttributedStringKey
.
strikethroughColor
.
rawValu
e
case
.
obliqueness
:
return
NS
ObliquenessAttributeNam
e
return
NS
AttributedStringKey
.
obliqueness
.
rawValu
e
case
.
expansion
:
return
NS
ExpansionAttributeNam
e
return
NS
AttributedStringKey
.
expansion
.
rawValu
e
case
.
writingDirection
:
return
NS
WritingDirectionAttributeNam
e
return
NS
AttributedStringKey
.
writingDirection
.
rawValu
e
case
.
verticalGlyphForm
:
return
NS
VerticalGlyphFormAttributeNam
e
return
NS
AttributedStringKey
.
verticalGlyphForm
.
rawValu
e
}
}
...
...
@@ -109,7 +109,7 @@ extension NSMutableAttributedString {
- Parameter range: A NSRange.
*/
open
func
add
(
characterAttribute
:
CharacterAttribute
,
value
:
Any
,
range
:
NSRange
)
{
addAttribute
(
CharacterAttributeToValue
(
attribute
:
characterAttribute
),
value
:
value
,
range
:
range
)
addAttribute
(
NSAttributedStringKey
(
rawValue
:
CharacterAttributeToValue
(
attribute
:
characterAttribute
)
),
value
:
value
,
range
:
range
)
}
/**
...
...
@@ -151,7 +151,7 @@ extension NSMutableAttributedString {
- Parameter range: A NSRange.
*/
open
func
remove
(
characterAttribute
:
CharacterAttribute
,
range
:
NSRange
)
{
removeAttribute
(
CharacterAttributeToValue
(
attribute
:
characterAttribute
),
range
:
range
)
removeAttribute
(
NSAttributedStringKey
(
rawValue
:
CharacterAttributeToValue
(
attribute
:
characterAttribute
)
),
range
:
range
)
}
/**
...
...
Sources/iOS/Font.swift
View file @
c3ff9361
...
...
@@ -94,7 +94,7 @@ private class FontLoader {
let
font
=
CGFont
(
provider
)
var
error
:
Unmanaged
<
CFError
>
?
if
!
CTFontManagerRegisterGraphicsFont
(
font
,
&
error
)
{
if
!
CTFontManagerRegisterGraphicsFont
(
font
!
,
&
error
)
{
let
errorDescription
=
CFErrorCopyDescription
(
error
!.
takeUnretainedValue
())
let
nsError
=
error
!.
takeUnretainedValue
()
as
Any
as!
Error
NSException
(
name
:
.
internalInconsistencyException
,
reason
:
errorDescription
as
String
?,
userInfo
:
[
NSUnderlyingErrorKey
:
nsError
as
Any
])
.
raise
()
...
...
Sources/iOS/Material+UIFont.swift
View file @
c3ff9361
...
...
@@ -41,7 +41,7 @@ extension UIFont {
open
func
stringSize
(
string
:
String
,
constrainedTo
width
:
CGFloat
)
->
CGSize
{
return
string
.
boundingRect
(
with
:
CGSize
(
width
:
width
,
height
:
CGFloat
(
Double
.
greatestFiniteMagnitude
)),
options
:
NSStringDrawingOptions
.
usesLineFragmentOrigin
,
attributes
:
[
NS
FontAttributeName
:
self
],
attributes
:
[
NS
AttributedStringKey
.
font
:
self
],
context
:
nil
)
.
size
}
}
Sources/iOS/Material+UIView.swift
View file @
c3ff9361
...
...
@@ -123,6 +123,7 @@ extension UIView {
width or height property is set, the other will be automatically adjusted
to maintain the shape of the object.
*/
@objc
open
var
shapePreset
:
ShapePreset
{
get
{
return
layer
.
shapePreset
...
...
@@ -223,6 +224,7 @@ extension UIView {
}
/// A property that sets the cornerRadius of the backing layer.
@objc
open
var
cornerRadiusPreset
:
CornerRadiusPreset
{
get
{
return
layer
.
cornerRadiusPreset
...
...
Sources/iOS/SearchBar.swift
View file @
c3ff9361
...
...
@@ -109,7 +109,7 @@ open class SearchBar: Bar {
open
var
placeholder
:
String
?
{
didSet
{
if
let
v
=
placeholder
{
textField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
v
,
attributes
:
[
NS
ForegroundColorAttributeName
:
placeholderColor
])
textField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
v
,
attributes
:
[
NS
AttributedStringKey
.
foregroundColor
:
placeholderColor
])
}
}
}
...
...
@@ -119,7 +119,7 @@ open class SearchBar: Bar {
open
var
placeholderColor
=
Color
.
darkText
.
others
{
didSet
{
if
let
v
=
placeholder
{
textField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
v
,
attributes
:
[
NS
ForegroundColorAttributeName
:
placeholderColor
])
textField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
v
,
attributes
:
[
NS
AttributedStringKey
.
foregroundColor
:
placeholderColor
])
}
}
}
...
...
Sources/iOS/SnackbarController.swift
View file @
c3ff9361
...
...
@@ -115,7 +115,7 @@ open class SnackbarController: TransitionController {
- Parameter status: A SnackbarStatus enum value.
*/
@discardableResult
open
func
animate
(
snackbar
status
:
SnackbarStatus
,
delay
:
TimeInterval
=
0
,
animations
:
((
Snackbar
)
->
Void
)?
=
nil
,
completion
:
((
Snackbar
)
->
Void
)?
=
nil
)
->
Motion
Delay
CancelBlock
?
{
open
func
animate
(
snackbar
status
:
SnackbarStatus
,
delay
:
TimeInterval
=
0
,
animations
:
((
Snackbar
)
->
Void
)?
=
nil
,
completion
:
((
Snackbar
)
->
Void
)?
=
nil
)
->
MotionCancelBlock
?
{
return
Motion
.
delay
(
delay
)
{
[
weak
self
,
status
=
status
,
animations
=
animations
,
completion
=
completion
]
in
guard
let
s
=
self
else
{
return
...
...
Sources/iOS/TabBar.swift
View file @
c3ff9361
...
...
@@ -408,9 +408,9 @@ fileprivate extension TabBar {
selectedTabItem
=
tabItem
line
.
animate
(
.
duration
(
0.25
),
.
size
(
CGSize
(
width
:
tabItem
.
width
,
height
:
lineHeight
)
),
.
position
(
CGPoint
(
x
:
tabItem
.
center
.
x
,
y
:
.
bottom
==
lineAlignment
?
height
-
lineHeight
/
2
:
lineHeight
/
2
)
),
.
completion
{
[
weak
self
,
isTriggeredByUserInteraction
=
isTriggeredByUserInteraction
,
tabItem
=
tabItem
,
completion
=
completion
]
_
in
.
size
(
width
:
tabItem
.
width
,
height
:
lineHeight
),
.
position
(
x
:
tabItem
.
center
.
x
,
y
:
.
bottom
==
lineAlignment
?
height
-
lineHeight
/
2
:
lineHeight
/
2
),
.
completion
({
[
weak
self
,
isTriggeredByUserInteraction
=
isTriggeredByUserInteraction
,
tabItem
=
tabItem
,
completion
=
completion
]
in
guard
let
s
=
self
else
{
return
}
...
...
@@ -420,7 +420,7 @@ fileprivate extension TabBar {
}
completion
?(
tabItem
)
})
})
)
updateScrollView
()
}
...
...
Sources/iOS/TabsController.swift
View file @
c3ff9361
...
...
@@ -360,7 +360,7 @@ extension TabsController {
return
}
Motion
.
delay
(
0
)
{
[
weak
self
]
in
Motion
.
async
{
[
weak
self
]
in
guard
let
s
=
self
else
{
return
}
...
...
Sources/iOS/TextStorage.swift
View file @
c3ff9361
...
...
@@ -105,7 +105,7 @@ extension TextStorage {
If you don't need this value, pass NULL.
- Returns: The attributes for the character at index.
*/
open
override
func
attributes
(
at
location
:
Int
,
effectiveRange
range
:
NSRangePointer
?)
->
[
String
:
Any
]
{
open
override
func
attributes
(
at
location
:
Int
,
effectiveRange
range
:
NSRangePointer
?)
->
[
NSAttributedStringKey
:
Any
]
{
return
storage
.
attributes
(
at
:
location
,
effectiveRange
:
range
)
}
...
...
@@ -126,7 +126,7 @@ extension TextStorage {
- Parameter range: A range of characters that will have their
attributes updated.
*/
open
override
func
setAttributes
(
_
attrs
:
[
String
:
Any
]?,
range
:
NSRange
)
{
open
override
func
setAttributes
(
_
attrs
:
[
NSAttributedStringKey
:
Any
]?,
range
:
NSRange
)
{
storage
.
setAttributes
(
attrs
,
range
:
range
)
edited
(
.
editedAttributes
,
range
:
range
,
changeInLength
:
0
)
}
...
...
@@ -138,7 +138,7 @@ extension TextStorage {
- Parameter range: A range of characters that will have their
attributes added.
*/
open
override
func
addAttribute
(
_
name
:
String
,
value
:
Any
,
range
:
NSRange
)
{
open
override
func
addAttribute
(
_
name
:
NSAttributedStringKey
,
value
:
Any
,
range
:
NSRange
)
{
storage
.
addAttribute
(
name
,
value
:
value
,
range
:
range
)
edited
(
.
editedAttributes
,
range
:
range
,
changeInLength
:
0
)
}
...
...
@@ -149,7 +149,7 @@ extension TextStorage {
- Parameter range: A range of characters that will have their
attributes removed.
*/
open
override
func
removeAttribute
(
_
name
:
String
,
range
:
NSRange
)
{
open
override
func
removeAttribute
(
_
name
:
NSAttributedStringKey
,
range
:
NSRange
)
{
storage
.
removeAttribute
(
name
,
range
:
range
)
edited
(
.
editedAttributes
,
range
:
range
,
changeInLength
:
0
)
}
...
...
Sources/iOS/TransitionController.swift
View file @
c3ff9361
...
...
@@ -162,6 +162,7 @@ internal extension TransitionController {
}
/// A method that prepares the rootViewController.
@objc
func
prepareRootViewController
()
{
prepare
(
viewController
:
rootViewController
,
in
:
container
)
}
...
...
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