Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kt-ios
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Виктор
kt-ios
Commits
e92882a0
Commit
e92882a0
authored
Dec 14, 2017
by
Olzhas Aldabergenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes
parent
67e7b8ba
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
144 additions
and
177 deletions
+144
-177
project.pbxproj
kt.xcodeproj/project.pbxproj
+0
-4
UserInterfaceState.xcuserstate
...cuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ata/neox.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+35
-19
Main.storyboard
kt/Resources/Base.lproj/Main.storyboard
+0
-0
Info.plist
kt/Supporting Files/Info.plist
+2
-2
AccountServicesViewController.swift
...ewControllers/Cabinet/AccountServicesViewController.swift
+31
-2
LoginViewController.swift
kt/ViewControllers/Cabinet/Login/LoginViewController.swift
+6
-6
StepViewController.swift
kt/ViewControllers/Cabinet/Login/StepViewController.swift
+1
-0
PaymentsHistoryViewController.swift
...binet/cashAndPayments/PaymentsHistoryViewController.swift
+38
-1
UICreateFastPayViewController.swift
...ewControllers/FastPay/UICreateFastPayViewController.swift
+6
-3
ServiceCalculatorViewController.swift
...Controllers/Service/ServiceCalculatorViewController.swift
+0
-133
ServiceVIPTableViewController.swift
...ewControllers/Service/ServiceVIPTableViewController.swift
+18
-4
WiFiTableViewController.swift
kt/ViewControllers/WiFi/WiFiTableViewController.swift
+1
-0
VIPTVCell.swift
kt/Views/VIPTVCell.swift
+6
-3
No files found.
kt.xcodeproj/project.pbxproj
View file @
e92882a0
...
...
@@ -95,7 +95,6 @@
3E6969B31FA2097200032D95
/* ServiceDetailsViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E6969B21FA2097200032D95
/* ServiceDetailsViewController.swift */
;
};
3E7A5B371FD95F4C0040F7A6
/* UITextField+Extensions.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E7A5B361FD95F4C0040F7A6
/* UITextField+Extensions.swift */
;
};
3E8D31161FB1AA3500A650D2
/* VIPCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E8D31151FB1AA3500A650D2
/* VIPCell.swift */
;
};
3EA73F081FAAE6620009731F
/* ServiceCalculatorViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3EA73F071FAAE6620009731F
/* ServiceCalculatorViewController.swift */
;
};
3EA7F6BA1F00D1A1003F6CBF
/* MainViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3EA7F6B91F00D1A1003F6CBF
/* MainViewController.swift */
;
};
3EA7F6C51F021C9D003F6CBF
/* FeedViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3EA7F6C41F021C9D003F6CBF
/* FeedViewController.swift */
;
};
3EA7F6C71F0227E1003F6CBF
/* FeedItem.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3EA7F6C61F0227E1003F6CBF
/* FeedItem.swift */
;
};
...
...
@@ -652,7 +651,6 @@
3E6969B21FA2097200032D95
/* ServiceDetailsViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ServiceDetailsViewController.swift
;
sourceTree
=
"<group>"
;
};
3E7A5B361FD95F4C0040F7A6
/* UITextField+Extensions.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"UITextField+Extensions.swift"
;
sourceTree
=
"<group>"
;
};
3E8D31151FB1AA3500A650D2
/* VIPCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
VIPCell.swift
;
sourceTree
=
"<group>"
;
};
3EA73F071FAAE6620009731F
/* ServiceCalculatorViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ServiceCalculatorViewController.swift
;
sourceTree
=
"<group>"
;
};
3EA7F6B91F00D1A1003F6CBF
/* MainViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MainViewController.swift
;
sourceTree
=
"<group>"
;
};
3EA7F6C41F021C9D003F6CBF
/* FeedViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FeedViewController.swift
;
sourceTree
=
"<group>"
;
};
3EA7F6C61F0227E1003F6CBF
/* FeedItem.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FeedItem.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1265,7 +1263,6 @@
3EA7F6EB1F04FDCB003F6CBF
/* ServiceMainCell.swift */
,
3EAFC48F1F7916A500BB07AD
/* CallbackViewController.swift */
,
3E6969B21FA2097200032D95
/* ServiceDetailsViewController.swift */
,
3EA73F071FAAE6620009731F
/* ServiceCalculatorViewController.swift */
,
3EC107C41FB019A600EB2188
/* ServiceVIPTableViewController.swift */
,
);
path
=
Service
;
...
...
@@ -2697,7 +2694,6 @@
9843762A1DC4AAEA00FBF2B3
/* UIView+Util.swift in Sources */
,
984A73881CEC76D0005C26F6
/* UITableViewCell+PresentingViewController.swift in Sources */
,
3EB108581F15F428000EAE88
/* BotViewController.swift in Sources */
,
3EA73F081FAAE6620009731F
/* ServiceCalculatorViewController.swift in Sources */
,
3EA7F6F01F074BF9003F6CBF
/* AccountServices.swift in Sources */
,
3EAFC4771F6A926A00BB07AD
/* MainKnowedgeViewController.swift in Sources */
,
987457B01CFDDA3800BB32C6
/* OfferFormTitleCell.swift in Sources */
,
...
...
kt.xcworkspace/xcuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e92882a0
No preview for this file type
kt.xcworkspace/xcuserdata/neox.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
e92882a0
...
...
@@ -25,22 +25,6 @@
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Cabinet/AccountServicesViewController.swift"
timestampString =
"528871513.42196"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"190"
endingLineNumber =
"190"
landmarkName =
"megalineInfoAction(sender:event:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/CallbackViewController.swift"
timestampString =
"528032989.334432"
startingColumnNumber =
"9223372036854775807"
...
...
@@ -138,14 +122,46 @@
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/ServiceVIPTableViewController.swift"
timestampString =
"534
249690.79964
2"
timestampString =
"534
767021.31477
2"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"3
05
"
endingLineNumber =
"3
05
"
startingLineNumber =
"3
14
"
endingLineNumber =
"3
14
"
landmarkName =
"updateTotal()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Cabinet/cashAndPayments/PaymentsHistoryViewController.swift"
timestampString =
"534837511.617012"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"147"
endingLineNumber =
"147"
landmarkName =
"numberOfSections(in:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Cabinet/cashAndPayments/PaymentsHistoryViewController.swift"
timestampString =
"534837511.617012"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"142"
endingLineNumber =
"142"
landmarkName =
"tableView(_:numberOfRowsInSection:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
kt/Resources/Base.lproj/Main.storyboard
View file @
e92882a0
This diff is collapsed.
Click to expand it.
kt/Supporting Files/Info.plist
View file @
e92882a0
...
...
@@ -17,11 +17,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0.
2
<
/string
>
<
string
>
1.0.
3
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
8
0
<
/string
>
<
string
>
8
1
<
/string
>
<
k
e
y
>
Fabric
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
APIKey
<
/k
e
y
>
...
...
kt/ViewControllers/Cabinet/AccountServicesViewController.swift
View file @
e92882a0
...
...
@@ -58,6 +58,27 @@ class AccountServicesViewController: ViewControllerWithMenu {
extension
AccountServicesViewController
{
func
tableView
(
tableView
:
UITableView
,
didSelectRowAtIndexPath
indexPath
:
NSIndexPath
)
{
switch
indexPath
.
section
{
case
Sections
.
Phones
:
break
case
Sections
.
Altel
:
self
.
altel4GActionAction
(
indexPath
.
row
)
break
case
Sections
.
Megaline
:
self
.
megalineInfoActionAction
(
indexPath
.
row
)
break
case
Sections
.
idTvOnline
:
//self.altel4GActionAction(indexPath.row)
break
default
:
break
}
defer
{
tableView
.
deselectRowAtIndexPath
(
indexPath
,
animated
:
true
)}
}
...
...
@@ -175,9 +196,11 @@ extension AccountServicesViewController {
}
func
megalineInfoAction
(
sender
:
UIButton
,
event
:
AnyObject
)
{
let
index
=
sender
.
tag
megalineInfoActionAction
(
index
)
}
private
func
megalineInfoActionAction
(
index
:
Int
)
{
let
actionSheet
=
UIAlertController
(
title
:
nil
,
message
:
nil
,
preferredStyle
:
.
ActionSheet
)
actionSheet
.
popoverPresentationController
?
.
permittedArrowDirections
=
UIPopoverArrowDirection
.
init
(
rawValue
:
0
)
...
...
@@ -237,6 +260,10 @@ extension AccountServicesViewController {
let
index
=
sender
.
tag
}
private
func
IDTVOnlineActionAction
(
index
:
Int
)
{
let
actionSheet
=
UIAlertController
(
title
:
nil
,
message
:
nil
,
preferredStyle
:
.
ActionSheet
)
actionSheet
.
popoverPresentationController
?
.
permittedArrowDirections
=
UIPopoverArrowDirection
.
init
(
rawValue
:
0
)
...
...
@@ -258,9 +285,11 @@ extension AccountServicesViewController {
}
func
altel4gAction
(
sender
:
UIButton
,
event
:
AnyObject
)
{
let
index
=
sender
.
tag
self
.
altel4GActionAction
(
index
)
}
private
func
altel4GActionAction
(
index
:
Int
)
{
let
actionSheet
=
UIAlertController
(
title
:
nil
,
message
:
nil
,
preferredStyle
:
.
ActionSheet
)
actionSheet
.
popoverPresentationController
?
.
permittedArrowDirections
=
UIPopoverArrowDirection
.
init
(
rawValue
:
0
)
...
...
kt/ViewControllers/Cabinet/Login/LoginViewController.swift
View file @
e92882a0
...
...
@@ -217,7 +217,7 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
isPhoneMode
=
true
}
func
forgetPasswordSend
(
params
:
[
String
:
AnyObject
])
{
func
forgetPasswordSend
(
params
:
[
String
:
AnyObject
]
,
alert
:
CustomAlertViewController
)
{
Facade
.
sharedInstance
()
.
forgetPassword
(
params
,
onError
:
{
error
->
Void
in
AlertViewUtil
.
showErrorAlert
(
message
:
error
)
PKNotification
.
loading
(
false
)
...
...
@@ -225,6 +225,7 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
let
message
=
String
(
format
:
LS
(
"login.recovery.successfully_sent"
),
email
)
AlertViewUtil
.
showIncorrectAlert
(
message
)
PKNotification
.
loading
(
false
)
alert
.
close
()
})
}
...
...
@@ -293,9 +294,8 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
"type"
:
recoverType
,
"data"
:
self
.
getDataFromTextField
(
textField
)
]
as
[
String
:
AnyObject
]
self
.
forgetPasswordSend
(
params
)
self
.
forgetPasswordSend
(
params
,
alert
:
customAlertVC
)
}
alertVC
.
close
()
NSTimer
.
scheduledTimerWithTimeInterval
(
3.0
,
target
:
self
,
selector
:
Selector
(
"hideShowedAlert"
),
userInfo
:
nil
,
repeats
:
false
)
}
})
...
...
@@ -606,7 +606,7 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
"data"
:
data
]
as
[
String
:
AnyObject
]
print
(
"params
\(
params
)
"
)
self
.
forgetPasswordSend
(
params
)
self
.
forgetPasswordSend
(
params
,
alert
:
customAlertVC
)
}
})
})
...
...
@@ -653,8 +653,8 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
phoneHint
.
hidden
=
false
self
.
view
.
endEditing
(
true
)
_loginTextField
.
text
=
"+7 727 817-7224"
//"7172682610" // ntcnjdsq 7278177224
_passwordTextField
.
text
=
"123456789"
//"NewPassword1"
_loginTextField
.
text
=
"+7
"
//"+7
727 817-7224"//"7172682610" // ntcnjdsq 7278177224
_passwordTextField
.
text
=
"
"
//"
123456789"//"NewPassword1"
}
func
loginSwitchLoginSelected
()
{
...
...
kt/ViewControllers/Cabinet/Login/StepViewController.swift
View file @
e92882a0
...
...
@@ -116,6 +116,7 @@ class StepViewController : ScrolledViewController, UIAlertViewDelegate, UIPicker
PKNotification
.
loading
(
true
)
Facade
.
sharedInstance
()
.
callbackSend
(
params
,
onSuccess
:
{
(
msg
)
in
AlertViewUtil
.
showAlert
(
msg
)
customAlertVC
.
close
()
},
onError
:
{
(
error
)
in
AlertViewUtil
.
showAlert
(
error
)
},
onFinish
:
{
...
...
kt/ViewControllers/Cabinet/cashAndPayments/PaymentsHistoryViewController.swift
View file @
e92882a0
...
...
@@ -102,6 +102,8 @@ class PaymentsHistoryViewController: UIViewController, UITableViewDataSource, UI
return
tableView
.
dequeueReusableCellWithIdentifier
(
"pdfCell"
,
forIndexPath
:
indexPath
)
}
}
// UITableViewDataSource
...
...
@@ -122,7 +124,42 @@ extension PaymentsHistoryViewController {
func
tableView
(
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
var
i
=
getNumberOfRows
()
return
i
==
0
?
0
:
i
+
1
if
(
i
!=
0
)
{
i
=
i
+
1
tableView
.
separatorStyle
=
.
SingleLine
tableView
.
backgroundView
=
nil
}
else
{
let
noDataLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
bounds
.
size
.
width
,
height
:
tableView
.
bounds
.
size
.
height
))
noDataLabel
.
text
=
LS
(
"no_data"
)
noDataLabel
.
textColor
=
UIColor
.
blackColor
()
noDataLabel
.
textAlignment
=
NSTextAlignment
.
Center
tableView
.
backgroundView
=
noDataLabel
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyle
.
None
}
return
i
///i == 0 ? 0 : i + 1
}
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
var
numOfSections
:
Int
=
0
if
getNumberOfRows
()
!=
0
{
tableView
.
separatorStyle
=
.
SingleLine
numOfSections
=
1
tableView
.
backgroundView
=
nil
}
else
{
let
noDataLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
bounds
.
size
.
width
,
height
:
tableView
.
bounds
.
size
.
height
))
noDataLabel
.
text
=
LS
(
"no_data"
)
noDataLabel
.
textColor
=
UIColor
.
blackColor
()
noDataLabel
.
textAlignment
=
NSTextAlignment
.
Center
tableView
.
backgroundView
=
noDataLabel
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyle
.
None
}
return
numOfSections
}
}
...
...
kt/ViewControllers/FastPay/UICreateFastPayViewController.swift
View file @
e92882a0
...
...
@@ -8,7 +8,7 @@
import
Foundation
class
UICreateFastPayViewController
:
UI
ViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
class
UICreateFastPayViewController
:
Keyboarded
ViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UIPickerViewDelegate
,
UIPickerViewDataSource
{
//MARK: - IBOutlets
...
...
@@ -40,7 +40,9 @@ class UICreateFastPayViewController : UIViewController, UITableViewDelegate, UIT
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
createCells
()
self
.
regionPicker
.
delegate
=
self
self
.
regionPicker
.
dataSource
=
self
...
...
@@ -69,8 +71,10 @@ class UICreateFastPayViewController : UIViewController, UITableViewDelegate, UIT
loadAccountView
()
}
}
}
@IBAction
func
onItemSelected
(
sender
:
UISegmentedControl
)
{
tableView
.
reloadData
()
if
(
toggle
.
selectedSegmentIndex
==
0
)
{
...
...
@@ -352,8 +356,6 @@ class UICreateFastPayViewController : UIViewController, UITableViewDelegate, UIT
}
}
func
getGuidWithoutDash
(
input
:
String
)
->
String
{
var
guid
=
input
if
let
range
=
guid
.
rangeOfString
(
"-"
)
{
...
...
@@ -397,6 +399,7 @@ extension UICreateFastPayViewController {
return
cellsAccount
.
count
}
}
}
//MARK: UITableViewDelegate
...
...
kt/ViewControllers/Service/ServiceCalculatorViewController.swift
deleted
100644 → 0
View file @
67e7b8ba
//
// ServiceCalculatorViewController.swift
// kt
//
// Created by neox on 02.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import
Foundation
import
UIKit
class
ServiceCalculatorViewController
:
UIViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
var
serviceItem
:
ServiceItem
?
@IBOutlet
weak
var
scrollView
:
UIScrollView
!
@IBOutlet
weak
var
serviceImage
:
UIImageView
!
@IBOutlet
weak
var
servicePriceView
:
UILabel
!
@IBOutlet
weak
var
serviceNameView
:
UILabel
!
@IBOutlet
weak
var
labelWhatIsNew
:
UILabel
!
@IBOutlet
weak
var
labelSafeInternet
:
UILabel
!
@IBOutlet
weak
var
labelFastInternet
:
UILabel
!
@IBOutlet
weak
var
labelKaspersky
:
UILabel
!
@IBOutlet
weak
var
labelParentControl
:
UILabel
!
@IBOutlet
weak
var
labelPremiumTV
:
UILabel
!
@IBOutlet
weak
var
labelPremiumTV1
:
UILabel
!
@IBOutlet
weak
var
labelPremiumTV2
:
UILabel
!
@IBOutlet
weak
var
labelPremiumTV3
:
UILabel
!
@IBOutlet
weak
var
labelPremiumTV4
:
UILabel
!
@IBOutlet
weak
var
labelServiceOptions
:
UILabel
!
@IBOutlet
weak
var
tableViewServiceOption
:
UITableView
!
var
tableData
=
[
"Almaty"
,
"Aqtau"
,
"Astana"
,
"Atyrau"
]
override
func
loadView
()
{
super
.
loadView
()
self
.
title
=
serviceItem
?
.
name
self
.
scrollView
.
hidden
=
true
requestService
()
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
self
.
tableViewServiceOption
.
dataSource
=
self
self
.
tableViewServiceOption
.
delegate
=
self
}
func
load
()
{
self
.
scrollView
.
hidden
=
false
ImageLoader
.
sharedLoader
.
imageForUrl
((
self
.
serviceItem
?
.
image
.
absoluteString
)
!
)
{
(
image
,
url
)
in
if
(
image
!=
nil
)
{
self
.
serviceImage
.
image
=
image
?
.
imageWithRenderingMode
(
.
AlwaysOriginal
)
}
else
{
self
.
serviceImage
.
backgroundColor
=
UIColor
.
lightGrayColor
()
}
}
//
self
.
serviceNameView
.
text
=
self
.
serviceItem
?
.
seoTitle
?
.
uppercaseString
self
.
servicePriceView
.
text
=
(
self
.
serviceItem
?
.
rates
[
0
]
.
price
)
!//
+
" "
+
LS
(
"service_price_per_month_unit"
)
self
.
labelWhatIsNew
.
text
=
LS
(
"service_what_is_in_package"
)
self
.
labelSafeInternet
.
text
=
LS
(
"service_safe_internet"
)
.
uppercaseString
self
.
labelFastInternet
.
text
=
LS
(
"service_fast_internet"
)
self
.
labelKaspersky
.
text
=
LS
(
"service_kaspersky"
)
self
.
labelParentControl
.
text
=
LS
(
"service_parent_control"
)
self
.
labelPremiumTV
.
text
=
LS
(
"service_premium_tv"
)
self
.
labelPremiumTV1
.
text
=
LS
(
"service_premium_tv_1"
)
self
.
labelPremiumTV2
.
text
=
LS
(
"service_premium_tv_2"
)
self
.
labelPremiumTV3
.
text
=
LS
(
"service_premium_tv_3"
)
self
.
labelPremiumTV4
.
text
=
LS
(
"service_premium_tv_4"
)
self
.
labelServiceOptions
.
text
=
""
}
func
requestService
()
{
let
params
:
[
String
:
AnyObject
]
=
[
"service_id"
:
(
serviceItem
?
.
id
)
!
,
"type"
:
"landing"
]
Facade
.
sharedInstance
()
.
getLanding
(
params
,
onSuccess
:
{
(
serviceItem
)
in
self
.
serviceItem
=
serviceItem
self
.
load
()
},
onError
:
{
(
error
)
in
print
(
error
)
},
onFinish
:
{
})
}
@IBAction
func
buttonAddClicked
(
sender
:
UIButtonRoundedBlue
)
{
}
@IBAction
func
buttonCallbackClicked
(
sender
:
UIButtonRoundedGray
)
{
}
}
extension
ServiceCalculatorViewController
{
func
numberOfSectionsInTableView
(
tableView
:
UITableView
)
->
Int
{
return
1
//servicesList.count
}
func
tableView
(
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
self
.
tableData
.
count
}
// func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {
// if let cell = tableView.cellForRowAtIndexPath(indexPath) {
// cell.accessoryType = .None
// }
// }
// func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
// if let cell = tableView.cellForRowAtIndexPath(indexPath) {
// cell.accessoryType = .Checkmark
//
// }
// }
func
tableView
(
tableView
:
UITableView
,
cellForRowAtIndexPath
indexPath
:
NSIndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCellWithIdentifier
(
"cellServiceOption"
,
forIndexPath
:
indexPath
)
as
UITableViewCell
let
text
=
tableData
[
indexPath
.
row
]
cell
.
textLabel
?
.
text
=
text
return
cell
}
}
kt/ViewControllers/Service/ServiceVIPTableViewController.swift
View file @
e92882a0
...
...
@@ -40,7 +40,8 @@ class ServiceVIPTableViewController : UIViewController, UITableViewDataSource, U
var
serviceTotal
=
""
var
optionRussianPhone
=
false
var
optionTVPackageNastroiKino
=
false
//var optionTVPackageNastroiKino = false
var
optionTVPackageIndex
=
0
@IBAction
func
connectButton
(
sender
:
UIButtonRoundedBlue
)
{
let
vc
=
self
.
storyboard
!.
instantiateViewControllerWithIdentifier
(
"CallbackViewController"
)
as!
CallbackViewController
...
...
@@ -273,7 +274,7 @@ extension ServiceVIPTableViewController {
totalPrice
=
0
serviceTotal
=
""
for
index
in
0
...
numberOfRows
()
-
1
{
if
(
index
==
5
&&
selection
[
index
]
&&
optionTVPackage
NastroiKino
&&
selection
[
1
]
)
{
if
(
index
==
5
&&
selection
[
index
]
&&
optionTVPackage
Index
==
2
&&
selection
[
1
]
)
{
// skip
print
(
"nastroi kino - true"
)
}
...
...
@@ -281,6 +282,14 @@ extension ServiceVIPTableViewController {
// skip
print
(
"russian phone - true"
)
}
else
if
(
index
==
8
&&
selection
[
index
]
&&
selection
[
1
]
&&
optionTVPackageIndex
==
1
)
{
// skip
print
(
"hd base"
)
}
else
if
(
index
==
9
&&
selection
[
index
]
&&
selection
[
1
]
&&
optionTVPackageIndex
==
0
)
{
// skip
print
(
"id tv online"
)
}
else
if
(
selection
[
4
]
&&
5
<=
index
&&
index
<=
9
&&
(
selection
[
5
]
||
selection
[
6
]
||
selection
[
7
]
||
selection
[
8
]
||
selection
[
9
]
))
{
// if vip max is selected, then skip additionals
print
(
"vip max - true"
)
...
...
@@ -352,11 +361,16 @@ extension ServiceVIPTableViewController {
updateTotal
()
}
func
set
BoolOptionTVPackageNastroiKino
(
bool
:
Bool
)
{
optionTVPackage
NastroiKino
=
bool
func
set
OptionTVPackage
(
index
:
Int
)
{
optionTVPackage
Index
=
index
updateTotal
()
}
// func setBoolOptionTVPackageNastroiKino(bool: Bool) {
// optionTVPackageNastroiKino = bool
// updateTotal()
// }
func
decrementAmount
(
index
:
Int
)
{
amounts
[
index
]
=
amounts
[
index
]
-
1
}
...
...
kt/ViewControllers/WiFi/WiFiTableViewController.swift
View file @
e92882a0
...
...
@@ -92,6 +92,7 @@ extension WiFiTableViewController: UITableViewDataSource {
}
func
tableView
(
tableView
:
UITableView
,
cellForRowAtIndexPath
indexPath
:
NSIndexPath
)
->
UITableViewCell
{
print
(
indexPath
.
row
)
let
cell
=
tableView
.
dequeueReusableCellWithIdentifier
(
cellIdentifier
,
forIndexPath
:
indexPath
)
as
UITableViewCell
cell
.
textLabel
?
.
text
=
wifiPoints
?[
indexPath
.
row
]
.
title
// cell.titleLabel.text = wifiPoints?[indexPath.row].title
...
...
kt/Views/VIPTVCell.swift
View file @
e92882a0
...
...
@@ -52,11 +52,14 @@ class VIPTVCell : UITableViewCell {
func
radioButtonClick
(
sender
:
DLRadioButton
)
{
if
(
sender
==
optionButton1
)
{
vc
.
setBoolOptionTVPackageNastroiKino
(
false
)
vc
.
setOptionTVPackage
(
0
)
// vc.setBoolOptionTVPackageNastroiKino(false)
}
else
if
(
sender
==
optionButton2
)
{
vc
.
setBoolOptionTVPackageNastroiKino
(
false
)
vc
.
setOptionTVPackage
(
1
)
// vc.setBoolOptionTVPackageNastroiKino(false)
}
else
if
(
sender
==
optionButton3
)
{
vc
.
setBoolOptionTVPackageNastroiKino
(
true
)
vc
.
setOptionTVPackage
(
2
)
// vc.setBoolOptionTVPackageNastroiKino(true)
}
}
...
...
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