Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangyongji
/
MRFramework
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
79aa06f8
authored
Oct 24, 2019
by
Sarkizz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2a9cb705
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
MRFramework/MRFramework/UIControls/PhotoPicker/SAPhotoPicker.swift
+8
-4
No files found.
MRFramework/MRFramework/UIControls/PhotoPicker/SAPhotoPicker.swift
View file @
79aa06f8
...
@@ -76,7 +76,7 @@ public class SAPhotoPicker: NSObject {
...
@@ -76,7 +76,7 @@ public class SAPhotoPicker: NSObject {
}))
}))
alert
.
addAction
(
UIAlertAction
(
title
:
config
[
.
albumTitle
]
as?
String
,
alert
.
addAction
(
UIAlertAction
(
title
:
config
[
.
albumTitle
]
as?
String
,
style
:
.
default
,
handler
:
{
_
in
style
:
.
default
,
handler
:
{
_
in
self
.
showCustomAlbum
(
count
)
self
.
showCustomAlbum
(
count
,
from
:
viewController
)
}))
}))
alert
.
addAction
(
UIAlertAction
(
title
:
"取消"
,
style
:
.
cancel
,
handler
:
{
_
in
alert
.
addAction
(
UIAlertAction
(
title
:
"取消"
,
style
:
.
cancel
,
handler
:
{
_
in
complate
?(
nil
,
nil
,
0
,
nil
)
complate
?(
nil
,
nil
,
0
,
nil
)
...
@@ -93,7 +93,7 @@ public class SAPhotoPicker: NSObject {
...
@@ -93,7 +93,7 @@ public class SAPhotoPicker: NSObject {
self
.
showImagePicker
(
.
savedPhotosAlbum
)
self
.
showImagePicker
(
.
savedPhotosAlbum
)
break
break
case
.
custom
(
let
count
):
case
.
custom
(
let
count
):
self
.
showCustomAlbum
(
count
)
self
.
showCustomAlbum
(
count
,
from
:
viewController
)
break
break
}
}
}
}
...
@@ -109,7 +109,7 @@ extension SAPhotoPicker {
...
@@ -109,7 +109,7 @@ extension SAPhotoPicker {
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
?
.
present
(
vc
,
animated
:
true
,
completion
:
nil
)
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
?
.
present
(
vc
,
animated
:
true
,
completion
:
nil
)
}
}
private
func
showCustomAlbum
(
_
count
:
Int
)
{
private
func
showCustomAlbum
(
_
count
:
Int
,
from
viewController
:
UIViewController
?
)
{
let
vc
=
MRAlbumListViewController
()
let
vc
=
MRAlbumListViewController
()
vc
.
title
=
config
[
.
albumTitle
]
as?
String
vc
.
title
=
config
[
.
albumTitle
]
as?
String
vc
.
maxCount
=
count
vc
.
maxCount
=
count
...
@@ -124,7 +124,11 @@ extension SAPhotoPicker {
...
@@ -124,7 +124,11 @@ extension SAPhotoPicker {
}
}
customAlbumSetting
?(
self
,
vc
)
customAlbumSetting
?(
self
,
vc
)
let
nav
=
UINavigationController
(
rootViewController
:
vc
)
let
nav
=
UINavigationController
(
rootViewController
:
vc
)
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
?
.
present
(
nav
,
animated
:
true
,
completion
:
nil
)
if
let
from
=
viewController
{
from
.
present
(
nav
,
animated
:
true
)
}
else
{
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
?
.
present
(
nav
,
animated
:
true
)
}
}
}
private
func
navTitle
(
with
sourceType
:
UIImagePickerController
.
SourceType
)
->
String
?
{
private
func
navTitle
(
with
sourceType
:
UIImagePickerController
.
SourceType
)
->
String
?
{
...
...
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