Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-ios
Commits
7620d2d4
Verified
Commit
7620d2d4
authored
Feb 05, 2019
by
Eyad Hasan
Browse files
Adding code for an info-bubble pop when something is added to favorites
parent
90b5fc73
Changes
1
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/WhatsOpen/Views/DetailViewButtonsViewController.swift
View file @
7620d2d4
...
...
@@ -16,6 +16,8 @@ class DetailViewButtonsViewController: UIViewController, INUIAddVoiceShortcutVie
@IBOutlet
var
facilityDetailView
:
UIView
!
private
var
infoBubbleView
:
UIView
!
var
detailViewController
:
WOPFacilityDetailViewController
?
var
facility
:
WOPFacility
!
...
...
@@ -40,10 +42,25 @@ class DetailViewButtonsViewController: UIViewController, INUIAddVoiceShortcutVie
}
else
{
// else add it to favorites
_
=
WOPUtilities
.
addFavoriteFacility
(
facility
)
loadInfoBubbleView
()
}
setFavoriteButtonText
()
}
private
func
loadInfoBubbleView
()
{
let
infoBubbleFrame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
view
.
frame
.
width
,
height
:
view
.
frame
.
height
-
200
)
infoBubbleView
=
UIView
(
frame
:
infoBubbleFrame
)
view
.
addSubview
(
infoBubbleView
)
infoBubbleView
.
isHidden
=
false
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2.0
)
{
self
.
infoBubbleView
.
isHidden
=
true
}
}
func
getDirections
(
_
sender
:
Any
)
{
let
appToUse
=
WOPDatabaseController
.
getDefaults
()
.
value
(
forKey
:
"mapsApp"
)
as?
String
...
...
@@ -107,6 +124,7 @@ class DetailViewButtonsViewController: UIViewController, INUIAddVoiceShortcutVie
self
.
addChild
(
self
.
detailViewController
!
)
self
.
addSubview
(
self
.
detailViewController
!.
view
,
toView
:
self
.
facilityDetailView
)
super
.
viewDidLoad
()
infoBubbleView
.
isHidden
=
true
setFavoriteButtonText
()
favoritesButton
.
tintColor
=
UIColor
.
white
...
...
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