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
2022-06-20 18:07:17 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d6cdc81f95feb28039504f429a1e14cdfc06f77b
d6cdc81f
1 parent
c3ed3c6b
dynamic CouponViewController
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
3 deletions
SwiftWarplyFramework/.DS_Store
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/.DS_Store
View file @
d6cdc81
No preview for this file type
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
d6cdc81
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
d6cdc81
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d6cdc81
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
d6cdc81
...
...
@@ -13,7 +13,10 @@ import UIKit
@IBOutlet
weak
var
backgroundImage
:
UIImageView
!
@IBOutlet
weak
var
scrollView
:
UIScrollView
!
@IBOutlet
weak
var
scrollContentView
:
UIView
!
@IBOutlet
weak
var
couponImage
:
UIImageView
!
@IBOutlet
weak
var
couponImageHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
nameLabel
:
UILabel
!
@IBOutlet
weak
var
descriptionLabel
:
UILabel
!
@IBOutlet
weak
var
redeemButton
:
UIButton
!
@IBOutlet
weak
var
termsButton
:
UIButton
!
@IBOutlet
weak
var
termsTextView
:
UITextView
!
...
...
@@ -23,6 +26,8 @@ import UIKit
var
termsVisible
:
Bool
=
false
;
public
var
couponset
:
swiftApi
.
CouponSetItemModel
?
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -36,14 +41,19 @@ import UIKit
scrollView
.
layer
.
cornerRadius
=
30
scrollView
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
]
// Top left corner radius
couponImage
.
load
(
link
:
couponset
?
.
img_preview
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
couponImage
.
contentMode
=
.
scaleAspectFill
couponImageHeight
.
constant
=
self
.
uiscreen
.
height
*
0.25
nameLabel
.
text
=
couponset
?
.
name
??
""
descriptionLabel
.
text
=
couponset
?
.
short_description
??
""
redeemButton
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
15
,
weight
:
.
medium
)
termsButton
.
titleLabel
?
.
font
=
.
systemFont
(
ofSize
:
15.0
,
weight
:
.
semibold
)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
let
htmlText
=
"<p>Το κουπόνι ισχύει έως 05/12/2022</p>
\n
"
let
htmlText
=
couponset
?
.
terms
??
"
"
termsTextView
.
attributedText
=
htmlText
.
htmlToAttributedString
termsTextView
.
font
=
UIFont
.
systemFont
(
ofSize
:
14
,
weight
:
UIFont
.
Weight
.
regular
)
termsTextView
.
textColor
=
UIColor
(
red
:
0.25
,
green
:
0.33
,
blue
:
0.39
,
alpha
:
1.00
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
d6cdc81
...
...
@@ -730,8 +730,11 @@
</view>
<connections>
<outlet
property=
"backgroundImage"
destination=
"Oep-XD-blB"
id=
"YaT-qr-rry"
/>
<outlet
property=
"couponImage"
destination=
"3SX-fR-ph2"
id=
"Ov2-Bw-eWL"
/>
<outlet
property=
"couponImageHeight"
destination=
"zUx-Yd-in7"
id=
"7vo-8L-d8o"
/>
<outlet
property=
"descriptionLabel"
destination=
"dSA-lM-N5v"
id=
"v6k-3l-uaA"
/>
<outlet
property=
"mainView"
destination=
"Jqu-cp-CWU"
id=
"Q0Z-dO-MXL"
/>
<outlet
property=
"nameLabel"
destination=
"isU-Qv-94G"
id=
"Vc8-gh-Cth"
/>
<outlet
property=
"redeemButton"
destination=
"FCd-hv-dHg"
id=
"3Jw-Yn-uNr"
/>
<outlet
property=
"scrollContentView"
destination=
"uTN-Qr-wBi"
id=
"pPq-Lh-qVN"
/>
<outlet
property=
"scrollView"
destination=
"1N5-oA-ZTb"
id=
"qee-AV-Oev"
/>
...
...
Please
register
or
login
to post a comment