Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2024-10-17 11:50:38 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0824cd12a995fa380479d41c6ffc5675bcee0b9b
0824cd12
1 parent
9a8e25b5
PopupInfoViewController ui fixes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
22 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/PopupInfoViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
0824cd1
This diff is collapsed. Click to expand it.
SwiftWarplyFramework/SwiftWarplyFramework/PopupInfoViewController.swift
View file @
0824cd1
...
...
@@ -8,6 +8,7 @@
import
UIKit
class
PopupInfoViewController
:
UIViewController
{
@IBOutlet
weak
var
containerView
:
UIView
!
@IBOutlet
weak
var
popupView
:
UIView
!
@IBOutlet
weak
var
headerLabel
:
UILabel
!
@IBOutlet
weak
var
headerCloseButton
:
UIButton
!
...
...
@@ -18,29 +19,33 @@ class PopupInfoViewController: UIViewController {
super
.
viewDidLoad
()
// Add arrow programmatically
let
arrowSize
=
CGSize
(
width
:
30
,
height
:
15
)
// Width and height of the arrow
let
arrowView
=
ArrowView
(
frame
:
CGRect
(
x
:
(
self
.
view
.
frame
.
width
-
arrowSize
.
width
)
/
2
,
y
:
popupView
.
frame
.
minY
-
arrowSize
.
height
,
width
:
arrowSize
.
width
,
height
:
arrowSize
.
height
))
let
arrowSize
=
CGSize
(
width
:
15
,
height
:
7.5
)
// Width and height of the arrow
let
arrowView
=
ArrowView
(
frame
:
CGRect
(
x
:
(
popupView
.
frame
.
width
-
arrowSize
.
width
-
35
),
y
:
popupView
.
frame
.
minY
-
arrowSize
.
height
,
width
:
arrowSize
.
width
,
height
:
arrowSize
.
height
))
self
.
view
.
addSubview
(
arrowView
)
self
.
view
.
bringSubviewToFront
(
popupView
)
containerView
.
addSubview
(
arrowView
)
// containerView.bringSubviewToFront(popupView)
// Add shadow
containerView
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.57
)
.
cgColor
containerView
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
3.0
)
containerView
.
layer
.
shadowOpacity
=
1.0
containerView
.
layer
.
shadowRadius
=
20.0
containerView
.
layer
.
masksToBounds
=
false
containerView
.
backgroundColor
=
.
clear
popupView
.
backgroundColor
=
UIColor
(
rgb
:
0xE6E6E6
)
popupView
.
layer
.
cornerRadius
=
14
// Add shadow
popupView
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.57
)
.
cgColor
popupView
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
3.0
)
popupView
.
layer
.
shadowOpacity
=
1.0
popupView
.
layer
.
shadowRadius
=
20.0
headerLabel
.
font
=
UIFont
(
name
:
"BTCosmo-Bold"
,
size
:
17
)
headerLabel
.
textColor
=
UIColor
(
rgb
:
0x212121
)
headerLabel
.
text
=
"SUPERMARKET DEALS"
headerCloseButton
.
setImage
(
UIImage
(
named
:
"ic_close_3.png"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
),
for
:
.
normal
)
headerCloseButton
.
imageView
?
.
layer
.
transform
=
CATransform3DMakeScale
(
1.
5
,
1.5
,
1.5
)
headerCloseButton
.
imageView
?
.
layer
.
transform
=
CATransform3DMakeScale
(
1.
3
,
1.3
,
1.3
)
infoLabel
.
font
=
UIFont
(
name
:
"PeridotPE-Regular"
,
size
:
16.0
)
infoLabel
.
textColor
=
UIColor
(
rgb
:
0x212121
)
...
...
@@ -52,15 +57,6 @@ class PopupInfoViewController: UIViewController {
submitButton
.
frame
.
size
.
width
=
submitButton
.
intrinsicContentSize
.
width
}
func
adaptivePresentationStyle
(
for
controller
:
UIPresentationController
)
->
UIModalPresentationStyle
{
return
UIModalPresentationStyle
.
none
}
func
adaptivePresentationStyle
(
for
controller
:
UIPresentationController
,
traitCollection
:
UITraitCollection
)
->
UIModalPresentationStyle
{
// return UIModalPresentationStyle.FullScreen
return
UIModalPresentationStyle
.
none
}
// MARK: - Actions
@IBAction
func
headerCloseButtonAction
(
_
sender
:
Any
)
{
self
.
dismiss
(
animated
:
true
,
completion
:
{})
...
...
Please
register
or
login
to post a comment