Commit a76111df by Olzhas Aldabergenov

VIP Calculator added

parent ba6f880c
......@@ -7,4 +7,5 @@ target 'telecom' do
# Pods for telecom
pod 'Google/Analytics'
pod 'DLRadioButton', '~> 1.4'
end
PODS:
- DLRadioButton (1.4.11)
- FirebaseAnalytics (3.5.1):
- FirebaseCore (~> 3.4)
- FirebaseInstanceID (~> 1.0)
......@@ -23,18 +24,20 @@ PODS:
- GoogleToolboxForMac/Defines (= 2.1.0)
DEPENDENCIES:
- DLRadioButton (~> 1.4)
- Google/Analytics
SPEC CHECKSUMS:
DLRadioButton: 0d04b8259e7bfd886571a1e9173c73fee7118f50
FirebaseAnalytics: 6e58fc9b397664369ac7617fb0ba93fab6ba7b5b
FirebaseCore: d0ed25f27b6f9158eccc439f1be6f92e81207e28
FirebaseInstanceID: ba1e640935235e5fac39dfa816fe7660e72e1a8a
Google: 813c467362eabc11385f5a5cc9ad0cb651a58f4e
Google: cd92fab98f800f509da88c1e0c570275713bc9d5
GoogleAnalytics: f42cc53a87a51fe94334821868d9c8481ff47a7b
GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7
GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
GoogleToolboxForMac: 2b2596cbb7186865e98cadf2b1e262d851c2b168
PODFILE CHECKSUM: 3bf25d524fe58541c9e29b6d027cadff1fdb80e9
PODFILE CHECKSUM: f6b6fc853eb653fa6693f3f5d43c6056398ddc96
COCOAPODS: 1.2.0.beta.1
COCOAPODS: 1.3.1
#import <UIKit/UIKit.h>
/**
* A hightly customizable Radio Button for iOS.
*/
IB_DESIGNABLE
NS_ASSUME_NONNULL_BEGIN
@interface DLRadioButton : UIButton
#pragma mark - Access buttons
/**
* @brief Finds out selected button in same group.
* @return Selected button.
*/
- (nullable DLRadioButton *)selectedButton;
/**
* @brief Finds out selected buttons in same group, use it only if multiple selection is enabled.
* @return Selected buttons.
*/
- (NSArray<DLRadioButton *> *)selectedButtons;
/**
* @brief Container for holding other buttons in same group.
*/
@property (nonatomic) IBOutletCollection(DLRadioButton) NSArray<DLRadioButton *> *otherButtons;
/**
* @brief Clears selection for other buttons in in same group.
*/
- (void)deselectOtherButtons;
#pragma mark - Customization
/**
* @brief Size of icon, default is kDefaulIconSize.
*/
@property (nonatomic) IBInspectable CGFloat iconSize;
/**
* @brief Color of icon, default is title color for current UIControlState.
*/
@property (nonatomic) IBInspectable UIColor *iconColor;
/**
* @brief Stroke width of icon, default is iconSize / 9.
*/
@property (nonatomic) IBInspectable CGFloat iconStrokeWidth;
/**
* @brief Size of selection indicator, default is iconSize * 0.5.
*/
@property (nonatomic) IBInspectable CGFloat indicatorSize;
/**
* @brief Color of selection indicator, default is title color for current UIControlState.
*/
@property (nonatomic) IBInspectable UIColor *indicatorColor;
/**
* @brief Margin width between icon and title, default is kDefaultMarginWidth.
*/
@property (nonatomic) IBInspectable CGFloat marginWidth;
/**
* @brief Whether icon on the right side, default is NO.
* @warning Please also set contentHorizontalAlignment to UIControlContentHorizontalAlignmentRight.
*/
@property (nonatomic, getter = isIconOnRight) IBInspectable BOOL iconOnRight;
/**
* @brief Whether use square icon, default is NO.
*/
@property (nonatomic, getter = isIconSquare) IBInspectable BOOL iconSquare;
/**
* @brief Image for radio button icon (optional).
*/
@property (nonatomic) IBInspectable UIImage *icon;
/**
* @brief Image for radio button icon when selected (optional).
*/
@property (nonatomic) IBInspectable UIImage *iconSelected;
/**
* @brief Whether enable multiple selection, default is NO.
*/
@property (nonatomic, getter = isMultipleSelectionEnabled) BOOL multipleSelectionEnabled;
/**
* @brief Duration of radio button icon animation in seconds. Set it to 0.0 to turn off animation, default is 0.3.
*/
@property (nonatomic) CFTimeInterval animationDuration;
@end
NS_ASSUME_NONNULL_END
#import "DLRadioButton.h"
static const CGFloat kDefaultIconSize = 15.0;
static const CGFloat kDefaultMarginWidth = 5.0;
static const CFTimeInterval kDefaultAnimationDuration = 0.3;
static NSString * const kGeneratedIconName = @"Generated Icon";
static BOOL _groupModifing = NO;
@implementation DLRadioButton
- (void)setOtherButtons:(NSArray *)otherButtons {
if (![DLRadioButton isGroupModifing]) {
[DLRadioButton groupModifing:YES];
for (DLRadioButton *radioButton in otherButtons) {
NSMutableArray *otherButtonsForCurrentButton = [[NSMutableArray alloc] initWithArray:otherButtons];
[otherButtonsForCurrentButton addObject:self];
[otherButtonsForCurrentButton removeObject:radioButton];
[radioButton setOtherButtons:[otherButtonsForCurrentButton copy]];
}
[DLRadioButton groupModifing:NO];
}
_otherButtons = otherButtons;
}
- (void)setIcon:(UIImage *)icon {
_icon = icon;
[self setImage:self.icon forState:UIControlStateNormal];
}
- (void)setIconSelected:(UIImage *)iconSelected {
_iconSelected = iconSelected;
[self setImage:self.iconSelected forState:UIControlStateSelected];
[self setImage:self.iconSelected forState:UIControlStateSelected | UIControlStateHighlighted];
}
- (void)setMultipleSelectionEnabled:(BOOL)multipleSelectionEnabled {
if (![DLRadioButton isGroupModifing]) {
[DLRadioButton groupModifing:YES];
for (DLRadioButton *radioButton in self.otherButtons) {
radioButton.multipleSelectionEnabled = multipleSelectionEnabled;
}
[DLRadioButton groupModifing:NO];
}
_multipleSelectionEnabled = multipleSelectionEnabled;
}
- (void)setAnimationDuration:(CFTimeInterval)animationDuration {
if (![DLRadioButton isGroupModifing]) {
[DLRadioButton groupModifing:YES];
for (DLRadioButton *radioButton in self.otherButtons) {
radioButton.animationDuration = animationDuration;
}
[DLRadioButton groupModifing:NO];
}
_animationDuration = animationDuration;
}
#pragma mark - Helpers
- (void)drawButton {
if (!self.icon || [self.icon.accessibilityIdentifier isEqualToString:kGeneratedIconName]) {
self.icon = [self drawIconWithSelection:NO];
}
if (!self.iconSelected || [self.iconSelected.accessibilityIdentifier isEqualToString:kGeneratedIconName]) {
self.iconSelected = [self drawIconWithSelection:YES];
}
CGFloat marginWidth = self.marginWidth;
BOOL isRightToLeftLayout = NO;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0) {
isRightToLeftLayout = [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft;
}
if (self.isIconOnRight) {
self.imageEdgeInsets = isRightToLeftLayout ?
UIEdgeInsetsMake(0, 0, 0, self.frame.size.width - self.icon.size.width) :
UIEdgeInsetsMake(0, self.frame.size.width - self.icon.size.width, 0, 0);
self.titleEdgeInsets = isRightToLeftLayout ?
UIEdgeInsetsMake(0, marginWidth + self.icon.size.width, 0, -self.icon.size.width) :
UIEdgeInsetsMake(0, -self.icon.size.width, 0, marginWidth + self.icon.size.width);
} else {
if (isRightToLeftLayout) {
self.imageEdgeInsets = UIEdgeInsetsMake(0, marginWidth, 0, 0);
} else {
self.titleEdgeInsets = UIEdgeInsetsMake(0, marginWidth, 0, 0);
}
}
}
- (UIImage *)drawIconWithSelection:(BOOL)selected {
UIColor *defaulColor = selected ? [self titleColorForState:UIControlStateSelected | UIControlStateHighlighted] : [self titleColorForState:UIControlStateNormal];
UIColor *iconColor = self.iconColor ? self.iconColor : defaulColor;
UIColor *indicatorColor = self.indicatorColor ? self.indicatorColor : defaulColor;
CGFloat iconSize = self.iconSize;
CGFloat iconStrokeWidth = self.iconStrokeWidth ? self.iconStrokeWidth : iconSize / 9;
CGFloat indicatorSize = self.indicatorSize ? self.indicatorSize : iconSize * 0.5;
CGRect rect = CGRectMake(0, 0, iconSize, iconSize);
CGContextRef context = UIGraphicsGetCurrentContext();
UIGraphicsPushContext(context);
UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0.0);
// draw icon
UIBezierPath* iconPath;
CGRect iconRect = CGRectMake(iconStrokeWidth / 2, iconStrokeWidth / 2, iconSize - iconStrokeWidth, iconSize - iconStrokeWidth);
if (self.isIconSquare) {
iconPath = [UIBezierPath bezierPathWithRect:iconRect];
} else {
iconPath = [UIBezierPath bezierPathWithOvalInRect:iconRect];
}
[iconColor setStroke];
iconPath.lineWidth = iconStrokeWidth;
[iconPath stroke];
CGContextAddPath(context, iconPath.CGPath);
// draw indicator
if (selected) {
UIBezierPath* indicatorPath;
CGRect indicatorRect = CGRectMake((iconSize - indicatorSize) / 2, (iconSize - indicatorSize) / 2, indicatorSize, indicatorSize);
if (self.isIconSquare) {
indicatorPath = [UIBezierPath bezierPathWithRect:indicatorRect];
} else {
indicatorPath = [UIBezierPath bezierPathWithOvalInRect:indicatorRect];
}
[indicatorColor setFill];
[indicatorPath fill];
CGContextAddPath(context, indicatorPath.CGPath);
}
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsPopContext();
UIGraphicsEndImageContext();
image.accessibilityIdentifier = kGeneratedIconName;
return image;
}
- (void)touchUpInside {
[self setSelected:YES];
}
- (void)initRadioButton {
_iconSize = kDefaultIconSize;
_marginWidth = kDefaultMarginWidth;
_animationDuration = kDefaultAnimationDuration;
[super addTarget:self action:@selector(touchUpInside) forControlEvents:UIControlEventTouchUpInside];
}
#pragma mark - NSObject
- (void)prepareForInterfaceBuilder {
[self initRadioButton];
[self drawButton];
}
#pragma mark - DLRadiobutton
+ (void)groupModifing:(BOOL)chaining {
_groupModifing = chaining;
}
+ (BOOL)isGroupModifing {
return _groupModifing;
}
- (void)deselectOtherButtons {
for (UIButton *button in self.otherButtons) {
[button setSelected:NO];
}
}
- (DLRadioButton *)selectedButton {
if (!self.isMultipleSelectionEnabled) {
if (self.selected) {
return self;
} else {
for (DLRadioButton *radioButton in self.otherButtons) {
if (radioButton.selected) {
return radioButton;
}
}
}
}
return nil;
}
- (NSArray *)selectedButtons {
NSMutableArray *selectedButtons = [[NSMutableArray alloc] init];
if (self.selected) {
[selectedButtons addObject:self];
}
for (DLRadioButton *radioButton in self.otherButtons) {
if (radioButton.selected) {
[selectedButtons addObject:radioButton];
}
}
return selectedButtons;
}
#pragma mark - UIButton
- (UIColor *)titleColorForState:(UIControlState)state {
UIColor *normalColor = [super titleColorForState:UIControlStateNormal];
if (state == (UIControlStateSelected | UIControlStateHighlighted)) {
UIColor *selectedOrHighlightedColor = [super titleColorForState:UIControlStateSelected | UIControlStateHighlighted];
if (selectedOrHighlightedColor == normalColor || selectedOrHighlightedColor == nil) {
selectedOrHighlightedColor = [super titleColorForState:UIControlStateSelected];
}
if (selectedOrHighlightedColor == normalColor || selectedOrHighlightedColor == nil) {
selectedOrHighlightedColor = [super titleColorForState:UIControlStateHighlighted];
}
[self setTitleColor:selectedOrHighlightedColor forState:UIControlStateSelected | UIControlStateHighlighted];
}
return [super titleColorForState:state];
}
#pragma mark - UIControl
- (void)setSelected:(BOOL)selected {
if ((self.isMultipleSelectionEnabled ||
(selected != self.isSelected &&
[self.icon.accessibilityIdentifier isEqualToString:kGeneratedIconName] &&
[self.iconSelected.accessibilityIdentifier isEqualToString:kGeneratedIconName])) &&
self.animationDuration > 0.0) {
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"contents"];
animation.duration = self.animationDuration;
animation.fromValue = self.isSelected ? (id)self.iconSelected.CGImage : (id)self.icon.CGImage;
animation.toValue = self.isSelected ? (id)self.icon.CGImage : (id)self.iconSelected.CGImage;
[self.imageView.layer addAnimation:animation forKey:@"icon"];
}
if (self.isMultipleSelectionEnabled) {
[super setSelected:!self.isSelected];
} else {
[super setSelected:selected];
if (selected) {
[self deselectOtherButtons];
}
}
}
#pragma mark - UIView
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
[self initRadioButton];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initRadioButton];
}
return self;
}
- (void)drawRect:(CGRect)rect {
[super drawRect:rect];
[self drawButton];
}
@end
Copyright (c) 2014 Xingruo Liu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# DLRadioButton
[![Version](https://img.shields.io/cocoapods/v/DLRadioButton.svg?style=flat)](http://cocoadocs.org/docsets/DLRadioButton)
[![License](https://img.shields.io/cocoapods/l/DLRadioButton.svg?style=flat)](http://cocoadocs.org/docsets/DLRaidoButton)
[![Platform](https://img.shields.io/cocoapods/p/DLRadioButton.svg?style=flat)](http://cocoadocs.org/docsets/DLRadioButton)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
`DLRadioButton` is an easy to use and highly customizable radio buttons control for iOS. It's a subclass of `UIButton`, and works smoothly with both `Objective-C` and `Swift`.
Since its release, DLRadioButton has become the most popular radio buttons control for iOS 🎉. Thank you for all the great feedback and making it better for all of us 👏.
## Preview
![screenshot1](Images/DLRadioButton_screenshot1.png)
## Usage
#### To install:
* Option 1: simply put `DLRadioButton.h` and `DLRadiobutton.m` in your project.
* Option 2: add `pod 'DLRadioButton', '~> 1.4'` to your `Podfile`.
* Option 3: add `github "DavydLiu/DLRadioButton" ~> 1.4` to your `Cartfile`.
#### To add radio buttons in interface builder:
1. Put some UIButtons onto a View and change the UIButtons' type to "custom".
![change UIButton Type](Images/change_UIButton_type.png)
2. Set the UIButtons' class to "DLRadioButton".
![change UIButton Class](Images/change_UIButton_class.png)
3. Set "otherButtons" outlet.
![set otherButtons outlet](Images/set_otherButtons_outlet.png)
#### To customize DLRadiobutton:
* Simply set properties directly in Interface Builder.
![design DLButton](Images/design_DLRadioButton.png)
* Property reference:
![DLRadioButton](Images/DLRadioButton.png)
#### To add radio buttons programmatically, please refer to the example project.
## Requirements
ARC, iOS 6.0
## Author
David Liu. For help or any questions, feel free to [open an issue](https://github.com/DavydLiu/DLRadioButton/issues/new).
## License
DLRadioButton is available under the MIT license.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
PODS:
- DLRadioButton (1.4.11)
- FirebaseAnalytics (3.5.1):
- FirebaseCore (~> 3.4)
- FirebaseInstanceID (~> 1.0)
......@@ -23,18 +24,20 @@ PODS:
- GoogleToolboxForMac/Defines (= 2.1.0)
DEPENDENCIES:
- DLRadioButton (~> 1.4)
- Google/Analytics
SPEC CHECKSUMS:
DLRadioButton: 0d04b8259e7bfd886571a1e9173c73fee7118f50
FirebaseAnalytics: 6e58fc9b397664369ac7617fb0ba93fab6ba7b5b
FirebaseCore: d0ed25f27b6f9158eccc439f1be6f92e81207e28
FirebaseInstanceID: ba1e640935235e5fac39dfa816fe7660e72e1a8a
Google: 813c467362eabc11385f5a5cc9ad0cb651a58f4e
Google: cd92fab98f800f509da88c1e0c570275713bc9d5
GoogleAnalytics: f42cc53a87a51fe94334821868d9c8481ff47a7b
GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7
GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
GoogleToolboxForMac: 2b2596cbb7186865e98cadf2b1e262d851c2b168
PODFILE CHECKSUM: 3bf25d524fe58541c9e29b6d027cadff1fdb80e9
PODFILE CHECKSUM: f6b6fc853eb653fa6693f3f5d43c6056398ddc96
COCOAPODS: 1.2.0.beta.1
COCOAPODS: 1.3.1
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = 'F6A77E2753C279F67F70C5C21D6FAE15'
BlueprintName = 'DLRadioButton'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'DLRadioButton.framework'>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00103D6C821BE85971C563025527BA5D"
BuildableName = "GoogleToolboxForMac.framework"
BlueprintName = "GoogleToolboxForMac"
ReferencedContainer = "container:Pods.xcodeproj">
BuildableIdentifier = 'primary'
BlueprintIdentifier = '00103D6C821BE85971C563025527BA5D'
BlueprintName = 'GoogleToolboxForMac'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'GoogleToolboxForMac.framework'>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
......@@ -41,34 +38,17 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00103D6C821BE85971C563025527BA5D"
BuildableName = "GoogleToolboxForMac.framework"
BlueprintName = "GoogleToolboxForMac"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00103D6C821BE85971C563025527BA5D"
BuildableName = "GoogleToolboxForMac.framework"
BlueprintName = "GoogleToolboxForMac"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......@@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19C19575F062144BB9C4EB62043FFEBD"
BlueprintIdentifier = "1B046EA93491D2BE9BACD8259AFD9C08"
BuildableName = "Pods_telecom.framework"
BlueprintName = "Pods-telecom"
ReferencedContainer = "container:Pods.xcodeproj">
......@@ -45,7 +45,7 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19C19575F062144BB9C4EB62043FFEBD"
BlueprintIdentifier = "1B046EA93491D2BE9BACD8259AFD9C08"
BuildableName = "Pods_telecom.framework"
BlueprintName = "Pods-telecom"
ReferencedContainer = "container:Pods.xcodeproj">
......@@ -60,15 +60,6 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19C19575F062144BB9C4EB62043FFEBD"
BuildableName = "Pods_telecom.framework"
BlueprintName = "Pods-telecom"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
......
......@@ -4,15 +4,20 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>DLRadioButton.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>GoogleToolboxForMac.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<key>isShown</key>
<false/>
</dict>
<key>Pods-telecom.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
<key>isShown</key>
<false/>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
......@@ -22,7 +27,12 @@
<key>primary</key>
<true/>
</dict>
<key>19C19575F062144BB9C4EB62043FFEBD</key>
<key>1B046EA93491D2BE9BACD8259AFD9C08</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F6A77E2753C279F67F70C5C21D6FAE15</key>
<dict>
<key>primary</key>
<true/>
......
#import <Foundation/Foundation.h>
@interface PodsDummy_DLRadioButton : NSObject
@end
@implementation PodsDummy_DLRadioButton
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "DLRadioButton.h"
FOUNDATION_EXPORT double DLRadioButtonVersionNumber;
FOUNDATION_EXPORT const unsigned char DLRadioButtonVersionString[];
framework module DLRadioButton {
umbrella header "DLRadioButton-umbrella.h"
export *
module * { export * }
}
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/DLRadioButton
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/Google" "${PODS_ROOT}/Headers/Public/GoogleAnalytics" "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DLRadioButton
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.4.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
# Acknowledgements
This application makes use of the following third party libraries:
## DLRadioButton
Copyright (c) 2014 Xingruo Liu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## FirebaseAnalytics
Copyright 2016 Google
......
......@@ -14,6 +14,35 @@
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2014 Xingruo Liu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>DLRadioButton</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright 2016 Google</string>
<key>License</key>
<string>Copyright</string>
......
......@@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
......@@ -23,9 +27,9 @@ install_framework()
source="$(readlink "${source}")"
fi
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
......@@ -54,12 +58,21 @@ install_framework()
fi
}
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
......@@ -76,7 +89,7 @@ strip_invalid_archs() {
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
......@@ -89,10 +102,12 @@ strip_invalid_archs() {
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework"
install_framework "${BUILT_PRODUCTS_DIR}/DLRadioButton/DLRadioButton.framework"
install_framework "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework"
install_framework "${BUILT_PRODUCTS_DIR}/DLRadioButton/DLRadioButton.framework"
install_framework "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
......
......@@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
......@@ -21,6 +25,9 @@ case "${TARGETED_DEVICE_FAMILY}" in
3)
TARGET_DEVICE_ARGS="--target-device tv"
;;
4)
TARGET_DEVICE_ARGS="--target-device watch"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
......@@ -41,29 +48,29 @@ EOM
fi
case $RESOURCE_PATH in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
......@@ -71,7 +78,7 @@ EOM
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH"
echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "${PODS_ROOT}/FirebaseAnalytics/Frameworks/frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks/frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks/frameworks" "${PODS_ROOT}/Google/Frameworks" "${PODS_ROOT}/GoogleInterchangeUtilities/Frameworks/frameworks" "${PODS_ROOT}/GoogleSymbolUtilities/Frameworks/frameworks"
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DLRadioButton" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "${PODS_ROOT}/FirebaseAnalytics/Frameworks/frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks/frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks/frameworks" "${PODS_ROOT}/Google/Frameworks" "${PODS_ROOT}/GoogleInterchangeUtilities/Frameworks/frameworks" "${PODS_ROOT}/GoogleSymbolUtilities/Frameworks/frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) ${PODS_ROOT}/Google/Headers $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/Google" "${PODS_ROOT}/Headers/Public/GoogleAnalytics" "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/GoogleAnalytics/Libraries"
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/Google" -isystem "${PODS_ROOT}/Headers/Public/GoogleAnalytics" -isystem "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" -isystem "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
OTHER_LDFLAGS = $(inherited) -ObjC -l"GoogleAnalytics" -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "AddressBook" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreLocation" -framework "CoreMotion" -framework "FirebaseAnalytics" -framework "FirebaseCore" -framework "FirebaseInstanceID" -framework "GGLAnalytics" -framework "GGLCore" -framework "GoogleInterchangeUtilities" -framework "GoogleSymbolUtilities" -framework "GoogleToolboxForMac" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration"
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/DLRadioButton/DLRadioButton.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/Google" -isystem "${PODS_ROOT}/Headers/Public/GoogleAnalytics" -isystem "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" -isystem "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
OTHER_LDFLAGS = $(inherited) -ObjC -l"GoogleAnalytics" -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "AddressBook" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreLocation" -framework "CoreMotion" -framework "DLRadioButton" -framework "FirebaseAnalytics" -framework "FirebaseCore" -framework "FirebaseInstanceID" -framework "GGLAnalytics" -framework "GGLCore" -framework "GoogleInterchangeUtilities" -framework "GoogleSymbolUtilities" -framework "GoogleToolboxForMac" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "${PODS_ROOT}/FirebaseAnalytics/Frameworks/frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks/frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks/frameworks" "${PODS_ROOT}/Google/Frameworks" "${PODS_ROOT}/GoogleInterchangeUtilities/Frameworks/frameworks" "${PODS_ROOT}/GoogleSymbolUtilities/Frameworks/frameworks"
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DLRadioButton" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "${PODS_ROOT}/FirebaseAnalytics/Frameworks/frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks/frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks/frameworks" "${PODS_ROOT}/Google/Frameworks" "${PODS_ROOT}/GoogleInterchangeUtilities/Frameworks/frameworks" "${PODS_ROOT}/GoogleSymbolUtilities/Frameworks/frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) ${PODS_ROOT}/Google/Headers $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/Google" "${PODS_ROOT}/Headers/Public/GoogleAnalytics" "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/GoogleAnalytics/Libraries"
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/Google" -isystem "${PODS_ROOT}/Headers/Public/GoogleAnalytics" -isystem "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" -isystem "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
OTHER_LDFLAGS = $(inherited) -ObjC -l"GoogleAnalytics" -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "AddressBook" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreLocation" -framework "CoreMotion" -framework "FirebaseAnalytics" -framework "FirebaseCore" -framework "FirebaseInstanceID" -framework "GGLAnalytics" -framework "GGLCore" -framework "GoogleInterchangeUtilities" -framework "GoogleSymbolUtilities" -framework "GoogleToolboxForMac" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration"
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/DLRadioButton/DLRadioButton.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/Google" -isystem "${PODS_ROOT}/Headers/Public/GoogleAnalytics" -isystem "${PODS_ROOT}/Headers/Public/GoogleInterchangeUtilities" -isystem "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities"
OTHER_LDFLAGS = $(inherited) -ObjC -l"GoogleAnalytics" -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "AddressBook" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreLocation" -framework "CoreMotion" -framework "DLRadioButton" -framework "FirebaseAnalytics" -framework "FirebaseCore" -framework "FirebaseInstanceID" -framework "GGLAnalytics" -framework "GGLCore" -framework "GoogleInterchangeUtilities" -framework "GoogleSymbolUtilities" -framework "GoogleToolboxForMac" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
......@@ -191,7 +191,7 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "190"
endingLineNumber = "190"
landmarkName = "processService(_:)"
landmarkName = "processService(botNode:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
......
//
// Colors.swift
// kt
//
// Created by neox on 06.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
extension UIColor {
class func cantaloupe() -> UIColor {
return UIColor(red:255/255, green:204/255, blue:102/255, alpha:1.0)
}
class func honeydew() -> UIColor {
return UIColor(red:204/255, green:255/255, blue:102/255, alpha:1.0)
}
class func spindrift() -> UIColor {
return UIColor(red:102/255, green:255/255, blue:204/255, alpha:1.0)
}
class func sky() -> UIColor {
return UIColor(red:102/255, green:204/255, blue:255/255, alpha:1.0)
}
class func lavender() -> UIColor {
return UIColor(red:204/255, green:102/255, blue:255/255, alpha:1.0)
}
class func carnation() -> UIColor {
return UIColor(red:255/255, green:111/255, blue:207/255, alpha:1.0)
}
class func licorice() -> UIColor {
return UIColor(red:0/255, green:0/255, blue:0/255, alpha:1.0)
}
class func snow() -> UIColor {
return UIColor(red:255/255, green:255/255, blue:255/255, alpha:1.0)
}
class func salmon() -> UIColor {
return UIColor(red:255/255, green:102/255, blue:102/255, alpha:1.0)
}
class func banana() -> UIColor {
return UIColor(red:255/255, green:255/255, blue:102/255, alpha:1.0)
}
class func flora() -> UIColor {
return UIColor(red:102/255, green:255/255, blue:102/255, alpha:1.0)
}
class func ice() -> UIColor {
return UIColor(red:102/255, green:255/255, blue:255/255, alpha:1.0)
}
class func orchid() -> UIColor {
return UIColor(red:102/255, green:102/255, blue:255/255, alpha:1.0)
}
class func bubblegum() -> UIColor {
return UIColor(red:255/255, green:102/255, blue:255/255, alpha:1.0)
}
class func lead() -> UIColor {
return UIColor(red:25/255, green:25/255, blue:25/255, alpha:1.0)
}
class func mercury() -> UIColor {
return UIColor(red:230/255, green:230/255, blue:230/255, alpha:1.0)
}
class func tangerine() -> UIColor {
return UIColor(red:255/255, green:128/255, blue:0/255, alpha:1.0)
}
class func lime() -> UIColor {
return UIColor(red:128/255, green:255/255, blue:0/255, alpha:1.0)
}
class func seafoam() -> UIColor {
return UIColor(red:0/255, green:255/255, blue:128/255, alpha:1.0)
}
class func aqua() -> UIColor {
return UIColor(red:0/255, green:128/255, blue:255/255, alpha:1.0)
}
class func grape() -> UIColor {
return UIColor(red:128/255, green:0/255, blue:255/255, alpha:1.0)
}
class func strawberry() -> UIColor {
return UIColor(red:255/255, green:0/255, blue:128/255, alpha:1.0)
}
class func tungsten() -> UIColor {
return UIColor(red:51/255, green:51/255, blue:51/255, alpha:1.0)
}
class func silver() -> UIColor {
return UIColor(red:204/255, green:204/255, blue:204/255, alpha:1.0)
}
class func maraschino() -> UIColor {
return UIColor(red:255/255, green:0/255, blue:0/255, alpha:1.0)
}
class func lemon() -> UIColor {
return UIColor(red:255/255, green:255/255, blue:0/255, alpha:1.0)
}
class func spring() -> UIColor {
return UIColor(red:0/255, green:255/255, blue:0/255, alpha:1.0)
}
class func turquoise() -> UIColor {
return UIColor(red:0/255, green:255/255, blue:255/255, alpha:1.0)
}
class func blueberry() -> UIColor {
return UIColor(red:0/255, green:0/255, blue:255/255, alpha:1.0)
}
class func magenta() -> UIColor {
return UIColor(red:255/255, green:0/255, blue:255/255, alpha:1.0)
}
class func iron() -> UIColor {
return UIColor(red:76/255, green:76/255, blue:76/255, alpha:1.0)
}
class func magnesium() -> UIColor {
return UIColor(red:179/255, green:179/255, blue:179/255, alpha:1.0)
}
class func mocha() -> UIColor {
return UIColor(red:128/255, green:64/255, blue:0/255, alpha:1.0)
}
class func fern() -> UIColor {
return UIColor(red:64/255, green:128/255, blue:0/255, alpha:1.0)
}
class func moss() -> UIColor {
return UIColor(red:0/255, green:128/255, blue:64/255, alpha:1.0)
}
class func ocean() -> UIColor {
return UIColor(red:0/255, green:64/255, blue:128/255, alpha:1.0)
}
class func eggplant() -> UIColor {
return UIColor(red:64/255, green:0/255, blue:128/255, alpha:1.0)
}
class func maroon() -> UIColor {
return UIColor(red:128/255, green:0/255, blue:64/255, alpha:1.0)
}
class func steel() -> UIColor {
return UIColor(red:102/255, green:102/255, blue:102/255, alpha:1.0)
}
class func aluminium() -> UIColor {
return UIColor(red:153/255, green:153/255, blue:153/255, alpha:1.0)
}
class func cayenne() -> UIColor {
return UIColor(red:128/255, green:0/255, blue:0/255, alpha:1.0)
}
class func asparagus() -> UIColor {
return UIColor(red:128/255, green:120/255, blue:0/255, alpha:1.0)
}
class func clover() -> UIColor {
return UIColor(red:0/255, green:128/255, blue:0/255, alpha:1.0)
}
class func teal() -> UIColor {
return UIColor(red:0/255, green:128/255, blue:128/255, alpha:1.0)
}
class func midnight() -> UIColor {
return UIColor(red:0/255, green:0/255, blue:128/255, alpha:1.0)
}
class func plum() -> UIColor {
return UIColor(red:128/255, green:0/255, blue:128/255, alpha:1.0)
}
class func tin() -> UIColor {
return UIColor(red:127/255, green:127/255, blue:127/255, alpha:1.0)
}
class func nickel() -> UIColor {
return UIColor(red:128/255, green:128/255, blue:128/255, alpha:1.0)
}
}
//
// VIPCalculator.swift
// kt
//
// Created by neox on 06.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
struct VIPPrices {
static let VIP = 6999
static let VIP_TV_PRICE = 1000
static let VIP_MOBILE = 1500
static let VIP_GAMER = 2000
static let VIP_MAX = 9000
}
......@@ -26,6 +26,7 @@ class ServiceItem {
var isShowConnectButton : Bool?
var imageUrl : String?
var description : String?
var seoTitle : String?
var tariffs: [Tariff]!
......@@ -64,6 +65,7 @@ class ServiceItem {
init(json: JSON) {
id = json["service_id"].intValue
name = json["title"].stringValue
// key = json["key"].string
}
......@@ -92,6 +94,7 @@ class ServiceItem {
image = NSURL(string: fullJson["background"].stringValue)
logo = NSURL(string: fullJson["logo"].stringValue)
title = fullJson["slogan"].stringValue
seoTitle = fullJson["seo_title"].stringValue
if let jsonRates = fullJson["rates"].array where !jsonRates.isEmpty {
rates = []
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -623,3 +623,79 @@
"registration_placeholder_password" = "Придумайте Ваш пароль";
"help" = "Помощь";
"service_what_is_in_package" = "Что входит в пакет?";
"service_safe_internet" = "Безопасный интернет";
"service_fast_internet" = "Скорость интернета до 100 Мбит/с";
"service_kaspersky" = "Антивирус Касперского";
"service_parent_control" = "Родительский контроль";
"service_premium_tv" = "Премиальное телевидение";
"service_premium_tv_1" = "130 каналов iDTV";
"service_premium_tv_2" = "70 мировых сериалов Amedia";
"service_premium_tv_3" = "5000 фильмов Megogo+";
"service_premium_tv_4" = "4000 песен караоке";
"service_supertelephone" = "СУПЕРТЕЛЕФОН";
"service_supertelephone_1" = "Домашний телефон";
"service_supertelephone_2" = "Безлимитные звонки по стране (с домашнего на домашний)";
"service_supertelephone_3" = "Услуга на выбор:";
"service_vip" = "VIP";
"service_vip_audience" = "Для Вашей VIP-семьи";
"tenge_per_month" = "тг/мес";
"service_vip_tv" = "VIP TV";
"service_vip_tv_audience" = "Для истинных любителей кино";
"service_vip_tv_safe_internet" = "Безопасный интернет до 300Мбит";
"service_option" = "Услуга на выбор:";
"service_vip_tv_option_1" = "iD TV Online. ТВ на всех экранах";
"service_vip_tv_option_2" = "Пакет Базовый HD";
"service_vip_tv_option_3" = "Пакет каналов «Настрой кино»";
"service_vip_option_1" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_option_2" = "Безлимитные звонки на ALTEL и Tele2 (1000 минут)";
"service_vip_additional_id_tv" = "Дополнительные точки iD TV";
"service_vip_mobile" = "VIP Mobile";
"service_vip_mobile_audience" = "Для тех кто ищет выгодную мобильную связь";
"service_vip_mobile_description_1" = "Безопасный интернет до 300Мбит";
"service_vip_mobile_description_2" = "Выгодная мобильная связь";
"service_vip_mobile_description_3" = "Безлимитные звонки на домашний телефон";
"service_vip_mobile_description_4" = "Безлимитные звонки на ALTEL и Tele2";
"service_vip_mobile_description_5" = "2 sim - карты";
"service_vip_mobile_option_1" = "100 мин / 7 Гб";
"service_vip_mobile_option_2" = "180 мин / 5 Гб";
"service_vip_mobile_option_3" = "60 мин / 20 Гб";
"service_vip_gamer" = "VIP Gamer";
"service_vip_gamer_audience" = "Для настоящих игроманов";
"service_vip_gamer_description_1" = "Безопасный интернет до 300Мбит";
"service_vip_gamer_description_2" = "Для настоящих игроманов";
"service_vip_gamer_option_1" = "+50% к боевому опыту за каждый бой";
"service_vip_gamer_option_2" = "+50% к опыту экипажа за каждый бой";
"service_vip_gamer_option_3" = "+50% кредитов за каждый бой";
"service_vip_max" = "VIP Max";
"service_vip_max_audience" = "Для тех, кому нужно все и по максимуму";
"service_vip_max_option_1" = "Безопасный интернет до 300Мбит";
"service_vip_max_option_2" = "Выгодная мобильная связь";
"service_vip_max_option_3" = "iD TV Online. ТВ на всех экранах";
"service_vip_max_option_4" = "Пакет Базовый HD";
"service_vip_max_option_5" = "Пакет каналов «Настрой кино»";
"service_vip_max_option_6" = "Пакет HD-каналов Viasat Premium HD";
"service_vip_max_option_7" = "2 sim - карты";
"service_vip_max_option_8" = "Премиум аккаунт Wargaming";
"service_vip_max_option_9" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_additional_1" = "10 киноканалов «Настрой кино» (НТВ+)";
"service_vip_additional_2" = "Пакет HD-каналов Viasat Premium HD";
"service_vip_additional_3" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_additional_4" = "Пакет HD-каналов HD Base";
"service_vip_additional_5" = "iD TV Online";
"service_vip_additional_6" = "Количество дополнительных sim-карт";
"service_vip_additional_7" = "Дополнительные точки iD TV";
"service_vip_total_selected" = "Выбрано:";
"service_vip_total_text" = "К оплате ежемесячно";
"tenge" = "тенге";
......@@ -622,3 +622,79 @@
"registration_placeholder_password" = "Придумайте Ваш пароль";
"help" = "Помощь";
"service_what_is_in_package" = "Что входит в пакет?";
"service_safe_internet" = "Безопасный интернет";
"service_fast_internet" = "Скорость интернета до 100 Мбит/с";
"service_kaspersky" = "Антивирус Касперского";
"service_parent_control" = "Родительский контроль";
"service_premium_tv" = "Премиальное телевидение";
"service_premium_tv_1" = "130 каналов iDTV";
"service_premium_tv_2" = "70 мировых сериалов Amedia";
"service_premium_tv_3" = "5000 фильмов Megogo+";
"service_premium_tv_4" = "4000 песен караоке";
"service_supertelephone" = "СУПЕРТЕЛЕФОН";
"service_supertelephone_1" = "Домашний телефон";
"service_supertelephone_2" = "Безлимитные звонки по стране (с домашнего на домашний)";
"service_supertelephone_3" = "Услуга на выбор:";
"service_vip" = "VIP";
"service_vip_audience" = "Для Вашей VIP-семьи";
"tenge_per_month" = "тг/мес";
"service_vip_tv" = "VIP TV";
"service_vip_tv_audience" = "Для истинных любителей кино";
"service_vip_tv_safe_internet" = "Безопасный интернет до 300Мбит";
"service_option" = "Услуга на выбор:";
"service_vip_tv_option_1" = "iD TV Online. ТВ на всех экранах";
"service_vip_tv_option_2" = "Пакет Базовый HD";
"service_vip_tv_option_3" = "Пакет каналов «Настрой кино»";
"service_vip_option_1" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_option_2" = "Безлимитные звонки на ALTEL и Tele2 (1000 минут)";
"service_vip_additional_id_tv" = "Дополнительные точки iD TV";
"service_vip_mobile" = "VIP Mobile";
"service_vip_mobile_audience" = "Для тех кто ищет выгодную мобильную связь";
"service_vip_mobile_description_1" = "Безопасный интернет до 300Мбит";
"service_vip_mobile_description_2" = "Выгодная мобильная связь";
"service_vip_mobile_description_3" = "Безлимитные звонки на домашний телефон";
"service_vip_mobile_description_4" = "Безлимитные звонки на ALTEL и Tele2";
"service_vip_mobile_description_5" = "2 sim - карты";
"service_vip_mobile_option_1" = "100 мин / 7 Гб";
"service_vip_mobile_option_2" = "180 мин / 5 Гб";
"service_vip_mobile_option_3" = "60 мин / 20 Гб";
"service_vip_gamer" = "VIP Gamer";
"service_vip_gamer_audience" = "Для настоящих игроманов";
"service_vip_gamer_description_1" = "Безопасный интернет до 300Мбит";
"service_vip_gamer_description_2" = "Для настоящих игроманов";
"service_vip_gamer_option_1" = "+50% к боевому опыту за каждый бой";
"service_vip_gamer_option_2" = "+50% к опыту экипажа за каждый бой";
"service_vip_gamer_option_3" = "+50% кредитов за каждый бой";
"service_vip_max" = "VIP Max";
"service_vip_max_audience" = "Для тех, кому нужно все и по максимуму";
"service_vip_max_option_1" = "Безопасный интернет до 300Мбит";
"service_vip_max_option_2" = "Выгодная мобильная связь";
"service_vip_max_option_3" = "iD TV Online. ТВ на всех экранах";
"service_vip_max_option_4" = "Пакет Базовый HD";
"service_vip_max_option_5" = "Пакет каналов «Настрой кино»";
"service_vip_max_option_6" = "Пакет HD-каналов Viasat Premium HD";
"service_vip_max_option_7" = "2 sim - карты";
"service_vip_max_option_8" = "Премиум аккаунт Wargaming";
"service_vip_max_option_9" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_additional_1" = "10 киноканалов «Настрой кино» (НТВ+)";
"service_vip_additional_2" = "Пакет HD-каналов Viasat Premium HD";
"service_vip_additional_3" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_additional_4" = "Пакет HD-каналов HD Base";
"service_vip_additional_5" = "iD TV Online";
"service_vip_additional_6" = "Количество дополнительных sim-карт";
"service_vip_additional_7" = "Дополнительные точки iD TV";
"service_vip_total_selected" = "Выбрано:";
"service_vip_total_text" = "К оплате ежемесячно";
"tenge" = "тенге";
......@@ -624,3 +624,80 @@
"registration_placeholder_login" = "Придумайте Ваш логин";
"registration_placeholder_password" = "Придумайте Ваш пароль";
"help" = "Помощь";
"service_what_is_in_package" = "Что входит в пакет?";
"service_safe_internet" = "Безопасный интернет";
"service_fast_internet" = "Скорость интернета до 100 Мбит/с";
"service_kaspersky" = "Антивирус Касперского";
"service_parent_control" = "Родительский контроль";
"service_premium_tv" = "Премиальное телевидение";
"service_premium_tv_1" = "130 каналов iDTV";
"service_premium_tv_2" = "70 мировых сериалов Amedia";
"service_premium_tv_3" = "5000 фильмов Megogo+";
"service_premium_tv_4" = "4000 песен караоке";
"service_supertelephone" = "СУПЕРТЕЛЕФОН";
"service_supertelephone_1" = "Домашний телефон";
"service_supertelephone_2" = "Безлимитные звонки по стране (с домашнего на домашний)";
"service_supertelephone_3" = "Услуга на выбор:";
"service_vip" = "VIP";
"service_vip_audience" = "Для Вашей VIP-семьи";
"tenge_per_month" = "тг/мес";
"service_vip_tv" = "VIP TV";
"service_vip_tv_audience" = "Для истинных любителей кино";
"service_vip_tv_safe_internet" = "Безопасный интернет до 300Мбит";
"service_option" = "Услуга на выбор:";
"service_vip_tv_option_1" = "iD TV Online. ТВ на всех экранах";
"service_vip_tv_option_2" = "Пакет Базовый HD";
"service_vip_tv_option_3" = "Пакет каналов «Настрой кино»";
"service_vip_option_1" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_option_2" = "Безлимитные звонки на ALTEL и Tele2 (1000 минут)";
"service_vip_additional_id_tv" = "Дополнительные точки iD TV";
"service_vip_mobile" = "VIP Mobile";
"service_vip_mobile_audience" = "Для тех кто ищет выгодную мобильную связь";
"service_vip_mobile_description_1" = "Безопасный интернет до 300Мбит";
"service_vip_mobile_description_2" = "Выгодная мобильная связь";
"service_vip_mobile_description_3" = "Безлимитные звонки на домашний телефон";
"service_vip_mobile_description_4" = "Безлимитные звонки на ALTEL и Tele2";
"service_vip_mobile_description_5" = "2 sim - карты";
"service_vip_mobile_option_1" = "100 мин / 7 Гб";
"service_vip_mobile_option_2" = "180 мин / 5 Гб";
"service_vip_mobile_option_3" = "60 мин / 20 Гб";
"service_vip_gamer" = "VIP Gamer";
"service_vip_gamer_audience" = "Для настоящих игроманов";
"service_vip_gamer_description_1" = "Безопасный интернет до 300Мбит";
"service_vip_gamer_description_2" = "Для настоящих игроманов";
"service_vip_gamer_option_1" = "+50% к боевому опыту за каждый бой";
"service_vip_gamer_option_2" = "+50% к опыту экипажа за каждый бой";
"service_vip_gamer_option_3" = "+50% кредитов за каждый бой";
"service_vip_max" = "VIP Max";
"service_vip_max_audience" = "Для тех, кому нужно все и по максимуму";
"service_vip_max_option_1" = "Безопасный интернет до 300Мбит";
"service_vip_max_option_2" = "Выгодная мобильная связь";
"service_vip_max_option_3" = "iD TV Online. ТВ на всех экранах";
"service_vip_max_option_4" = "Пакет Базовый HD";
"service_vip_max_option_5" = "Пакет каналов «Настрой кино»";
"service_vip_max_option_6" = "Пакет HD-каналов Viasat Premium HD";
"service_vip_max_option_7" = "2 sim - карты";
"service_vip_max_option_8" = "Премиум аккаунт Wargaming";
"service_vip_max_option_9" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_additional_1" = "10 киноканалов «Настрой кино» (НТВ+)";
"service_vip_additional_2" = "Пакет HD-каналов Viasat Premium HD";
"service_vip_additional_3" = "Безлимитные звонки на городские номера России (6000 минут)";
"service_vip_additional_4" = "Пакет HD-каналов HD Base";
"service_vip_additional_5" = "iD TV Online";
"service_vip_additional_6" = "Количество дополнительных sim-карт";
"service_vip_additional_7" = "Дополнительные точки iD TV";
"service_vip_total_selected" = "Выбрано:";
"service_vip_total_text" = "К оплате ежемесячно";
"tenge" = "тенге";
//
// 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
}
}
//
// AdditionalStepper.swift
// kt
//
// Created by neox on 07.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
class AdditionalStepper : UITableViewCell {
@IBOutlet weak var labelTitle: UILabel!
@IBOutlet weak var stepper: UIStepper!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelValue: UILabel!
var value = 1
var price = 900
override func awakeFromNib() {
super.awakeFromNib()
stepper.value = 1
update()
}
@IBAction func stepperChanged(sender: UIStepper) {
value = Int(sender.value)
update()
}
func update() {
labelValue.text = String(value)
labelPrice.text = String(value * price)
}
}
......@@ -30,14 +30,26 @@ class FeedCollectionViewCell: UICollectionViewCell {
func tapFunction(sender:UITapGestureRecognizer) {
var serviceItem = ServiceItem()
let serviceItem = ServiceItem()
serviceItem.id = self.id
serviceItem.type = "landing"
serviceItem.name = self.title.text
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let destination = storyboard.instantiateViewControllerWithIdentifier("ServiceItemScrollViewController") as! ServiceItemScrollViewController
destination.serviceItemForLoading = serviceItem
////this is old version
// let destination = storyboard.instantiateViewControllerWithIdentifier("ServiceItemScrollViewController") as! ServiceItemScrollViewController
// destination.serviceItemForLoading = serviceItem
// navController!.pushViewController(destination, animated: true)
// let destination = storyboard.instantiateViewControllerWithIdentifier("ServiceCalculatorViewController") as! ServiceCalculatorViewController
// destination.serviceItem = serviceItem
// navController!.pushViewController(destination, animated: true)
let destination = storyboard.instantiateViewControllerWithIdentifier("ServiceVIPTableViewController") as! ServiceVIPTableViewController
destination.serviceItem = serviceItem
navController!.pushViewController(destination, animated: true)
}
}
//
// VIPAdditional.swift
// kt
//
// Created by neox on 09.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
class VIPAdditional: UITableViewCell {
var vc : ServiceVIPTableViewController!
var indexPath : NSIndexPath!
@IBOutlet weak var uiSwitch: UISwitch!
@IBOutlet weak var label: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelUnit: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = UITableViewCellSelectionStyle.None
///setOn(false)
uiSwitch.addTarget(self, action: #selector(VIPAdditional.switchChanged(_:)), forControlEvents: UIControlEvents.ValueChanged)
labelUnit.text = LS("tenge_per_month")
}
func switchChanged(sender: UISwitch) {
//vc.additionalSwitch(indexPath, isOn: sender.on)
//setSelected(sender.on, animated: true)
vc.setRowSelected(indexPath, isOn: sender.on)
}
func setOn(bool : Bool) {
uiSwitch.setOn(bool, animated: true)
}
func setPrice(price: Int) {
labelPrice.text = String(price)
}
}
//
// VIPAdditionalStepper.swift
// kt
//
// Created by neox on 14.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
class VIPAdditionalStepper : UITableViewCell {
var vc : ServiceVIPTableViewController!
var indexPath : NSIndexPath!
@IBOutlet weak var uiSwitch: UISwitch!
@IBOutlet weak var label: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelUnit: UILabel!
@IBOutlet weak var stepper: UIStepper!
@IBOutlet weak var labelAmount: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = UITableViewCellSelectionStyle.None
///setOn(false)
uiSwitch.addTarget(self, action: #selector(VIPAdditionalStepper.switchChanged(_:)), forControlEvents: UIControlEvents.ValueChanged)
stepper.addTarget(self, action: #selector(VIPAdditionalStepper.stepperChanged(_:)), forControlEvents: UIControlEvents.ValueChanged)
labelUnit.text = LS("tenge_per_month")
}
func switchChanged(sender: UISwitch) {
//vc.additionalSwitch(indexPath, isOn: sender.on)
//setSelected(sender.on, animated: true)
vc.setRowSelected(indexPath, isOn: sender.on)
}
func stepperChanged(sender: UIStepper) {
vc.setAmount(indexPath.row, amount: Int(sender.value))
labelAmount.text = String(Int(sender.value))
}
func setOn(bool : Bool) {
uiSwitch.setOn(bool, animated: true)
}
func setPrice(price: Int) {
labelPrice.text = String(price)
}
func setAmount(value: Int) {
stepper.value = Double(value)
labelAmount.text = String(value)
}
}
//
// VIPCell.swift
// kt
//
// Created by neox on 07.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
import DLRadioButton
class VIPCell : UITableViewCell {
var vc : ServiceVIPTableViewController!
var price = VIPPrices.VIP
@IBOutlet weak var layoutHeader: UIView!
@IBOutlet weak var labelTitle: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelTengeMonth: UILabel!
@IBOutlet weak var labelAudience: UILabel!
@IBOutlet weak var labelInternet: UILabel!
@IBOutlet weak var labelInternet1: UILabel!
@IBOutlet weak var labelInternet2: UILabel!
@IBOutlet weak var labelInternet3: 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 labelSupertelephone: UILabel!
@IBOutlet weak var labelSupertelephone1: UILabel!
@IBOutlet weak var labelSupertelephone2: UILabel!
@IBOutlet weak var labelSupertelephone3: UILabel!
@IBOutlet weak var buttonOption1: DLRadioButton!
@IBOutlet weak var buttonOption2: DLRadioButton!
// @IBOutlet var buttons: [DLRadioButton]!
override func awakeFromNib() {
super.awakeFromNib()
self.labelTitle.text = LS("service_vip")
self.selectionStyle = UITableViewCellSelectionStyle.None
labelPrice.text = "\(price) "
labelTengeMonth.text = LS("tenge_per_month")
labelAudience.text = LS("service_vip_audience")
labelInternet.text = LS("service_safe_internet").uppercaseString
labelInternet1.text = LS("service_fast_internet")
labelInternet2.text = LS("service_kaspersky")
labelInternet3.text = LS("service_parent_control")
labelPremiumTV.text = LS("service_premium_tv").uppercaseString
labelPremiumTV1.text = LS("service_premium_tv_1")
labelPremiumTV2.text = LS("service_premium_tv_2")
labelPremiumTV3.text = LS("service_premium_tv_3")
labelPremiumTV4.text = LS("service_premium_tv_4")
labelSupertelephone.text = LS("service_supertelephone").uppercaseString
labelSupertelephone1.text = LS("service_supertelephone_1")
labelSupertelephone2.text = LS("service_supertelephone_2")
labelSupertelephone3.text = LS("service_supertelephone_3")
buttonOption2.selected = true
buttonOption1.setTitle(LS("service_vip_option_1"), forState: .Normal)
buttonOption2.setTitle(LS("service_vip_option_2"), forState: .Normal)
//buttonOption1.setButtonWidth()
//buttonOption2.setButtonWidth()
buttonOption1.addTarget(self, action: #selector(VIPCell.radioButtonClick(_:)), forControlEvents: UIControlEvents.TouchUpInside)
buttonOption2.addTarget(self, action: #selector(VIPCell.radioButtonClick(_:)), forControlEvents: UIControlEvents.TouchUpInside)
}
func radioButtonClick(sender: DLRadioButton) {
if ( sender == buttonOption1 ) {
vc.setBoolOptionRussianPhone(true)
} else if ( sender == buttonOption2 ) {
vc.setBoolOptionRussianPhone(false)
}
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if ( selected ) {
self.contentView.layer.borderColor = UIColor.ocean().CGColor
self.contentView.layer.borderWidth = 3
layoutHeader.backgroundColor = UIColor.ocean()
} else {
self.contentView.layer.borderColor = UIColor.clearColor().CGColor
self.contentView.layer.borderWidth = 0
layoutHeader.backgroundColor = UIColor.sky()
}
}
// @IBAction func radioButtonSelect(sender: DLRadioButton) {
// for btn in self.buttons {
// btn.selected = (btn == sender) ? true: false
// }
// }
// override func setHighlighted(highlighted: Bool, animated: Bool) {
// super.setHighlighted(highlighted, animated: animated)
//
// if ( highlighted ) {
// self.contentView.layer.borderColor = UIColor.ocean().CGColor
// self.contentView.layer.borderWidth = 2
// layoutHeader.backgroundColor = UIColor.ocean()
//
// } else {
// self.contentView.layer.borderColor = UIColor.clearColor().CGColor
// self.contentView.layer.borderWidth = 0
// layoutHeader.backgroundColor = UIColor.sky()
// }
// }
}
//
// Swif.swift
// kt
//
// Created by neox on 10.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
//class VIPGamer : UITableViewCell {
//
// var vc : ServiceVIPTableViewController!
// var price = 2000
//
// override func awakeFromNib() {
// super.awakeFromNib()
//
// }
//
//}
class VIPGamer: UITableViewCell {
var vc: ServiceVIPTableViewController!
var price = VIPPrices.VIP_GAMER
@IBOutlet weak var layoutHeader: UIView!
@IBOutlet weak var buttonPlus: UILabel!
@IBOutlet weak var labelService: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelAudience: UILabel!
@IBOutlet weak var labelUnit: UILabel!
@IBOutlet weak var labelOption1: UILabel!
@IBOutlet weak var labelOption2: UILabel!
@IBOutlet weak var labelOption3: UILabel!
@IBOutlet weak var labelDescription1: UILabel!
@IBOutlet weak var labelDescription2: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = UITableViewCellSelectionStyle.None
labelService.text = LS("service_vip_gamer")
labelPrice.text = "+\(price)"
labelAudience.text = LS("service_vip_gamer_audience")
labelUnit.text = LS("tenge_per_month")
labelDescription1.text = LS("service_vip_gamer_description_1")
labelDescription2.text = LS("service_vip_gamer_description_2")
labelOption1.text = LS("service_vip_gamer_option_1")
labelOption2.text = LS("service_vip_gamer_option_2")
labelOption3.text = LS("service_vip_gamer_option_3")
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if ( selected ) {
self.contentView.layer.borderColor = UIColor.ocean().CGColor
self.contentView.layer.borderWidth = 3
layoutHeader.backgroundColor = UIColor.ocean()
buttonPlus.textColor = UIColor.ocean()
} else {
self.contentView.layer.borderColor = UIColor.clearColor().CGColor
self.contentView.layer.borderWidth = 0
layoutHeader.backgroundColor = UIColor.sky()
buttonPlus.textColor = UIColor.sky()
}
}
}
//
// VIPMax.swift
// kt
//
// Created by neox on 13.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
class VIPMax : UITableViewCell {
var vc: ServiceVIPTableViewController!
var price = VIPPrices.VIP_MAX
@IBOutlet weak var layoutHeader: UIView!
@IBOutlet weak var buttonPlus: UILabel!
@IBOutlet weak var labelService: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelUnit: UILabel!
@IBOutlet weak var labelAudience: UILabel!
@IBOutlet weak var labelOption1: UILabel!
@IBOutlet weak var labelOption2: UILabel!
@IBOutlet weak var labelOption3: UILabel!
@IBOutlet weak var labelOption4: UILabel!
@IBOutlet weak var labelOption5: UILabel!
@IBOutlet weak var labelOption6: UILabel!
@IBOutlet weak var labelOption7: UILabel!
@IBOutlet weak var labelOption8: UILabel!
@IBOutlet weak var labelOption9: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = UITableViewCellSelectionStyle.None
labelService.text = LS("service_vip_max")
labelAudience.text = LS("service_vip_max_audience")
labelPrice.text = "+\(price)"
labelUnit.text = LS("tenge_per_month")
labelOption1.text = LS("service_vip_max_option_1")
labelOption2.text = LS("service_vip_max_option_2")
labelOption3.text = LS("service_vip_max_option_3")
labelOption4.text = LS("service_vip_max_option_4")
labelOption5.text = LS("service_vip_max_option_5")
labelOption6.text = LS("service_vip_max_option_6")
labelOption7.text = LS("service_vip_max_option_7")
labelOption8.text = LS("service_vip_max_option_8")
labelOption9.text = LS("service_vip_max_option_9")
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if ( selected ) {
self.contentView.layer.borderColor = UIColor.ocean().CGColor
self.contentView.layer.borderWidth = 3
layoutHeader.backgroundColor = UIColor.ocean()
buttonPlus.textColor = UIColor.ocean()
} else {
self.contentView.layer.borderColor = UIColor.clearColor().CGColor
self.contentView.layer.borderWidth = 0
layoutHeader.backgroundColor = UIColor.sky()
buttonPlus.textColor = UIColor.sky()
}
}
}
//
// VIPMobileCell.swift
// kt
//
// Created by neox on 08.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
import DLRadioButton
class VIPMobileCell : UITableViewCell {
var vc : ServiceVIPTableViewController!
var price = VIPPrices.VIP_MOBILE
@IBOutlet weak var buttonPlus: UILabel!
@IBOutlet weak var layoutHeader: UIView!
@IBOutlet weak var buttonOption1: DLRadioButton!
@IBOutlet weak var buttonOption2: DLRadioButton!
@IBOutlet weak var buttonOption3: DLRadioButton!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelAudience: UILabel!
@IBOutlet weak var labelUnit: UILabel!
@IBOutlet weak var labelDescription1: UILabel!
@IBOutlet weak var labelDescription2: UILabel!
@IBOutlet weak var labelDescription3: UILabel!
@IBOutlet weak var labelDescription4: UILabel!
@IBOutlet weak var labelDescription5: UILabel!
@IBOutlet weak var labelDescription6: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
//self.labelTitle.text = LS("service_vip_tv")
self.selectionStyle = UITableViewCellSelectionStyle.None
labelAudience.text = LS("service_vip_mobile_audience")
labelUnit.text = LS("tenge_per_month")
labelPrice.text = "+\(price)"
buttonOption1.selected = true
buttonOption1.setTitle(LS("service_vip_mobile_option_1"), forState: .Normal)
buttonOption2.setTitle(LS("service_vip_mobile_option_2"), forState: .Normal)
buttonOption3.setTitle(LS("service_vip_mobile_option_3"), forState: .Normal)
labelDescription1.text = LS("service_vip_mobile_description_1")
labelDescription2.text = LS("service_vip_mobile_description_2")
labelDescription3.text = LS("service_vip_mobile_description_3")
labelDescription4.text = LS("service_vip_mobile_description_4")
labelDescription5.text = LS("service_vip_mobile_description_5")
labelDescription6.text = LS("service_option")
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if ( selected ) {
self.contentView.layer.borderColor = UIColor.ocean().CGColor
self.contentView.layer.borderWidth = 3
layoutHeader.backgroundColor = UIColor.ocean()
buttonPlus.textColor = UIColor.ocean()
} else {
self.contentView.layer.borderColor = UIColor.clearColor().CGColor
self.contentView.layer.borderWidth = 0
layoutHeader.backgroundColor = UIColor.sky()
buttonPlus.textColor = UIColor.sky()
}
}
}
//
// VIPTVCell.swift
// kt
//
// Created by neox on 06.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
class VIPServiceHeader: UITableViewCell/*, UIPickerViewDataSource, UIPickerViewDelegate*/ {
var price : Int = VIPPrices.VIP_TV_PRICE
@IBOutlet weak var layoutTitleHolder: UIView!
@IBOutlet weak var labelTitle: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelAudience: UILabel!
@IBOutlet weak var labelPriceUnit: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.labelTitle.text = LS("service_vip_tv")
// let pickerView = UIPickerView()
// pickerView.delegate = self
// textFieldOption.inputView = pickerView
self.selectionStyle = UITableViewCellSelectionStyle.None
labelPrice.text = "+\(price) "
labelPriceUnit.text = LS("tenge_per_month")
labelAudience.text = LS("service_vip_tv_audience")
}
func setSelected() {
layoutTitleHolder.backgroundColor = UIColor.ocean()
}
// func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
// return 1
// }
//
// func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
// return pickOption.count
// }
//
// func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
// return pickOption[row]
// }
//
// func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
// self.textFieldOption.text = pickOption[row]
// self.textFieldOption.endEditing(true)
// }
// func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
// let cell = UITableViewCell()
// cell.textLabel?.text = pickOption[indexPath.row]
// return cell
// }
//
// func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// return pickOption.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
//
// }
// }
}
//
// VIPTVCell.swift
// kt
//
// Created by neox on 06.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
import DLRadioButton
class VIPTVCell : UITableViewCell {
var vc : ServiceVIPTableViewController!
var price = VIPPrices.VIP_TV_PRICE
@IBOutlet weak var layoutHeader: UIView!
@IBOutlet weak var labelAudience: UILabel!
@IBOutlet weak var labelPrice: UILabel!
@IBOutlet weak var labelUnit: UILabel!
@IBOutlet weak var labelPlus: UILabel!
@IBOutlet weak var labelFastInternet: UILabel!
@IBOutlet weak var labelServiceOption: UILabel!
@IBOutlet weak var optionButton1: DLRadioButton!
@IBOutlet weak var optionButton2: DLRadioButton!
@IBOutlet weak var optionButton3: DLRadioButton!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = UITableViewCellSelectionStyle.None
labelFastInternet.text = LS("service_vip_tv_safe_internet")
labelServiceOption.text = LS("service_option")
labelAudience.text = LS("service_vip_tv_audience")
labelPrice.text = "+\(price)"
labelUnit.text = LS("tenge_per_month")
optionButton1.setTitle(LS("service_vip_tv_option_1"), forState: .Normal)
optionButton2.setTitle(LS("service_vip_tv_option_2"), forState: .Normal)
optionButton3.setTitle(LS("service_vip_tv_option_3"), forState: .Normal)
optionButton1.selected = true
// optionButton1.setButtonWidth()
// optionButton2.setButtonWidth()
// optionButton3.setButtonWidth()
optionButton1.addTarget(self, action: #selector(VIPTVCell.radioButtonClick(_:)), forControlEvents: UIControlEvents.TouchUpInside)
optionButton2.addTarget(self, action: #selector(VIPTVCell.radioButtonClick(_:)), forControlEvents: UIControlEvents.TouchUpInside)
optionButton3.addTarget(self, action: #selector(VIPTVCell.radioButtonClick(_:)), forControlEvents: UIControlEvents.TouchUpInside)
}
func radioButtonClick(sender: DLRadioButton) {
if ( sender == optionButton1 ) {
vc.setBoolOptionTVPackageNastroiKino(false)
} else if ( sender == optionButton2 ) {
vc.setBoolOptionTVPackageNastroiKino(false)
} else if ( sender == optionButton3 ) {
vc.setBoolOptionTVPackageNastroiKino(true)
}
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if ( selected ) {
self.contentView.layer.borderColor = UIColor.ocean().CGColor
self.contentView.layer.borderWidth = 3
layoutHeader.backgroundColor = UIColor.ocean()
labelPlus.textColor = UIColor.ocean()
} else {
self.contentView.layer.borderColor = UIColor.clearColor().CGColor
self.contentView.layer.borderWidth = 0
layoutHeader.backgroundColor = UIColor.sky()
labelPlus.textColor = UIColor.sky()
}
}
}
//
// VIPTotal.swift
// kt
//
// Created by neox on 09.11.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import Foundation
class VIPTotal : UITableViewCell {
var vc : ServiceVIPTableViewController!
@IBOutlet weak var labelSelected: UILabel!
@IBOutlet weak var labelSelectedServices: UILabel!
@IBOutlet weak var labelTotal: UILabel!
@IBOutlet weak var labelTotalPrice: UILabel!
@IBOutlet weak var labelTenge: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
labelTotal.text = LS("service_vip_total_text")
labelSelected.text = LS("service_vip_total_selected")
labelTenge.text = LS("tenge")
labelSelectedServices.text = ""
if ( vc != nil ) {
updateTotal()
}
}
func updateTotal() {
let text = String(vc.getTotalPrice())
print (text)
labelTotalPrice.text = text
labelSelectedServices.text = vc.getServicesTotal()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment