Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 39 additions & 14 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions Example/Pods/Target Support Files/RXPiOS/Info.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Pod/Classes/RealexComponent/HPPViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class HPPViewController: UIViewController, WKNavigationDelegate, WKUIDelegate,
/**
Called if the user taps the cancel button.
*/
func closeView() {
@objc func closeView() {
self.delegate?.HPPViewControllerWillDismiss!()
self.dismiss(animated: true, completion: nil)
}
Expand Down
10 changes: 5 additions & 5 deletions Pod/Classes/RealexRemote/RealexRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class RealexRemote: NSObject {
var digit = 0;
var addend = 0;
var timesTwo = false;
let length = number.characters.count - 1;
let length = number.count - 1;

for i in (0...length).reversed() {
digit = Int(number.substring(with: (number.characters.index(number.startIndex, offsetBy: i) ..< number.characters.index(number.startIndex, offsetBy: i+1))))!
digit = Int(number[(number.index(number.startIndex, offsetBy: i) ..< number.index(number.startIndex, offsetBy: i+1))])!

if (timesTwo) {
addend = digit * 2;
Expand Down Expand Up @@ -152,7 +152,7 @@ class RealexRemote: NSObject {
if date.range(of: regex, options: .regularExpression) == nil {
return false
}
let month = Int(date.substring(with: (date.characters.index(date.startIndex, offsetBy: 0) ..< date.characters.index(date.startIndex, offsetBy: 2))))!
let month = Int(date[(date.index(date.startIndex, offsetBy: 0) ..< date.index(date.startIndex, offsetBy: 2))])!

// test month range is 1-12
if (month < 1 || month > 12) {
Expand All @@ -177,8 +177,8 @@ class RealexRemote: NSObject {
return false
}

let month = Int(date.substring(with: (date.characters.index(date.startIndex, offsetBy: 0) ..< date.characters.index(date.startIndex, offsetBy: 2))))
let year = Int(date.substring(with: (date.characters.index(date.startIndex, offsetBy: 2) ..< date.characters.index(date.startIndex, offsetBy: 4))))
let month = Int(date[(date.index(date.startIndex, offsetBy: 0) ..< date.index(date.startIndex, offsetBy: 2))])
let year = Int(date[(date.index(date.startIndex, offsetBy: 2) ..< date.index(date.startIndex, offsetBy: 4))])

let components = (Calendar.current as NSCalendar).components([NSCalendar.Unit.year, NSCalendar.Unit.month], from: Date())
let currentMonth = components.month
Expand Down