Skip to content

Commit

Permalink
Bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
orazz committed Mar 17, 2017
1 parent 9965e30 commit b9f6ef0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CreditCardForm.podspec
Expand Up @@ -2,13 +2,13 @@
Pod::Spec.new do |s|

s.name = "CreditCardForm"
s.version = "0.1.0"
s.version = "0.1.1"
s.summary = "CreditCardForm is iOS framework"

s.description = "CreditCardForm is iOS framework that allows developers to create the UI which replicates an actual Credit Card"
s.homepage = "https://github.com/CreditCardForm"
s.screenshots = 'https://camo.githubusercontent.com/e30bcc0537ff4aa4adae4f39ad664aeb2fd7db76/68747470733a2f2f646f746a70672e636f2f3862752e706e67'
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.license = { :type => "MIT" }
s.author = { "orazz" => "orazz.tm@gmail.com" }
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/orazz/CreditCardForm-iOS.git", :tag => s.version.to_s }
Expand Down
4 changes: 4 additions & 0 deletions CreditCardForm.xcodeproj/project.pbxproj
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
5639844A00E3E6E670C48111 /* Pods_CreditCardFormTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B58AD822FD99C8D36962BC8 /* Pods_CreditCardFormTests.framework */; };
8E1A520B1E7BF24500F02033 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 8E1A520A1E7BF24500F02033 /* LICENSE */; };
8EB6C7961DF93FD300225444 /* CreditCardForm.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 8EB6C7951DF93FD300225444 /* CreditCardForm.podspec */; };
8EC8C3D31DEC8C3E0044FB44 /* CreditCardForm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EC8C3C91DEC8C3E0044FB44 /* CreditCardForm.framework */; };
8EC8C3D81DEC8C3E0044FB44 /* CreditCardFormTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EC8C3D71DEC8C3E0044FB44 /* CreditCardFormTests.swift */; };
Expand Down Expand Up @@ -42,6 +43,7 @@
5B58AD822FD99C8D36962BC8 /* Pods_CreditCardFormTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CreditCardFormTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5D88D4003675FFBE5B168C26 /* Pods-CreditCardFormTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CreditCardFormTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CreditCardFormTests/Pods-CreditCardFormTests.release.xcconfig"; sourceTree = "<group>"; };
896DC78929C1F339B7C737C9 /* Pods-CreditCardForm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CreditCardForm.release.xcconfig"; path = "Pods/Target Support Files/Pods-CreditCardForm/Pods-CreditCardForm.release.xcconfig"; sourceTree = "<group>"; };
8E1A520A1E7BF24500F02033 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; };
8EB6C7951DF93FD300225444 /* CreditCardForm.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CreditCardForm.podspec; sourceTree = SOURCE_ROOT; };
8EC8C3C91DEC8C3E0044FB44 /* CreditCardForm.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CreditCardForm.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8EC8C3CD1DEC8C3E0044FB44 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -134,6 +136,7 @@
8EC8C4F61DEDA1340044FB44 /* CreditCardValidator.swift */,
8EC8C4F71DEDA1340044FB44 /* Utilities.swift */,
8EFED2801E2796A6002BE8D5 /* Images.xcassets */,
8E1A520A1E7BF24500F02033 /* LICENSE */,
8EC8C50B1DEDC0420044FB44 /* README.md */,
8EB6C7951DF93FD300225444 /* CreditCardForm.podspec */,
);
Expand Down Expand Up @@ -256,6 +259,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E1A520B1E7BF24500F02033 /* LICENSE in Resources */,
8EFED2811E2796A6002BE8D5 /* Images.xcassets in Resources */,
8EB6C7961DF93FD300225444 /* CreditCardForm.podspec in Resources */,
);
Expand Down
Binary file not shown.
9 changes: 8 additions & 1 deletion CreditCardForm/Classes/CreditCardFormView.swift
Expand Up @@ -80,6 +80,13 @@ public class CreditCardFormView : UIView {
}
}

@IBInspectable
public var cardHolderPlaceholderString = "CARD HOLDER" {
didSet {
cardHolderText.text = cardHolderPlaceholderString
}
}

@IBInspectable
public var expireDatePlaceholderText = "EXPIRY" {
didSet {
Expand Down Expand Up @@ -270,7 +277,7 @@ public class CreditCardFormView : UIView {
//Card holder uilabel
cardHolderText.translatesAutoresizingMaskIntoConstraints = false
cardHolderText.font = UIFont(name: "Helvetica Neue", size: 10)
cardHolderText.text = "CARD HOLDER"
cardHolderText.text = cardHolderPlaceholderString
cardHolderText.textColor = cardHolderExpireDateTextColor
frontView.addSubview(cardHolderText)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Orazz
Copyright (c) 2016 - 2017 Orazz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 5 additions & 3 deletions README.md
@@ -1,7 +1,7 @@
# CreditCardForm

[![CI Status](https://travis-ci.org/orazz/CreditCardForm-iOS.svg?branch=master)](https://travis-ci.org/orazz/CreditCardForm-iOS)
<a href="https://cocoapods.org/pods/CreditCardForm"><img src="https://img.shields.io/badge/pod-0.1.0-blue.svg" alt="CocoaPods compatible" /></a>
<a href="https://cocoapods.org/pods/CreditCardForm"><img src="https://img.shields.io/badge/pod-0.1.1-blue.svg" alt="CocoaPods compatible" /></a>
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
<a href="https://developer.apple.com/swift"><img src="https://img.shields.io/badge/swift3-compatible-4BC51D.svg?style=flat" alt="Swift 3 compatible" /></a>
<img src="https://img.shields.io/badge/platform-iOS-blue.svg?style=flat" alt="Platform iOS" />
Expand Down Expand Up @@ -102,11 +102,13 @@ paymentTextField.heightAnchor.constraint(equalToConstant: 44)
])
```

#### Optional - Delegate Methods
#### Delegate Methods

In order to use the delegate methods first set the delegate of Stripe to the parent view controller when setting it up

``` swift
paymentTextField.delegate = self
```

After that you will be able to set up the following delegate methods inside of your parent view controller

Expand Down Expand Up @@ -154,7 +156,7 @@ creditCardForm.chipImage (UIImage)
creditCardForm.cardHolderString (String)
creditCardForm.expireDatePlaceholderText (String)
```
**Card number: [Configuring the Mask Field](https://github.com/artemkrachulov/AKMaskField#configuring-the-mask-field) **
**Card number: [Configuring the Mask Field](https://github.com/artemkrachulov/AKMaskField#configuring-the-mask-field)**
``` swift
creditCardForm.cardNumberMaskExpression (String)
creditCardForm.cardNumberMaskTemplate (String)
Expand Down

0 comments on commit b9f6ef0

Please sign in to comment.