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
2023-03-15 17:52:18 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21ee16fe463932d4ae177813843f87148259e519
21ee16fe
1 parent
9537ccc4
add clickable links to CouponViewController
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
6 deletions
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/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
21ee16f
...
...
@@ -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 @
21ee16f
...
...
@@ -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 @
21ee16f
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
21ee16f
...
...
@@ -8,7 +8,7 @@
import
UIKit
import
SwiftEventBus
@objc
public
class
CouponViewController
:
UIViewController
{
@objc
public
class
CouponViewController
:
UIViewController
,
UITextViewDelegate
{
@IBOutlet
weak
var
mainView
:
UIView
!
@IBOutlet
weak
var
backgroundImage
:
UIImageView
!
@IBOutlet
weak
var
scrollView
:
UIScrollView
!
...
...
@@ -16,10 +16,11 @@ import SwiftEventBus
@IBOutlet
weak
var
couponImage
:
UIImageView
!
@IBOutlet
weak
var
couponImageHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
nameLabel
:
UILabel
!
@IBOutlet
weak
var
descriptionLabel
:
UILabel
!
@IBOutlet
weak
var
descriptionTextView
:
UnselectableTappableTextView
!
@IBOutlet
weak
var
descriptionTextViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
redeemButton
:
UIButton
!
@IBOutlet
weak
var
termsButton
:
UIButton
!
@IBOutlet
weak
var
termsTextView
:
U
I
TextView
!
@IBOutlet
weak
var
termsTextView
:
U
nselectableTappable
TextView
!
@IBOutlet
weak
var
termsTextViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
topBorderLine
:
UIImageView
!
...
...
@@ -39,6 +40,8 @@ import SwiftEventBus
super
.
viewDidLoad
()
self
.
hidesBottomBarWhenPushed
=
true
descriptionTextView
.
delegate
=
self
termsTextView
.
delegate
=
self
// Do any additional setup after loading the view.
setBackButton
()
...
...
@@ -78,7 +81,19 @@ import SwiftEventBus
nameLabel
.
text
=
couponset
?
.
name
??
""
let
htmlDescrText
=
couponset
?
.
description
??
""
descriptionLabel
.
text
=
htmlDescrText
.
htmlToString
descriptionTextView
.
attributedText
=
htmlDescrText
.
htmlToAttributedString
descriptionTextView
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Regular"
,
size
:
17
)
descriptionTextView
.
textColor
=
UIColor
(
red
:
0.25
,
green
:
0.33
,
blue
:
0.39
,
alpha
:
1.00
)
descriptionTextView
.
textAlignment
=
.
center
descriptionTextView
.
isScrollEnabled
=
false
descriptionTextView
.
isUserInteractionEnabled
=
true
descriptionTextView
.
isEditable
=
false
descriptionTextView
.
isSelectable
=
true
descriptionTextView
.
dataDetectorTypes
=
[
.
link
]
let
targetSize
=
CGSize
(
width
:
descriptionTextView
.
frame
.
width
,
height
:
CGFloat
(
MAXFLOAT
))
descriptionTextViewHeight
.
constant
=
descriptionTextView
.
sizeThatFits
(
targetSize
)
.
height
redeemButton
.
setTitle
(
"Απόκτησέ το"
,
for
:
.
normal
)
redeemButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
...
...
@@ -114,6 +129,10 @@ import SwiftEventBus
termsTextView
.
textColor
=
UIColor
(
red
:
0.25
,
green
:
0.33
,
blue
:
0.39
,
alpha
:
1.00
)
termsTextView
.
textAlignment
=
.
center
termsTextView
.
isScrollEnabled
=
false
termsTextView
.
isUserInteractionEnabled
=
true
termsTextView
.
isEditable
=
false
termsTextView
.
isSelectable
=
true
termsTextView
.
dataDetectorTypes
=
[
.
link
]
toggleTerms
()
...
...
@@ -126,6 +145,13 @@ import SwiftEventBus
}
public
func
textView
(
_
textView
:
UITextView
,
shouldInteractWith
URL
:
URL
,
in
characterRange
:
NSRange
,
interaction
:
UITextItemInteraction
)
->
Bool
{
UIApplication
.
shared
.
open
(
URL
)
// Disable `.preview` by 3D Touch and other interactions
return
false
}
// MARK: - Functions
func
nonTelcoDialog
(
_
alertTitle
:
String
,
_
alertSubTitle
:
String
)
->
Void
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
21ee16f
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment