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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
31 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/PopupInfoViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
0824cd1
...
...
@@ -6138,20 +6138,23 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gdC-Cm-zRe"
>
<rect
key=
"frame"
x=
"16"
y=
"93"
width=
"382"
height=
"211"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ehx-JG-A7m"
>
<rect
key=
"frame"
x=
"36"
y=
"53"
width=
"342"
height=
"233.5
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"382"
height=
"211
"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1to-ht-Vk8"
userLabel=
"Header View"
>
<rect
key=
"frame"
x=
"24"
y=
"30"
width=
"29
4"
height=
"20"
/>
<rect
key=
"frame"
x=
"24"
y=
"30"
width=
"33
4"
height=
"20"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"SUPERMARKET DEALS"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"JEh-zR-MnJ"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"24
4"
height=
"20"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"28
4"
height=
"20"
/>
<fontDescription
key=
"fontDescription"
name=
"BTCosmo-Bold"
family=
"BTCosmo"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.12941176470588234"
green=
"0.12941176470588234"
blue=
"0.12941176470588234"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"M8y-6I-J6x"
>
<rect
key=
"frame"
x=
"26
4"
y=
"-5"
width=
"30"
height=
"30"
/>
<rect
key=
"frame"
x=
"30
4"
y=
"-5"
width=
"30"
height=
"30"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"30"
id=
"V5H-6n-5Pt"
/>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"jXV-Lb-fSI"
/>
...
...
@@ -6164,7 +6167,7 @@
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor
"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace
"
/>
<constraints>
<constraint
firstItem=
"M8y-6I-J6x"
firstAttribute=
"leading"
secondItem=
"JEh-zR-MnJ"
secondAttribute=
"trailing"
constant=
"20"
id=
"4hl-Cn-B5V"
/>
<constraint
firstItem=
"M8y-6I-J6x"
firstAttribute=
"centerY"
secondItem=
"1to-ht-Vk8"
secondAttribute=
"centerY"
id=
"daz-VI-SZh"
/>
...
...
@@ -6175,14 +6178,14 @@
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Ly9-LO-Xmv"
>
<rect
key=
"frame"
x=
"24"
y=
"67"
width=
"294"
height=
"98.5
"
/>
<rect
key=
"frame"
x=
"24"
y=
"67"
width=
"334"
height=
"79
"
/>
<string
key=
"text"
>
Δημιούργησε το δικό σου ενιαίο κουπόνι προσφορών, και εξαργύρωσέ το στα supermarket της επιλογής σου γρήγορα και εύκολα με ένα μόνο κωδικό κουπονιού!
</string>
<fontDescription
key=
"fontDescription"
name=
"PeridotPE-Regular"
family=
"Peridot PE"
pointSize=
"16"
/>
<color
key=
"textColor"
red=
"0.12941176470588234"
green=
"0.12941176470588234"
blue=
"0.12941176470588234"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"rCv-5F-ecY"
>
<rect
key=
"frame"
x=
"279"
y=
"185.5
"
width=
"39"
height=
"30"
/>
<rect
key=
"frame"
x=
"319"
y=
"166
"
width=
"39"
height=
"30"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<fontDescription
key=
"fontDescription"
name=
"PeridotPE-Bold"
family=
"Peridot PE"
pointSize=
"14"
/>
<inset
key=
"imageEdgeInsets"
minX=
"0.0"
minY=
"0.0"
maxX=
"2.2250738585072014e-308"
maxY=
"0.0"
/>
...
...
@@ -6194,29 +6197,39 @@
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor
"
/>
<color
key=
"backgroundColor"
red=
"0.90196078431372551"
green=
"0.90196078431372551"
blue=
"0.90196078431372551"
alpha=
"1"
colorSpace=
"calibratedRGB
"
/>
<constraints>
<constraint
firstItem=
"Ly9-LO-Xmv"
firstAttribute=
"top"
secondItem=
"1to-ht-Vk8"
secondAttribute=
"bottom"
constant=
"17"
id=
"8nE-IM-1jS"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"1to-ht-Vk8"
secondAttribute=
"trailing"
constant=
"24"
id=
"8nH-dw-rXK"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"rCv-5F-ecY"
secondAttribute=
"trailing"
constant=
"24"
id=
"AEH-FO-xUb"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Ly9-LO-Xmv"
secondAttribute=
"trailing"
constant=
"24"
id=
"BV0-uq-SHR"
/>
<constraint
firstItem=
"1to-ht-Vk8"
firstAttribute=
"top"
secondItem=
"ehx-JG-A7m"
secondAttribute=
"top"
constant=
"30"
id=
"DzL-bD-6Pq"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"rCv-5F-ecY"
secondAttribute=
"bottom"
constant=
"18
"
id=
"frf-D2-GXY"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"rCv-5F-ecY"
secondAttribute=
"bottom"
constant=
"15
"
id=
"frf-D2-GXY"
/>
<constraint
firstItem=
"rCv-5F-ecY"
firstAttribute=
"top"
secondItem=
"Ly9-LO-Xmv"
secondAttribute=
"bottom"
constant=
"20"
id=
"pRj-95-8YL"
/>
<constraint
firstItem=
"Ly9-LO-Xmv"
firstAttribute=
"leading"
secondItem=
"ehx-JG-A7m"
secondAttribute=
"leading"
constant=
"24"
id=
"piV-wD-l5m"
/>
<constraint
firstItem=
"1to-ht-Vk8"
firstAttribute=
"leading"
secondItem=
"ehx-JG-A7m"
secondAttribute=
"leading"
constant=
"24"
id=
"zjd-7A-WvN"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstItem=
"ehx-JG-A7m"
firstAttribute=
"leading"
secondItem=
"gdC-Cm-zRe"
secondAttribute=
"leading"
id=
"7B0-qt-OB5"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"ehx-JG-A7m"
secondAttribute=
"bottom"
id=
"Wdj-t5-SH3"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"ehx-JG-A7m"
secondAttribute=
"trailing"
id=
"ZBA-Ev-WAA"
/>
<constraint
firstItem=
"ehx-JG-A7m"
firstAttribute=
"top"
secondItem=
"gdC-Cm-zRe"
secondAttribute=
"top"
id=
"erN-bt-18X"
/>
</constraints>
</view>
</subviews>
<viewLayoutGuide
key=
"safeArea"
id=
"Uda-xn-kJz"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstItem=
"
ehx-JG-A7m"
firstAttribute=
"leading"
secondItem=
"iDh-Ie-Yrc"
secondAttribute=
"leadingMargin"
constant=
"16"
id=
"E19-z8-RLQ
"
/>
<constraint
firstItem=
"
ehx-JG-A7m"
firstAttribute=
"top"
secondItem=
"Uda-xn-kJz"
secondAttribute=
"top"
constant=
"5"
id=
"KI7-KQ-Wr1
"
/>
<constraint
first
Attribute=
"trailingMargin"
secondItem=
"ehx-JG-A7m"
secondAttribute=
"trailing"
constant=
"16"
id=
"Tk9-CM-6Us
"
/>
<constraint
firstItem=
"
gdC-Cm-zRe"
firstAttribute=
"leading"
secondItem=
"Uda-xn-kJz"
secondAttribute=
"leading"
constant=
"16"
id=
"0WQ-K5-iI0
"
/>
<constraint
firstItem=
"
gdC-Cm-zRe"
firstAttribute=
"top"
secondItem=
"Uda-xn-kJz"
secondAttribute=
"top"
constant=
"45"
id=
"bcA-o1-n78
"
/>
<constraint
first
Item=
"Uda-xn-kJz"
firstAttribute=
"trailing"
secondItem=
"gdC-Cm-zRe"
secondAttribute=
"trailing"
constant=
"16"
id=
"q8p-FD-ngA
"
/>
</constraints>
</view>
<connections>
<outlet
property=
"containerView"
destination=
"gdC-Cm-zRe"
id=
"HVc-5J-csd"
/>
<outlet
property=
"headerCloseButton"
destination=
"M8y-6I-J6x"
id=
"196-sa-QAW"
/>
<outlet
property=
"headerLabel"
destination=
"JEh-zR-MnJ"
id=
"uqR-Sm-raV"
/>
<outlet
property=
"infoLabel"
destination=
"Ly9-LO-Xmv"
id=
"KzH-DA-Res"
/>
...
...
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
,
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